GS/TC: Don't clear valid flags if render target is only partially cleared

This commit is contained in:
refractionpcsx2
2026-07-10 23:57:38 +01:00
parent eb5e3fcd13
commit daee802bde
+7 -4
View File
@@ -4543,10 +4543,13 @@ void GSTextureCache::InvalidateContainedTargets(u32 start_bp, u32 end_bp, u32 wr
InvalidateSourcesFromTarget(t); InvalidateSourcesFromTarget(t);
t->m_valid_alpha_low &= preserve_alpha; if (type == DepthStencil || start_bp == t->m_TEX0.TBP0 || (start_bp < t->m_TEX0.TBP0 && t->UnwrappedEndBlock() <= end_bp))
t->m_valid_alpha_high &= preserve_alpha; {
t->m_valid_rgb &= (fb_mask & 0x00FFFFFF) != 0; t->m_valid_alpha_low &= preserve_alpha;
t->m_was_dst_matched = false; t->m_valid_alpha_high &= preserve_alpha;
t->m_valid_rgb &= (fb_mask & 0x00FFFFFF) != 0;
t->m_was_dst_matched = false;
}
// Don't keep partial depth buffers around. // Don't keep partial depth buffers around.
if ((!t->m_valid_alpha_low && !t->m_valid_alpha_high && !t->m_valid_rgb) || type == DepthStencil) if ((!t->m_valid_alpha_low && !t->m_valid_alpha_high && !t->m_valid_rgb) || type == DepthStencil)