Skip to content

Commit

Permalink
GS/HW: Fix misdetection of draw as clear with fog effect
Browse files Browse the repository at this point in the history
  • Loading branch information
refractionpcsx2 committed Jan 12, 2025
1 parent bf10ca4 commit 28d2f39
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pcsx2/GS/Renderers/HW/GSRendererHW.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 28d2f39

Please sign in to comment.