gsdx ogl: depth regression from 866173a481

Only mask depth if the min value is too big

Issue #1602
This commit is contained in:
Gregory Hainaut 2016-10-03 18:32:54 +02:00
parent 3be055a366
commit 5b72fab2e4
1 changed files with 2 additions and 1 deletions

View File

@ -266,7 +266,7 @@ void GSRendererOGL::EmulateZbuffer()
// The real GS appears to do no masking based on the Z buffer format and writing larger Z values
// than the buffer supports seems to be an error condition on the real GS, causing it to crash.
// We are probably receiving bad coordinates from VU1 in these cases.
vs_cb.DepthMask = GSVector2i(max_z, max_z);
vs_cb.DepthMask = GSVector2i(0xFFFFFFFF, 0xFFFFFFFF);
if (m_om_dssel.ztst >= ZTST_ALWAYS && m_om_dssel.zwe && (m_context->ZBUF.PSM != PSM_PSMZ32)) {
if (m_vt.m_max.p.z > max_z) {
@ -274,6 +274,7 @@ void GSRendererOGL::EmulateZbuffer()
// 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) {
GL_INS("Bad Z size on %s buffers", psm_str(m_context->ZBUF.PSM));
vs_cb.DepthMask = GSVector2i(max_z, max_z);
m_om_dssel.ztst = ZTST_ALWAYS;
}
}