gsdx sw: use accurate division for the C reference implementation

Speed isn't important here. It would allow to compare the rendering with
the JIT implementation. If it is necessary we could an option for the JIT.
This commit is contained in:
Gregory Hainaut 2017-02-28 19:56:03 +01:00
parent b54a824abd
commit f862f5be03
1 changed files with 8 additions and 16 deletions

View File

@ -601,10 +601,8 @@ void GSDrawScanline::DrawScanline(int pixels, int left, int top, const GSVertexS
{ {
if(!sel.fst) if(!sel.fst)
{ {
GSVector8 qrcp = q.rcp(); u = GSVector8i(s / q);
v = GSVector8i(t / q);
u = GSVector8i(s * qrcp);
v = GSVector8i(t * qrcp);
} }
else else
{ {
@ -905,11 +903,9 @@ void GSDrawScanline::DrawScanline(int pixels, int left, int top, const GSVertexS
{ {
if(!sel.fst) if(!sel.fst)
{ {
GSVector8 qrcp = q.rcp(); u = GSVector8i(s / q);
v = GSVector8i(t / q);
u = GSVector8i(s * qrcp);
v = GSVector8i(t * qrcp);
if(sel.ltf) if(sel.ltf)
{ {
u -= 0x8000; u -= 0x8000;
@ -1714,10 +1710,8 @@ void GSDrawScanline::DrawScanline(int pixels, int left, int top, const GSVertexS
{ {
if(!sel.fst) if(!sel.fst)
{ {
GSVector4 qrcp = q.rcp(); u = GSVector4i(s / q);
v = GSVector4i(t / q);
u = GSVector4i(s * qrcp);
v = GSVector4i(t * qrcp);
} }
else else
{ {
@ -2031,11 +2025,9 @@ void GSDrawScanline::DrawScanline(int pixels, int left, int top, const GSVertexS
{ {
if(!sel.fst) if(!sel.fst)
{ {
GSVector4 qrcp = q.rcp(); u = GSVector4i(s / q);
v = GSVector4i(t / q);
u = GSVector4i(s * qrcp);
v = GSVector4i(t * qrcp);
if(sel.ltf) if(sel.ltf)
{ {
u -= 0x8000; u -= 0x8000;