Skip to content

Commit

Permalink
gsdx ogl: depth regression from 866173a
Browse files Browse the repository at this point in the history
Only mask depth if the min value is too big

Issue #1602
  • Loading branch information
gregory38 committed Oct 3, 2016
1 parent 3be055a commit 5b72fab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/GSdx/GSRendererOGL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,14 +266,15 @@ 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) {
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.
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;
}
}
Expand Down

0 comments on commit 5b72fab

Please sign in to comment.