Skip to content

Commit

Permalink
GS/SW: Don't use fast reciprocal stq calculation, it's too inaccurate
Browse files Browse the repository at this point in the history
  • Loading branch information
refractionpcsx2 committed May 14, 2024
1 parent e520dc2 commit 45d46a4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
12 changes: 4 additions & 8 deletions pcsx2/GS/Renderers/SW/GSDrawScanlineCodeGenerator.all.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1173,10 +1173,8 @@ void GSDrawScanlineCodeGenerator::SampleTexture()

if (!m_sel.fst)
{
rcpps(xym0, _q);

MOVE_IF_64(mulps, xym2, _s, xym0);
MOVE_IF_64(mulps, xym3, _t, xym0);
MOVE_IF_64(divps, xym2, _s, _q);
MOVE_IF_64(divps, xym3, _t, _q);

cvttps2dq(xym2, xym2);
cvttps2dq(xym3, xym3);
Expand Down Expand Up @@ -1576,10 +1574,8 @@ void GSDrawScanlineCodeGenerator::SampleTextureLOD()

if (!m_sel.fst)
{
rcpps(xym0, xym4);

MOVE_IF_64(mulps, xym2, _s, xym0);
MOVE_IF_64(mulps, xym3, _t, xym0);
MOVE_IF_64(divps, xym2, _s, xym4);
MOVE_IF_64(divps, xym3, _t, xym4);

cvttps2dq(xym2, xym2);
cvttps2dq(xym3, xym3);
Expand Down
1 change: 1 addition & 0 deletions pcsx2/GS/Renderers/SW/GSNewCodeGenerator.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ class GSNewCodeGenerator
AFORWARD(2, cvtss2sd, ARGS_XO)
SFORWARD(2, cvttps2dq, ARGS_XO)
SFORWARD(2, cvttsd2si, const AddressReg&, const Operand&);
AFORWARD(2, divps, ARGS_XO)
SFORWARD(3, extractps, const Operand&, const Xmm&, u8)
AFORWARD(2, maxps, ARGS_XO)
AFORWARD(2, minps, ARGS_XO)
Expand Down

0 comments on commit 45d46a4

Please sign in to comment.