mirror of
https://github.com/libretro/ppsspp.git
synced 2024-11-26 01:40:24 +00:00
Merge pull request #2249 from unknownbrackets/texcache
Re-enable subimage optimization with scaling check
This commit is contained in:
commit
3908bf537f
@ -1030,20 +1030,17 @@ void TextureCache::SetTexture() {
|
||||
entry->numInvalidated++;
|
||||
gpuStats.numTextureInvalidations++;
|
||||
INFO_LOG(G3D, "Texture different or overwritten, reloading at %08x", texaddr);
|
||||
if (entry->texture == lastBoundTexture) {
|
||||
lastBoundTexture = -1;
|
||||
}
|
||||
if (doDelete) {
|
||||
// TODO: This stuff is missing some check, its causes corruption. See issue #2222 .
|
||||
/*
|
||||
if (entry->maxLevel == maxLevel && entry->dim == (gstate.texsize[0] & 0xF0F)) {
|
||||
if (entry->maxLevel == maxLevel && entry->dim == (gstate.texsize[0] & 0xF0F) && entry->format == format) {
|
||||
// Actually, if size and number of levels match, let's try to avoid deleting and recreating.
|
||||
// Instead, let's use glTexSubImage to replace the images.
|
||||
replaceImages = true;
|
||||
replaceImages = g_Config.iTexScalingLevel <= 1;
|
||||
} else {
|
||||
if (entry->texture == lastBoundTexture) {
|
||||
lastBoundTexture = -1;
|
||||
}
|
||||
glDeleteTextures(1, &entry->texture);
|
||||
}*/
|
||||
glDeleteTextures(1, &entry->texture);
|
||||
}
|
||||
}
|
||||
if (entry->status == TexCacheEntry::STATUS_RELIABLE) {
|
||||
entry->status = TexCacheEntry::STATUS_HASHING;
|
||||
|
Loading…
Reference in New Issue
Block a user