diff --git a/Core/Compatibility.cpp b/Core/Compatibility.cpp index f59a0da45b..b70d7e788b 100644 --- a/Core/Compatibility.cpp +++ b/Core/Compatibility.cpp @@ -117,6 +117,7 @@ void Compatibility::CheckSettings(IniFile &iniFile, const std::string &gameID) { CheckSetting(iniFile, gameID, "ForceLowerResolutionForEffectsOn", &flags_.ForceLowerResolutionForEffectsOn); CheckSetting(iniFile, gameID, "AllowDownloadCLUT", &flags_.AllowDownloadCLUT); CheckSetting(iniFile, gameID, "NearestFilteringOnFramebufferCreate", &flags_.NearestFilteringOnFramebufferCreate); + CheckSetting(iniFile, gameID, "SecondaryTextureCache", &flags_.SecondaryTextureCache); } void Compatibility::CheckVRSettings(IniFile &iniFile, const std::string &gameID) { diff --git a/Core/Compatibility.h b/Core/Compatibility.h index 5946f1633b..c37541ce7a 100644 --- a/Core/Compatibility.h +++ b/Core/Compatibility.h @@ -89,6 +89,7 @@ struct CompatFlags { bool ForceLowerResolutionForEffectsOn; bool AllowDownloadCLUT; bool NearestFilteringOnFramebufferCreate; + bool SecondaryTextureCache; }; struct VRCompat { diff --git a/Core/Config.cpp b/Core/Config.cpp index b8d1408144..0986474080 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -904,7 +904,6 @@ static ConfigSetting graphicsSettings[] = { ReportedConfigSetting("VertexDecCache", &g_Config.bVertexCache, false, true, true), ReportedConfigSetting("TextureBackoffCache", &g_Config.bTextureBackoffCache, false, true, true), - ReportedConfigSetting("TextureSecondaryCache", &g_Config.bTextureSecondaryCache, false, true, true), ReportedConfigSetting("VertexDecJit", &g_Config.bVertexDecoderJit, &DefaultCodeGen, false), #ifndef MOBILE_DEVICE diff --git a/Core/Config.h b/Core/Config.h index 1de62adf27..6dc1226858 100644 --- a/Core/Config.h +++ b/Core/Config.h @@ -199,7 +199,6 @@ public: bool bVertexCache; bool bTextureBackoffCache; - bool bTextureSecondaryCache; bool bVertexDecoderJit; bool bFullScreen; bool bFullScreenMulti; diff --git a/GPU/Common/TextureCacheCommon.cpp b/GPU/Common/TextureCacheCommon.cpp index e660bb20f8..53962e7644 100644 --- a/GPU/Common/TextureCacheCommon.cpp +++ b/GPU/Common/TextureCacheCommon.cpp @@ -767,7 +767,7 @@ void TextureCacheCommon::Decimate(bool forcePressure) { } // If enabled, we also need to clear the secondary cache. - if (g_Config.bTextureSecondaryCache && (forcePressure || secondCacheSizeEstimate_ >= TEXCACHE_SECOND_MIN_PRESSURE)) { + if (PSP_CoreParameter().compat.flags().SecondaryTextureCache && (forcePressure || secondCacheSizeEstimate_ >= TEXCACHE_SECOND_MIN_PRESSURE)) { const u32 had = secondCacheSizeEstimate_; for (TexCache::iterator iter = secondCache_.begin(); iter != secondCache_.end(); ) { @@ -2409,7 +2409,7 @@ bool TextureCacheCommon::CheckFullHash(TexCacheEntry *entry, bool &doDelete) { } // Don't give up just yet. Let's try the secondary cache if it's been invalidated before. - if (g_Config.bTextureSecondaryCache) { + if (PSP_CoreParameter().compat.flags().SecondaryTextureCache) { // Don't forget this one was unreliable (in case we match a secondary entry.) entry->status |= TexCacheEntry::STATUS_UNRELIABLE; diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index e46311870b..cf87f56f47 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -545,13 +545,6 @@ void GameSettingsScreen::CreateViews() { return UI::EVENT_CONTINUE; }); - CheckBox *texSecondary_ = graphicsSettings->Add(new CheckBox(&g_Config.bTextureSecondaryCache, gr->T("Retain changed textures", "Retain changed textures (speedup, mem hog)"))); - texSecondary_->OnClick.Add([=](EventParams &e) { - settingInfo_->Show(gr->T("RetainChangedTextures Tip", "Makes many games slower, but some games a lot faster"), e.v); - return UI::EVENT_CONTINUE; - }); - texSecondary_->SetDisabledPtr(&g_Config.bSoftwareRendering); - // Seems solid, so we hide the setting. /*CheckBox *vtxJit = graphicsSettings->Add(new CheckBox(&g_Config.bVertexDecoderJit, gr->T("Vertex Decoder JIT"))); diff --git a/assets/compat.ini b/assets/compat.ini index 2fbe053168..bfa2165a19 100644 --- a/assets/compat.ini +++ b/assets/compat.ini @@ -1240,3 +1240,15 @@ NPJH50366 = true [AllowDownloadCLUT] # Temporary compatibility option, while working on the GPU CLUT-from-framebuffer path. # Not required for any games now that it works, but might be useful for development. + +[SecondaryTextureCache] +# Was previously the "Retain changed textures" setting. +# See https://github.com/hrydgard/ppsspp/issues/16339#issuecomment-1304826656 + +# Popolocrois +UCJS10005 = true +UCAS40009 = true +ULUS10018 = true +UCJS18003 = true +ULES00291 = true +NPJG00033 = true diff --git a/libretro/libretro.cpp b/libretro/libretro.cpp index 3716f1989e..ec07b1dc67 100644 --- a/libretro/libretro.cpp +++ b/libretro/libretro.cpp @@ -850,15 +850,6 @@ static void check_variables(CoreParameter &coreParam) g_Config.bTextureBackoffCache = true; } - var.key = "ppsspp_retain_changed_textures"; - if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value) - { - if (!strcmp(var.value, "disabled")) - g_Config.bTextureSecondaryCache = false; - else - g_Config.bTextureSecondaryCache = true; - } - var.key = "ppsspp_spline_quality"; if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value) {