GS/TextureCache: Clear surface offset cache on reset

Also get rid of RemovePartial(), it's never called.
This commit is contained in:
Stenzek 2023-02-12 12:43:53 +10:00 committed by refractionpcsx2
parent d00845f56b
commit d0a933cda8
2 changed files with 2 additions and 16 deletions

View File

@ -43,24 +43,9 @@ GSTextureCache::~GSTextureCache()
RemoveAll();
m_surface_offset_cache.clear();
_aligned_free(s_unswizzle_buffer);
}
void GSTextureCache::RemovePartial()
{
//m_src.RemoveAll();
for (int type = 0; type < 2; type++)
{
for (auto t : m_dst[type])
delete t;
m_dst[type].clear();
}
}
void GSTextureCache::RemoveAll()
{
m_src.RemoveAll();
@ -85,6 +70,8 @@ void GSTextureCache::RemoveAll()
m_source_memory_usage = 0;
m_target_memory_usage = 0;
m_surface_offset_cache.clear();
}
void GSTextureCache::AddDirtyRectTarget(Target* target, GSVector4i rect, u32 psm, u32 bw)

View File

@ -395,7 +395,6 @@ public:
void Read(Target* t, const GSVector4i& r);
void Read(Source* t, const GSVector4i& r);
void RemoveAll();
void RemovePartial();
void AddDirtyRectTarget(Target* target, GSVector4i rect, u32 psm, u32 bw);
GSTexture* LookupPaletteSource(u32 CBP, u32 CPSM, u32 CBW, GSVector2i& offset, const GSVector2i& size);