GS-TC: Reset age on Host->Local dirty textures

This commit is contained in:
refractionpcsx2 2022-11-11 02:40:13 +00:00
parent d70b7e5bc7
commit a874c5455d
1 changed files with 6 additions and 1 deletions

View File

@ -898,6 +898,7 @@ void GSTextureCache::InvalidateVideoMem(const GSOffset& off, const GSVector4i& r
t->m_texture ? t->m_texture->GetID() : 0,
t->m_TEX0.TBP0, r.x, r.y, r.z, r.w);
t->m_TEX0.TBW = bw;
t->m_age = 0;
t->m_dirty.push_back(GSDirtyRect(r, psm, bw));
}
else
@ -978,6 +979,7 @@ void GSTextureCache::InvalidateVideoMem(const GSOffset& off, const GSVector4i& r
t->m_TEX0.TBP0);
// TODO: do not add this rect above too
t->m_TEX0.TBW = bw;
t->m_age = 0;
t->m_dirty.push_back(GSDirtyRect(GSVector4i(r.left, r.top - y, r.right, r.bottom - y), psm, bw));
continue;
}
@ -1004,7 +1006,7 @@ void GSTextureCache::InvalidateVideoMem(const GSOffset& off, const GSVector4i& r
t->m_texture ? t->m_texture->GetID() : 0,
t->m_TEX0.TBP0, t->m_end_block,
r.left, r.top + y, r.right, r.bottom + y, bw);
t->m_age = 0;
t->m_TEX0.TBW = bw;
t->m_dirty.push_back(GSDirtyRect(GSVector4i(r.left, r.top + y, r.right, r.bottom + y), psm, bw));
continue;
@ -1014,7 +1016,10 @@ void GSTextureCache::InvalidateVideoMem(const GSOffset& off, const GSVector4i& r
{
const SurfaceOffset so = ComputeSurfaceOffset(off, r, t);
if (so.is_valid)
{
t->m_age = 0;
t->m_dirty.push_back(GSDirtyRect(so.b2a_offset, psm, bw));
}
}
#endif
}