mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-11-18 12:04:17 +01:00
GS/HW: return iterator from RemoveFromHashCache
This commit is contained in:
1 parent
3eb2a2693f
commit
b97f652e3f
2 files changed
+4
-4
No files matched your search
@@ -6956,7 +6956,7 @@ GSTextureCache::HashCacheEntry* GSTextureCache::LookupHashCache(const GIFRegTEX0
|
||||
return &m_hash_cache.emplace(key, entry).first->second;
|
||||
}
|
||||
|
||||
void GSTextureCache::RemoveFromHashCache(HashCacheMap::iterator it)
|
||||
GSTextureCache::HashCacheMap::iterator GSTextureCache::RemoveFromHashCache(HashCacheMap::iterator it)
|
||||
{
|
||||
HashCacheEntry& e = it->second;
|
||||
const u32 mem_usage = e.texture->GetMemUsage();
|
||||
@@ -6965,7 +6965,7 @@ void GSTextureCache::RemoveFromHashCache(HashCacheMap::iterator it)
|
||||
else
|
||||
m_hash_cache_memory_usage -= mem_usage;
|
||||
g_gs_device->Recycle(e.texture);
|
||||
m_hash_cache.erase(it);
|
||||
return m_hash_cache.erase(it);
|
||||
}
|
||||
|
||||
void GSTextureCache::AgeHashCache()
|
||||
@@ -6992,7 +6992,7 @@ void GSTextureCache::AgeHashCache()
|
||||
|
||||
if (++e.age > MAX_HASH_CACHE_AGE)
|
||||
{
|
||||
RemoveFromHashCache(it++);
|
||||
it = RemoveFromHashCache(it);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -471,7 +471,7 @@ protected:
|
||||
bool PrepareDownloadTexture(u32 width, u32 height, GSTexture::Format format, std::unique_ptr<GSDownloadTexture>* tex);
|
||||
|
||||
HashCacheEntry* LookupHashCache(const GIFRegTEX0& TEX0, const GIFRegTEXA& TEXA, bool& paltex, const u32* clut, const GSVector2i* lod, SourceRegion region);
|
||||
void RemoveFromHashCache(HashCacheMap::iterator it);
|
||||
HashCacheMap::iterator RemoveFromHashCache(HashCacheMap::iterator it);
|
||||
void AgeHashCache();
|
||||
|
||||
static void PreloadTexture(const GIFRegTEX0& TEX0, const GIFRegTEXA& TEXA, SourceRegion region, GSLocalMemory& mem, bool paltex, GSTexture* tex, u32 level, std::pair<u8, u8>* alpha_minmax);
|
||||
|
||||
Reference in new issue
Block a user