From 887f6101d526bd86cd0f935cddf98991a649df98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 5 Oct 2021 20:41:40 +0200 Subject: [PATCH] Remove the "Auto" texture scale factor. It's a performance trap and not really useful. --- GPU/Common/TextureCacheCommon.cpp | 19 +------------------ UI/GameSettingsScreen.cpp | 6 +++--- 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/GPU/Common/TextureCacheCommon.cpp b/GPU/Common/TextureCacheCommon.cpp index 0f48ac1b95..4b872306b0 100644 --- a/GPU/Common/TextureCacheCommon.cpp +++ b/GPU/Common/TextureCacheCommon.cpp @@ -1082,24 +1082,7 @@ bool TextureCacheCommon::SetOffsetTexture(u32 yOffset) { } void TextureCacheCommon::NotifyConfigChanged() { - int scaleFactor; - - // 0 means automatic texture scaling, up to 5x, based on resolution. - if (g_Config.iTexScalingLevel == 0) { - scaleFactor = g_Config.iInternalResolution; - // Automatic resolution too? Okay. - if (scaleFactor == 0) { - if (!g_Config.IsPortrait()) { - scaleFactor = (PSP_CoreParameter().pixelWidth + 479) / 480; - } else { - scaleFactor = (PSP_CoreParameter().pixelHeight + 479) / 480; - } - } - - scaleFactor = std::min(5, scaleFactor); - } else { - scaleFactor = g_Config.iTexScalingLevel; - } + int scaleFactor = g_Config.iTexScalingLevel; if (!gstate_c.Supports(GPU_SUPPORTS_TEXTURE_NPOT)) { // Reduce the scale factor to a power of two (e.g. 2 or 4) if textures must be a power of two. diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index c876ac3b50..99fb151b9f 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -531,12 +531,12 @@ void GameSettingsScreen::CreateViews() { // graphicsSettings->Add(new CheckBox(&g_Config.bFXAA, gr->T("FXAA"))); graphicsSettings->Add(new ItemHeader(gr->T("Texture Scaling"))); #ifndef MOBILE_DEVICE - static const char *texScaleLevels[] = {"Auto", "Off", "2x", "3x", "4x", "5x"}; + static const char *texScaleLevels[] = {"Off", "2x", "3x", "4x", "5x"}; #else - static const char *texScaleLevels[] = {"Auto", "Off", "2x", "3x"}; + static const char *texScaleLevels[] = {"Off", "2x", "3x"}; #endif - PopupMultiChoice *texScalingChoice = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iTexScalingLevel, gr->T("Upscale Level"), texScaleLevels, 0, ARRAY_SIZE(texScaleLevels), gr->GetName(), screenManager())); + PopupMultiChoice *texScalingChoice = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iTexScalingLevel, gr->T("Upscale Level"), texScaleLevels, 1, ARRAY_SIZE(texScaleLevels), gr->GetName(), screenManager())); // TODO: Better check? When it won't work, it scales down anyway. if (!gl_extensions.OES_texture_npot && GetGPUBackend() == GPUBackend::OPENGL) { texScalingChoice->HideChoice(3); // 3x