GS/HW: Fix misdetection of draw as clear with fog effect

This commit is contained in:
refractionpcsx2 2025-01-12 08:26:38 +00:00 committed by lightningterror
parent 4f42d95d3c
commit 19f0cfcf06
1 changed files with 3 additions and 2 deletions

View File

@ -7413,9 +7413,10 @@ ClearType GSRendererHW::IsConstantDirectWriteMemClear()
&& !(m_draw_env->SCANMSK.MSK & 2) && !m_cached_ctx.TEST.ATE // no alpha test
&& !m_cached_ctx.TEST.DATE // no destination alpha test
&& (!m_cached_ctx.TEST.ZTE || m_cached_ctx.TEST.ZTST == ZTST_ALWAYS) // no depth test
&& (m_vt.m_eq.rgba == 0xFFFF || m_vertex.next == 2)) // constant color write
&& (m_vt.m_eq.rgba == 0xFFFF || m_vertex.next == 2) // constant color write
&& (!PRIM->FGE || m_vt.m_min.p.w == 255.0f)) // No fog effect
{
if (PRIM->ABE && (!m_context->ALPHA.IsOpaque() || m_cached_ctx.FRAME.FBMSK))
if ((PRIM->ABE && !m_context->ALPHA.IsOpaque()) || (m_cached_ctx.FRAME.FBMSK & GSLocalMemory::m_psm[m_cached_ctx.FRAME.PSM].fmsk))
return ClearWithDraw;
return NormalClear;