mirror of https://github.com/PCSX2/pcsx2.git
GS: Fix zequal handling in CDrawScanline
I somehow didn't use the same algorithm as the asm version originally
This commit is contained in:
parent
2ee8236365
commit
650dc8bc6a
|
@ -357,18 +357,14 @@ void GSDrawScanline::CDrawScanline(int pixels, int left, int top, const GSVertex
|
||||||
|
|
||||||
if (sel.zb)
|
if (sel.zb)
|
||||||
{
|
{
|
||||||
VectorF zbase = VectorF::broadcast64(&scan.p.z);
|
|
||||||
if (sel.zequal)
|
if (sel.zequal)
|
||||||
{
|
{
|
||||||
#if _M_SSE >= 0x501
|
u32 z = static_cast<u32>(scan.p.F64[1]);
|
||||||
z0 = GSVector8::cast(GSVector8i::broadcast32(zbase.extract<0>().f64toi32()));
|
z0 = VectorF::cast(VectorI(z));
|
||||||
#else
|
|
||||||
z0 = GSVector4::cast(zbase.f64toi32());
|
|
||||||
z0 = z0.upld(z0);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
VectorF zbase = VectorF::broadcast64(&scan.p.z);
|
||||||
z0 = zbase.add64(VectorF::f32to64(&local.d[skip].z.F32[0]));
|
z0 = zbase.add64(VectorF::f32to64(&local.d[skip].z.F32[0]));
|
||||||
z1 = zbase.add64(VectorF::f32to64(&local.d[skip].z.F32[vlen/2]));
|
z1 = zbase.add64(VectorF::f32to64(&local.d[skip].z.F32[vlen/2]));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue