Skip to content

Commit

Permalink
gsdx: don't try to correct depth in primitive trace
Browse files Browse the repository at this point in the history
Avoid to go above the maximum size allowed by the format

Issue #1674
  • Loading branch information
gregory38 committed Nov 24, 2016
1 parent 230b470 commit 211c774
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion plugins/GSdx/GSRendererOGL.cpp
Expand Up @@ -271,7 +271,7 @@ void GSRendererOGL::EmulateZbuffer()
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_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);
m_om_dssel.ztst = ZTST_ALWAYS;
}
Expand Down
4 changes: 0 additions & 4 deletions plugins/GSdx/GSVertexTrace.cpp
Expand Up @@ -532,12 +532,8 @@ void GSVertexTrace::CorrectDepthTrace(const void* vertex, int count)
}

if (z == v[0].XYZ.Z) {
m_min.p.z = z;
m_max.p.z = z;
m_eq.z = 1;
} else {
m_min.p.z = z & ~1;
m_max.p.z = z | 1;
m_eq.z = 0;
}
}

0 comments on commit 211c774

Please sign in to comment.