Avoid constant reload of frequently changed tex.

If we detect that it's frequently changing, this will cause it to spiral
into an infinite loop of staying frequently changing and reloading to try
to scale.
This commit is contained in:
Unknown W. Brackets committed 2015-03-15 09:10:09 -07:00
1 parent 1f987ef6fc
commit 7ee9112425
2 files changed
+8 -4

No files matched your search

+4 -2
View File
@@ -1385,8 +1385,10 @@ void TextureCache::SetTexture(bool force) {
}
if (match && (entry->status & TexCacheEntry::STATUS_TO_SCALE) && g_Config.iTexScalingLevel != 1 && texelsScaledThisFrame_ < TEXCACHE_MAX_TEXELS_SCALED) {
// INFO_LOG(G3D, "Reloading texture to do the scaling we skipped..");
match = false;
if ((entry->status & TexCacheEntry::STATUS_CHANGE_FREQUENT) == 0) {
// INFO_LOG(G3D, "Reloading texture to do the scaling we skipped..");
match = false;
}
}
if (match) {