mirror of https://github.com/PCSX2/pcsx2.git
GSdx: more fixes to z-interpolation, THPS4 looks alright now.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4977 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
0d7c58065a
commit
786f43a707
|
@ -256,7 +256,7 @@ void GSDrawScanline::DrawScanline(int pixels, int left, int top, const GSVertexS
|
|||
GSScanlineSelector sel = m_global.sel;
|
||||
|
||||
GSVector4i test;
|
||||
GSVector4 z;
|
||||
GSVector4 zo;
|
||||
GSVector4i f;
|
||||
GSVector4 s, t, q;
|
||||
GSVector4i uf, vf;
|
||||
|
@ -285,7 +285,7 @@ void GSDrawScanline::DrawScanline(int pixels, int left, int top, const GSVertexS
|
|||
|
||||
if(sel.zb)
|
||||
{
|
||||
z = scan.p.zzzz() + m_local.d[skip].z;
|
||||
zo = m_local.d[skip].z;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -361,6 +361,8 @@ void GSDrawScanline::DrawScanline(int pixels, int left, int top, const GSVertexS
|
|||
|
||||
if(!sel.sprite)
|
||||
{
|
||||
GSVector4 z = scan.p.zzzz() + zo;
|
||||
|
||||
if(sel.zoverflow)
|
||||
{
|
||||
zs = (GSVector4i(z * 0.5f) << 1) | (GSVector4i(z) & GSVector4i::x00000001());
|
||||
|
@ -1218,7 +1220,7 @@ void GSDrawScanline::DrawScanline(int pixels, int left, int top, const GSVertexS
|
|||
{
|
||||
if(sel.zb)
|
||||
{
|
||||
z += m_local.d4.z;
|
||||
zo += m_local.d4.z;
|
||||
}
|
||||
|
||||
if(sel.fwrite && sel.fge)
|
||||
|
|
|
@ -320,9 +320,10 @@ void GSDrawScanlineCodeGenerator::Init()
|
|||
// z = vp.zzzz() + m_local.d[skip].z;
|
||||
|
||||
vshufps(xmm0, xmm0, _MM_SHUFFLE(2, 2, 2, 2));
|
||||
vaddps(xmm0, ptr[edx + offsetof(GSScanlineLocalData::skip, z)]);
|
||||
|
||||
vmovaps(ptr[&m_local.temp.z], xmm0);
|
||||
vmovaps(xmm2, ptr[edx + offsetof(GSScanlineLocalData::skip, z)]);
|
||||
vmovaps(ptr[&m_local.temp.zo], xmm2);
|
||||
vaddps(xmm0, xmm2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -459,9 +460,10 @@ void GSDrawScanlineCodeGenerator::Step()
|
|||
|
||||
if(m_sel.zb)
|
||||
{
|
||||
vmovaps(xmm0, ptr[&m_local.temp.z]);
|
||||
vmovaps(xmm0, ptr[&m_local.temp.zo]);
|
||||
vaddps(xmm0, ptr[&m_local.d4.z]);
|
||||
vmovaps(ptr[&m_local.temp.z], xmm0);
|
||||
vmovaps(ptr[&m_local.temp.zo], xmm0);
|
||||
vaddps(xmm0, ptr[&m_local.temp.z]);
|
||||
}
|
||||
|
||||
// f = f.add16(m_local.d4.f);
|
||||
|
|
|
@ -320,9 +320,10 @@ void GSDrawScanlineCodeGenerator::Init()
|
|||
// z = vp.zzzz() + m_local.d[skip].z;
|
||||
|
||||
shufps(xmm0, xmm0, _MM_SHUFFLE(2, 2, 2, 2));
|
||||
addps(xmm0, ptr[edx + offsetof(GSScanlineLocalData::skip, z)]);
|
||||
|
||||
movaps(ptr[&m_local.temp.z], xmm0);
|
||||
movaps(xmm2, ptr[edx + offsetof(GSScanlineLocalData::skip, z)]);
|
||||
movaps(ptr[&m_local.temp.zo], xmm2);
|
||||
addps(xmm0, xmm2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -462,9 +463,10 @@ void GSDrawScanlineCodeGenerator::Step()
|
|||
|
||||
if(m_sel.zb)
|
||||
{
|
||||
movaps(xmm0, ptr[&m_local.temp.z]);
|
||||
movaps(xmm0, ptr[&m_local.temp.zo]);
|
||||
addps(xmm0, ptr[&m_local.d4.z]);
|
||||
movaps(ptr[&m_local.temp.z], xmm0);
|
||||
movaps(ptr[&m_local.temp.zo], xmm0);
|
||||
addps(xmm0, ptr[&m_local.temp.z]);
|
||||
}
|
||||
|
||||
// f = f.add16(m_local.d4.f);
|
||||
|
|
|
@ -146,7 +146,7 @@ __aligned(struct, 32) GSScanlineLocalData // per prim variables, each thread has
|
|||
|
||||
struct
|
||||
{
|
||||
GSVector4 z;
|
||||
GSVector4 z, zo;
|
||||
GSVector4i f;
|
||||
GSVector4 s, t, q;
|
||||
GSVector4i rb, ga;
|
||||
|
|
Loading…
Reference in New Issue