mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-29 09:13:39 +01:00
Centralize DeleteTexture
This commit is contained in:
1 parent
dbafc6ef95
commit
665ffe34ab
10 files changed
+19
-59
No files matched your search
@@ -101,17 +101,6 @@ void TextureCacheGLES::Clear(bool delete_them) {
|
||||
}
|
||||
}
|
||||
|
||||
void TextureCacheGLES::DeleteTexture(TexCache::iterator it) {
|
||||
glDeleteTextures(1, &it->second.textureName);
|
||||
auto fbInfo = fbTexInfo_.find(it->first);
|
||||
if (fbInfo != fbTexInfo_.end()) {
|
||||
fbTexInfo_.erase(fbInfo);
|
||||
}
|
||||
|
||||
cacheSizeEstimate_ -= EstimateTexMemoryUsage(&it->second);
|
||||
cache.erase(it);
|
||||
}
|
||||
|
||||
// Removes old textures.
|
||||
void TextureCacheGLES::Decimate() {
|
||||
if (--decimationCounter_ <= 0) {
|
||||
@@ -354,10 +343,6 @@ void TextureCacheGLES::UpdateCurrentClut(GEPaletteFormat clutFormat, u32 clutBas
|
||||
clutLastFormat_ = gstate.clutformat;
|
||||
}
|
||||
|
||||
inline u32 TextureCacheGLES::GetCurrentClutHash() {
|
||||
return clutHash_;
|
||||
}
|
||||
|
||||
// #define DEBUG_TEXTURES
|
||||
|
||||
#ifdef DEBUG_TEXTURES
|
||||
@@ -703,7 +688,7 @@ void TextureCacheGLES::SetTexture(bool force) {
|
||||
// We update here because the clut format can be specified after the load.
|
||||
UpdateCurrentClut(gstate.getClutPaletteFormat(), gstate.getClutIndexStartPos(), gstate.isClutIndexSimple());
|
||||
}
|
||||
cluthash = GetCurrentClutHash() ^ gstate.clutformat;
|
||||
cluthash = clutHash_ ^ gstate.clutformat;
|
||||
} else {
|
||||
cluthash = 0;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user