gsdx: don't try to correct depth in primitive trace

Avoid to go above the maximum size allowed by the format

Issue #1674
This commit is contained in:
Gregory Hainaut 2016-11-24 22:21:18 +01:00
parent 230b470a3c
commit 211c7745de
2 changed files with 1 additions and 5 deletions

View File

@ -271,7 +271,7 @@ void GSRendererOGL::EmulateZbuffer()
ASSERT(m_vt.m_min.p.z > max_z); // sfex capcom logo ASSERT(m_vt.m_min.p.z > max_z); // sfex capcom logo
// Fixme :Following conditional fixes some dialog frame in Wild Arms 3, but may not be what was intended. // Fixme :Following conditional fixes some dialog frame in Wild Arms 3, but may not be what was intended.
if (m_vt.m_min.p.z > max_z) { if (m_vt.m_min.p.z > max_z) {
GL_DBG("Bad Z size on %s buffers", psm_str(m_context->ZBUF.PSM)); GL_DBG("Bad Z size (%f %f) on %s buffers", m_vt.m_min.p.z, m_vt.m_max.p.z, psm_str(m_context->ZBUF.PSM));
vs_cb.DepthMask = GSVector2i(max_z, max_z); vs_cb.DepthMask = GSVector2i(max_z, max_z);
m_om_dssel.ztst = ZTST_ALWAYS; m_om_dssel.ztst = ZTST_ALWAYS;
} }

View File

@ -532,12 +532,8 @@ void GSVertexTrace::CorrectDepthTrace(const void* vertex, int count)
} }
if (z == v[0].XYZ.Z) { if (z == v[0].XYZ.Z) {
m_min.p.z = z;
m_max.p.z = z;
m_eq.z = 1; m_eq.z = 1;
} else { } else {
m_min.p.z = z & ~1;
m_max.p.z = z | 1;
m_eq.z = 0; m_eq.z = 0;
} }
} }