@@ -7523,7 +7523,9 @@ __ri void GSRendererHW::DrawPrims(GSTextureCache::Target* rt, GSTextureCache::Ta
75237523 }
75247524
75257525 // DATE: selection of the algorithm. Must be done before blending because GL42 is not compatible with blending
7526+ const bool ate_first_pass = m_cached_ctx.TEST .DoFirstPass ();
75267527 bool ate_second_pass = m_cached_ctx.TEST .DoSecondPass ();
7528+ const bool ate_multi_pass = ate_first_pass && ate_second_pass;
75277529 if (DATE)
75287530 {
75297531 if (m_cached_ctx.TEST .DATM )
@@ -7561,7 +7563,7 @@ __ri void GSRendererHW::DrawPrims(GSTextureCache::Target* rt, GSTextureCache::Ta
75617563 GL_PERF (" DATE: Fast with FBA, all pixels will be >= 128" );
75627564 DATE_one = !m_cached_ctx.TEST .DATM ;
75637565 }
7564- else if (m_conf.colormask .wa && !ate_second_pass && !(m_cached_ctx.FRAME .FBMSK & 0x80000000 ))
7566+ else if (m_conf.colormask .wa && !ate_multi_pass && !(m_cached_ctx.FRAME .FBMSK & 0x80000000 ))
75657567 {
75667568 // Performance note: check alpha range with GetAlphaMinMax()
75677569 // Note: all my dump are already above 120fps, but it seems to reduce GPU load
@@ -7796,12 +7798,11 @@ __ri void GSRendererHW::DrawPrims(GSTextureCache::Target* rt, GSTextureCache::Ta
77967798 // Depth test is always true so it can be executed in 2 passes (no order required) unlike color.
77977799 // The idea is to compute first the color which is independent of the alpha test. And then do a 2nd
77987800 // pass to handle the depth based on the alpha test.
7799- const bool ate_first_pass = m_cached_ctx.TEST .DoFirstPass ();
78007801 bool ate_RGBA_then_Z = false ;
78017802 bool ate_RGB_then_Z = false ;
7802- GL_INS (" HW: %sAlpha Test, ATST=%s, AFAIL=%s" , (ate_first_pass && ate_second_pass) ? " Complex" : " " ,
7803+ GL_INS (" HW: %sAlpha Test, ATST=%s, AFAIL=%s" , ate_multi_pass ? " Complex" : " " ,
78037804 GSUtil::GetATSTName (m_cached_ctx.TEST .ATST ), GSUtil::GetAFAILName (m_cached_ctx.TEST .AFAIL ));
7804- if (ate_first_pass && ate_second_pass )
7805+ if (ate_multi_pass )
78057806 {
78067807 const bool commutative_depth = (m_conf.depth .ztst == ZTST_GEQUAL && m_vt.m_eq .z ) || (m_conf.depth .ztst == ZTST_ALWAYS) || !m_conf.depth .zwe ;
78077808 const bool commutative_alpha = (m_context->ALPHA .C != 1 ) || !m_conf.colormask .wa ; // when either Alpha Src or a constant, or not updating A
0 commit comments