mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-27 15:30:35 +00:00
If an entry already exists in the secondary texture cache, delete it properly. Fixes #9503
This commit is contained in:
parent
67fb745278
commit
c8187dd35c
@ -1484,6 +1484,13 @@ bool TextureCacheCommon::CheckFullHash(TexCacheEntry *entry, bool &doDelete) {
|
||||
} else {
|
||||
secondKey = entry->fullhash | ((u64)entry->cluthash << 32);
|
||||
secondCacheSizeEstimate_ += EstimateTexMemoryUsage(entry);
|
||||
|
||||
// If the entry already exists in the secondary texture cache, drop it nicely.
|
||||
auto oldIter = secondCache_.find(secondKey);
|
||||
if (oldIter != secondCache_.end()) {
|
||||
ReleaseTexture(oldIter->second.get(), true);
|
||||
}
|
||||
|
||||
// Is this wise? We simply copy the entry.
|
||||
secondCache_[secondKey].reset(new TexCacheEntry(*entry));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user