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