mirror of https://github.com/PCSX2/pcsx2.git
GS/TextureCache: Don't let hash cache memusage go negative
This commit is contained in:
parent
11918e5846
commit
0c98b5ff76
|
@ -1138,7 +1138,9 @@ void GSTextureCache::IncAge()
|
||||||
HashCacheEntry& e = it->second;
|
HashCacheEntry& e = it->second;
|
||||||
if (e.refcount == 0 && ++e.age > max_hash_cache_age)
|
if (e.refcount == 0 && ++e.age > max_hash_cache_age)
|
||||||
{
|
{
|
||||||
|
if (!e.is_replacement)
|
||||||
m_hash_cache_memory_usage -= e.texture->GetMemUsage();
|
m_hash_cache_memory_usage -= e.texture->GetMemUsage();
|
||||||
|
|
||||||
g_gs_device->Recycle(e.texture);
|
g_gs_device->Recycle(e.texture);
|
||||||
m_hash_cache.erase(it++);
|
m_hash_cache.erase(it++);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue