diff --git a/plugins/GSdx/GSRendererDX.cpp b/plugins/GSdx/GSRendererDX.cpp index e874c8bee9..52f2f43ee0 100644 --- a/plugins/GSdx/GSRendererDX.cpp +++ b/plugins/GSdx/GSRendererDX.cpp @@ -53,7 +53,7 @@ void GSRendererDX::EmulateAtst(const int pass, const GSTextureCache::Source* tex static const uint32 inverted_atst[] = { ATST_ALWAYS, ATST_NEVER, ATST_GEQUAL, ATST_GREATER, ATST_NOTEQUAL, ATST_LESS, ATST_LEQUAL, ATST_EQUAL }; int atst = (pass == 2) ? inverted_atst[m_context->TEST.ATST] : m_context->TEST.ATST; - if (!m_ATE) return; + if (!m_context->TEST.ATE) return; switch (atst) { case ATST_LESS: @@ -98,7 +98,7 @@ void GSRendererDX::EmulateAtst(const int pass, const GSTextureCache::Source* tex // to only draw pixels which would cause the destination alpha test to fail in the future once. // Unfortunately this also means only drawing those pixels at all, which is why this is a hack. // The interaction with FBA in D3D9 is probably less than ideal. - if (UserHacks_AlphaStencil && DATE && dev->HasStencil() && om_bsel.wa && !m_ATE) + if (UserHacks_AlphaStencil && DATE && dev->HasStencil() && om_bsel.wa && !m_context->TEST.ATE) { if (!m_context->FBA.FBA) { diff --git a/plugins/GSdx/GSRendererHW.cpp b/plugins/GSdx/GSRendererHW.cpp index 3f6c08eb80..2a9e30ae60 100644 --- a/plugins/GSdx/GSRendererHW.cpp +++ b/plugins/GSdx/GSRendererHW.cpp @@ -31,7 +31,6 @@ GSRendererHW::GSRendererHW(GSTextureCache* tc) , m_upscale_multiplier(1) , m_tc(tc) , m_channel_shuffle(false) - , m_ATE(false) { m_upscale_multiplier = theApp.GetConfigI("upscale_multiplier"); m_large_framebuffer = theApp.GetConfigB("large_framebuffer"); @@ -422,7 +421,7 @@ void GSRendererHW::Draw() m_mem.m_clut.Read32(context->TEX0, env.TEXA); // Test if we can optimize Alpha Test as a NOP - m_ATE = context->TEST.ATE && !GSRenderer::TryAlphaTest(fm, zm); + context->TEST.ATE = context->TEST.ATE && !GSRenderer::TryAlphaTest(fm, zm); context->FRAME.FBMSK = fm; context->ZBUF.ZMSK = zm != 0; diff --git a/plugins/GSdx/GSRendererHW.h b/plugins/GSdx/GSRendererHW.h index 1849ea5826..9ef2ea3cec 100644 --- a/plugins/GSdx/GSRendererHW.h +++ b/plugins/GSdx/GSRendererHW.h @@ -153,7 +153,6 @@ protected: int m_userhacks_round_sprite_offset; bool m_channel_shuffle; - bool m_ATE; public: GSRendererHW(GSTextureCache* tc); diff --git a/plugins/GSdx/GSRendererOGL.cpp b/plugins/GSdx/GSRendererOGL.cpp index 92383d08f8..032b2370d8 100644 --- a/plugins/GSdx/GSRendererOGL.cpp +++ b/plugins/GSdx/GSRendererOGL.cpp @@ -201,7 +201,7 @@ void GSRendererOGL::EmulateAtst(const int pass, const GSTextureCache::Source* te static const uint32 inverted_atst[] = {ATST_ALWAYS, ATST_NEVER, ATST_GEQUAL, ATST_GREATER, ATST_NOTEQUAL, ATST_LESS, ATST_LEQUAL, ATST_EQUAL}; int atst = (pass == 2) ? inverted_atst[m_context->TEST.ATST] : m_context->TEST.ATST; - if (!m_ATE) return; + if (!m_context->TEST.ATE) return; switch (atst) { case ATST_LESS: @@ -1179,7 +1179,7 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour m_require_full_barrier = true; DATE_GL45 = true; DATE = false; - } else if (m_om_csel.wa && !m_ATE) { + } else if (m_om_csel.wa && !m_context->TEST.ATE) { // Performance note: check alpha range with GetAlphaMinMax() // Note: all my dump are already above 120fps, but it seems to reduce GPU load // with big upscaling @@ -1210,7 +1210,7 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour DATE = false; } } - } else if (!m_om_csel.wa && !m_ATE) { + } else if (!m_om_csel.wa && !m_context->TEST.ATE) { // TODO: is it legal ? Likely but it need to be tested carefully // DATE_GL45 = true; // m_require_one_barrier = true; << replace it with a cheap barrier