From 1b05a548004a06057cccf634bc565d9b4e804d4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Fri, 26 May 2017 10:16:43 +0200 Subject: [PATCH] Remove the Mipmap setting. One step forward for #8171 --- Core/Config.cpp | 1 - Core/Config.h | 1 - GPU/Common/TextureCacheCommon.cpp | 2 +- GPU/D3D11/TextureCacheD3D11.cpp | 11 ++--------- GPU/Directx9/TextureCacheDX9.cpp | 11 ++--------- GPU/GLES/TextureCacheGLES.cpp | 11 ++--------- GPU/Software/Rasterizer.cpp | 6 +++--- GPU/Vulkan/TextureCacheVulkan.cpp | 8 +++----- UI/GameSettingsScreen.cpp | 1 - headless/Headless.cpp | 1 - 10 files changed, 13 insertions(+), 40 deletions(-) diff --git a/Core/Config.cpp b/Core/Config.cpp index f06b99c9d81a..1e989bf19f4b 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -523,7 +523,6 @@ static ConfigSetting graphicsSettings[] = { ConfigSetting("ImmersiveMode", &g_Config.bImmersiveMode, false, true, true), ReportedConfigSetting("TrueColor", &g_Config.bTrueColor, true, true, true), - ReportedConfigSetting("MipMap", &g_Config.bMipMap, true, true, true), ReportedConfigSetting("ReplaceTextures", &g_Config.bReplaceTextures, true, true, true), ReportedConfigSetting("SaveNewTextures", &g_Config.bSaveNewTextures, false, true, true), diff --git a/Core/Config.h b/Core/Config.h index d598989cfed6..3358b652f5db 100644 --- a/Core/Config.h +++ b/Core/Config.h @@ -193,7 +193,6 @@ struct Config { int iAnisotropyLevel; // 0 - 5, powers of 2: 0 = 1x = no aniso int bHighQualityDepth; bool bTrueColor; - bool bMipMap; bool bReplaceTextures; bool bSaveNewTextures; int iTexScalingLevel; // 1 = off, 2 = 2x, ..., 5 = 5x diff --git a/GPU/Common/TextureCacheCommon.cpp b/GPU/Common/TextureCacheCommon.cpp index ca676290c735..7c3eb43da84a 100644 --- a/GPU/Common/TextureCacheCommon.cpp +++ b/GPU/Common/TextureCacheCommon.cpp @@ -153,7 +153,7 @@ void TextureCacheCommon::GetSamplingParams(int &minFilt, int &magFilt, bool &sCl } // If mip level is forced to zero, disable mipmapping. - bool noMip = !g_Config.bMipMap || maxLevel == 0 || (!autoMip && lodBias <= 0.0f); + bool noMip = maxLevel == 0 || (!autoMip && lodBias <= 0.0f); if (IsFakeMipmapChange()) noMip = noMip || !autoMip; diff --git a/GPU/D3D11/TextureCacheD3D11.cpp b/GPU/D3D11/TextureCacheD3D11.cpp index 59b1775b18f4..edb91563af51 100644 --- a/GPU/D3D11/TextureCacheD3D11.cpp +++ b/GPU/D3D11/TextureCacheD3D11.cpp @@ -510,11 +510,6 @@ void TextureCacheD3D11::BuildTexture(TexCacheEntry *const entry, bool replaceIma } } - // In addition, simply don't load more than level 0 if g_Config.bMipMap is false. - if (!g_Config.bMipMap) { - maxLevel = 0; - } - // If GLES3 is available, we can preallocate the storage, which makes texture loading more efficient. DXGI_FORMAT dstFmt = GetDestFormat(GETextureFormat(entry->format), gstate.getClutPaletteFormat()); @@ -539,10 +534,8 @@ void TextureCacheD3D11::BuildTexture(TexCacheEntry *const entry, bool replaceIma // We're replacing, so we won't scale. scaleFactor = 1; entry->status |= TexCacheEntry::STATUS_IS_SCALED; - if (g_Config.bMipMap) { - maxLevel = replaced.MaxLevel(); - badMipSizes = false; - } + maxLevel = replaced.MaxLevel(); + badMipSizes = false; } // Don't scale the PPGe texture. diff --git a/GPU/Directx9/TextureCacheDX9.cpp b/GPU/Directx9/TextureCacheDX9.cpp index 688b01212f76..2a2f5326861b 100644 --- a/GPU/Directx9/TextureCacheDX9.cpp +++ b/GPU/Directx9/TextureCacheDX9.cpp @@ -515,11 +515,6 @@ void TextureCacheDX9::BuildTexture(TexCacheEntry *const entry, bool replaceImage } } - // In addition, simply don't load more than level 0 if g_Config.bMipMap is false. - if (!g_Config.bMipMap) { - maxLevel = 0; - } - // If GLES3 is available, we can preallocate the storage, which makes texture loading more efficient. D3DFORMAT dstFmt = GetDestFormat(GETextureFormat(entry->format), gstate.getClutPaletteFormat()); @@ -544,10 +539,8 @@ void TextureCacheDX9::BuildTexture(TexCacheEntry *const entry, bool replaceImage // We're replacing, so we won't scale. scaleFactor = 1; entry->status |= TexCacheEntry::STATUS_IS_SCALED; - if (g_Config.bMipMap) { - maxLevel = replaced.MaxLevel(); - badMipSizes = false; - } + maxLevel = replaced.MaxLevel(); + badMipSizes = false; } // Don't scale the PPGe texture. diff --git a/GPU/GLES/TextureCacheGLES.cpp b/GPU/GLES/TextureCacheGLES.cpp index c1d9eaf8bc03..732f6e61dec7 100644 --- a/GPU/GLES/TextureCacheGLES.cpp +++ b/GPU/GLES/TextureCacheGLES.cpp @@ -595,11 +595,6 @@ void TextureCacheGLES::BuildTexture(TexCacheEntry *const entry, bool replaceImag } } - // In addition, simply don't load more than level 0 if g_Config.bMipMap is false. - if (!g_Config.bMipMap) { - maxLevel = 0; - } - // If GLES3 is available, we can preallocate the storage, which makes texture loading more efficient. GLenum dstFmt = GetDestFormat(GETextureFormat(entry->format), gstate.getClutPaletteFormat()); @@ -626,10 +621,8 @@ void TextureCacheGLES::BuildTexture(TexCacheEntry *const entry, bool replaceImag // We're replacing, so we won't scale. scaleFactor = 1; entry->status |= TexCacheEntry::STATUS_IS_SCALED; - if (g_Config.bMipMap) { - maxLevel = replaced.MaxLevel(); - badMipSizes = false; - } + maxLevel = replaced.MaxLevel(); + badMipSizes = false; } // Don't scale the PPGe texture. diff --git a/GPU/Software/Rasterizer.cpp b/GPU/Software/Rasterizer.cpp index 97be186804be..8fe3fbd99979 100644 --- a/GPU/Software/Rasterizer.cpp +++ b/GPU/Software/Rasterizer.cpp @@ -1350,7 +1350,7 @@ void DrawTriangleSlice( int maxTexLevel = gstate.getTextureMaxLevel(); u8 *texptr[8] = {NULL}; - if ((gstate.texfilter & 4) == 0 || !g_Config.bMipMap) { + if ((gstate.texfilter & 4) == 0) { // No mipmapping enabled maxTexLevel = 0; } @@ -1570,7 +1570,7 @@ void DrawPoint(const VertexData &v0) magFilt = 1; } } - if ((gstate.texfilter & 4) == 0 || !g_Config.bMipMap) { + if ((gstate.texfilter & 4) == 0) { // No mipmapping enabled maxTexLevel = 0; } @@ -1643,7 +1643,7 @@ void DrawLine(const VertexData &v0, const VertexData &v1) int maxTexLevel = gstate.getTextureMaxLevel(); u8 *texptr[8] = {NULL}; - if ((gstate.texfilter & 4) == 0 || !g_Config.bMipMap) { + if ((gstate.texfilter & 4) == 0) { // No mipmapping enabled maxTexLevel = 0; } diff --git a/GPU/Vulkan/TextureCacheVulkan.cpp b/GPU/Vulkan/TextureCacheVulkan.cpp index e3af9dd032bb..fd59be053e6e 100644 --- a/GPU/Vulkan/TextureCacheVulkan.cpp +++ b/GPU/Vulkan/TextureCacheVulkan.cpp @@ -515,7 +515,7 @@ void TextureCacheVulkan::BuildTexture(TexCacheEntry *const entry, bool replaceIm } // In addition, simply don't load more than level 0 if g_Config.bMipMap is false. - if (!g_Config.bMipMap || badMipSizes) { + if (badMipSizes) { maxLevel = 0; } @@ -538,10 +538,8 @@ void TextureCacheVulkan::BuildTexture(TexCacheEntry *const entry, bool replaceIm // We're replacing, so we won't scale. scaleFactor = 1; entry->status |= TexCacheEntry::STATUS_IS_SCALED; - if (g_Config.bMipMap) { - maxLevel = replaced.MaxLevel(); - badMipSizes = false; - } + maxLevel = replaced.MaxLevel(); + badMipSizes = false; } // Don't scale the PPGe texture. diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index 8ecca8339a35..abeb2acfe0e6 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -293,7 +293,6 @@ void GameSettingsScreen::CreateViews() { #ifdef _WIN32 graphicsSettings->Add(new CheckBox(&g_Config.bVSync, gr->T("VSync"))); #endif - graphicsSettings->Add(new CheckBox(&g_Config.bMipMap, gr->T("Mipmapping"))); CheckBox *hwTransform = graphicsSettings->Add(new CheckBox(&g_Config.bHardwareTransform, gr->T("Hardware Transform"))); hwTransform->OnClick.Handle(this, &GameSettingsScreen::OnHardwareTransform); diff --git a/headless/Headless.cpp b/headless/Headless.cpp index 6f59f23ad69a..19a7f42a6199 100644 --- a/headless/Headless.cpp +++ b/headless/Headless.cpp @@ -365,7 +365,6 @@ int main(int argc, const char* argv[]) g_Config.bVertexDecoderJit = true; g_Config.bBlockTransferGPU = true; g_Config.iSplineBezierQuality = 2; - g_Config.bMipMap = true; #ifdef _WIN32 InitSysDirectories();