GS/TC: Use drawn area when available for checking overlap

This commit is contained in:
refractionpcsx2
2026-10-11 17:48:04 +01:00
parent c53b0c9c92
commit f3ab63b90e
+5 -2
View File
@@ -2345,8 +2345,10 @@ void GSTextureCache::CombineAlignedInsideTargets(Target* target, GSTextureCache:
if (t != target)
{
GSVector4i t_check_rect = t->m_drawn_since_read.eq(GSVector4i::zero()) ? t->m_valid : t->m_drawn_since_read;
// Target not contained, skip it.
if (t->m_TEX0.TBP0 < target->m_TEX0.TBP0 || t->UnwrappedEndBlock() > target->UnwrappedEndBlock())
// Go from the drawn rect rather than valid as this can be false if expanded by LookupDisplayTarget, we use this metric for the copy anyway.
if (t->m_TEX0.TBP0 < target->m_TEX0.TBP0 || GSLocalMemory::GetUnwrappedEndBlockAddress(t->m_TEX0.TBP0, t->m_TEX0.TBW, t->m_TEX0.PSM, t_check_rect) > target->UnwrappedEndBlock())
{
i++;
continue;
@@ -2422,7 +2424,8 @@ void GSTextureCache::CombineAlignedInsideTargets(Target* target, GSTextureCache:
GSTextureCache::RescaleHelper::RescaleHelper(const GSVector2i& size, float scale)
: m_size(size)
, m_scale(scale)
, m_scale(scale)
{
}