From 211c7745de1bc260f10658e5ef49a06a0b52e8d3 Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Thu, 24 Nov 2016 22:21:18 +0100 Subject: [PATCH] gsdx: don't try to correct depth in primitive trace Avoid to go above the maximum size allowed by the format Issue #1674 --- plugins/GSdx/GSRendererOGL.cpp | 2 +- plugins/GSdx/GSVertexTrace.cpp | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/plugins/GSdx/GSRendererOGL.cpp b/plugins/GSdx/GSRendererOGL.cpp index 04def276af49d..54265309af7c8 100644 --- a/plugins/GSdx/GSRendererOGL.cpp +++ b/plugins/GSdx/GSRendererOGL.cpp @@ -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; } diff --git a/plugins/GSdx/GSVertexTrace.cpp b/plugins/GSdx/GSVertexTrace.cpp index 22427cd313501..49845b89c5fc8 100644 --- a/plugins/GSdx/GSVertexTrace.cpp +++ b/plugins/GSdx/GSVertexTrace.cpp @@ -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; } }