mirror of https://github.com/PCSX2/pcsx2.git
GS/TextureCache: Clear surface offset cache on reset
Also get rid of RemovePartial(), it's never called.
This commit is contained in:
parent
d00845f56b
commit
d0a933cda8
|
@ -43,24 +43,9 @@ GSTextureCache::~GSTextureCache()
|
||||||
|
|
||||||
RemoveAll();
|
RemoveAll();
|
||||||
|
|
||||||
m_surface_offset_cache.clear();
|
|
||||||
|
|
||||||
_aligned_free(s_unswizzle_buffer);
|
_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()
|
void GSTextureCache::RemoveAll()
|
||||||
{
|
{
|
||||||
m_src.RemoveAll();
|
m_src.RemoveAll();
|
||||||
|
@ -85,6 +70,8 @@ void GSTextureCache::RemoveAll()
|
||||||
|
|
||||||
m_source_memory_usage = 0;
|
m_source_memory_usage = 0;
|
||||||
m_target_memory_usage = 0;
|
m_target_memory_usage = 0;
|
||||||
|
|
||||||
|
m_surface_offset_cache.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GSTextureCache::AddDirtyRectTarget(Target* target, GSVector4i rect, u32 psm, u32 bw)
|
void GSTextureCache::AddDirtyRectTarget(Target* target, GSVector4i rect, u32 psm, u32 bw)
|
||||||
|
|
|
@ -395,7 +395,6 @@ public:
|
||||||
void Read(Target* t, const GSVector4i& r);
|
void Read(Target* t, const GSVector4i& r);
|
||||||
void Read(Source* t, const GSVector4i& r);
|
void Read(Source* t, const GSVector4i& r);
|
||||||
void RemoveAll();
|
void RemoveAll();
|
||||||
void RemovePartial();
|
|
||||||
void AddDirtyRectTarget(Target* target, GSVector4i rect, u32 psm, u32 bw);
|
void AddDirtyRectTarget(Target* target, GSVector4i rect, u32 psm, u32 bw);
|
||||||
|
|
||||||
GSTexture* LookupPaletteSource(u32 CBP, u32 CPSM, u32 CBW, GSVector2i& offset, const GSVector2i& size);
|
GSTexture* LookupPaletteSource(u32 CBP, u32 CPSM, u32 CBW, GSVector2i& offset, const GSVector2i& size);
|
||||||
|
|
Loading…
Reference in New Issue