GS: Fix zequal handling in CDrawScanline

I somehow didn't use the same algorithm as the asm version originally
This commit is contained in:
TellowKrinkle 2022-07-31 20:26:03 -05:00 committed by tellowkrinkle
parent 2ee8236365
commit 650dc8bc6a
1 changed files with 3 additions and 7 deletions

View File

@ -357,18 +357,14 @@ void GSDrawScanline::CDrawScanline(int pixels, int left, int top, const GSVertex
if (sel.zb)
{
VectorF zbase = VectorF::broadcast64(&scan.p.z);
if (sel.zequal)
{
#if _M_SSE >= 0x501
z0 = GSVector8::cast(GSVector8i::broadcast32(zbase.extract<0>().f64toi32()));
#else
z0 = GSVector4::cast(zbase.f64toi32());
z0 = z0.upld(z0);
#endif
u32 z = static_cast<u32>(scan.p.F64[1]);
z0 = VectorF::cast(VectorI(z));
}
else
{
VectorF zbase = VectorF::broadcast64(&scan.p.z);
z0 = zbase.add64(VectorF::f32to64(&local.d[skip].z.F32[0]));
z1 = zbase.add64(VectorF::f32to64(&local.d[skip].z.F32[vlen/2]));
}