Skip to content

Commit 7a90cae

Browse files
TJnotJTlightningterror
authored andcommitted
GS/HW: Force depth ROV if alpha test needs depth feedback.
1 parent 017b4d0 commit 7a90cae

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

pcsx2/GS/Renderers/HW/GSRendererHW.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7533,7 +7533,11 @@ __fi void GSRendererHW::GetForcedROVUsage(bool& rov_color, bool& rov_depth)
75337533
// Separate flag for DATE since they are many methods and the interaction with ROV is not clear.
75347534
const bool date = m_cached_ctx.TEST.DATE;
75357535

7536-
if (rov_color && (m_conf.ps.HasShaderDiscard() || m_conf.ps.HasDepthOutput() || date))
7536+
// Alpha test might require depth feedback once we configure ROV.
7537+
const bool atst_needs_depth = m_cached_ctx.TEST.ATE &&
7538+
(m_cached_ctx.TEST.AFAIL == AFAIL_FB_ONLY || m_cached_ctx.TEST.AFAIL == AFAIL_RGB_ONLY);
7539+
7540+
if (rov_color && (m_conf.ps.HasShaderDiscard() || m_conf.ps.HasDepthOutput() || date || atst_needs_depth))
75377541
{
75387542
GL_INS("ROV: Color ROV with shader discard/depth write forces depth ROV");
75397543
rov_depth = true;

0 commit comments

Comments
 (0)