From b91bd3ea010fbca04d3d79272d7eaceebddd7c4a Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Mon, 19 Sep 2016 08:56:49 +0200 Subject: [PATCH] gsdx dx/gl: fix potential bug in alpha test handling Depth test must remain disabled if write were masked. Bug was detected on ICO (sea/sky) but the previous commit removes the wrong ATE draw call. --- plugins/GSdx/GSRendererDX.cpp | 4 ++-- plugins/GSdx/GSRendererOGL.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/GSdx/GSRendererDX.cpp b/plugins/GSdx/GSRendererDX.cpp index 2dafe8750b..cb7aa8f24a 100644 --- a/plugins/GSdx/GSRendererDX.cpp +++ b/plugins/GSdx/GSRendererDX.cpp @@ -606,10 +606,10 @@ void GSRendererDX::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sourc } if (ate_RGBA_then_Z) { - z = true; + z = !m_context->ZBUF.ZMSK; r = g = b = a = false; } else if (ate_RGB_then_ZA) { - z = true; + z = !m_context->ZBUF.ZMSK; a = !!(m_context->FRAME.FBMSK & 0xFF000000); r = g = b = false; } diff --git a/plugins/GSdx/GSRendererOGL.cpp b/plugins/GSdx/GSRendererOGL.cpp index ace1725e6a..d87825f08f 100644 --- a/plugins/GSdx/GSRendererOGL.cpp +++ b/plugins/GSdx/GSRendererOGL.cpp @@ -1460,10 +1460,10 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour } if (ate_RGBA_then_Z) { - z = true; + z = !m_context->ZBUF.ZMSK; r = g = b = a = false; } else if (ate_RGB_then_ZA) { - z = true; + z = !m_context->ZBUF.ZMSK; a = !!(m_context->FRAME.FBMSK & 0xFF000000); r = g = b = false; }