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 2015-03-15 09:10:09 -07:00
parent 1f987ef6fc
commit 7ee9112425
2 changed files with 8 additions and 4 deletions

View File

@ -1212,8 +1212,10 @@ void TextureCacheDX9::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) {

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) {