diff --git a/GPU/D3D11/TextureCacheD3D11.cpp b/GPU/D3D11/TextureCacheD3D11.cpp index 24f20071a5..be61a5ae48 100644 --- a/GPU/D3D11/TextureCacheD3D11.cpp +++ b/GPU/D3D11/TextureCacheD3D11.cpp @@ -447,7 +447,10 @@ void TextureCacheD3D11::BuildTexture(TexCacheEntry *const entry) { // Adjust maxLevel to actually present levels.. bool badMipSizes = false; + + // maxLevel here is the max level to upload. Not the count. int maxLevel = entry->maxLevel; + for (int i = 0; i <= maxLevel; i++) { // If encountering levels pointing to nothing, adjust max level. u32 levelTexaddr = gstate.getTextureAddress(i); diff --git a/GPU/Vulkan/TextureCacheVulkan.cpp b/GPU/Vulkan/TextureCacheVulkan.cpp index e2a02e3497..c009cce9a5 100644 --- a/GPU/Vulkan/TextureCacheVulkan.cpp +++ b/GPU/Vulkan/TextureCacheVulkan.cpp @@ -754,12 +754,9 @@ void TextureCacheVulkan::BuildTexture(TexCacheEntry *const entry) { if (g_Config.iTexFiltering == TEX_FILTER_AUTO_MAX_QUALITY) { // Boost the number of mipmaps. int maxPossibleMipmaps = log2i(std::min(gstate.getTextureWidth(0), gstate.getTextureHeight(0))); - if (maxPossibleMipmaps != maxLevelToGenerate) { - maxLevelToGenerate = maxPossibleMipmaps; - } + maxLevelToGenerate = maxPossibleMipmaps; } - // If GLES3 is available, we can preallocate the storage, which makes texture loading more efficient. VkFormat dstFmt = GetDestFormat(GETextureFormat(entry->format), gstate.getClutPaletteFormat()); @@ -807,7 +804,8 @@ void TextureCacheVulkan::BuildTexture(TexCacheEntry *const entry) { } } - // TODO + // TODO: Support mip levels for upscaled images. + // Probably can just remove this check? if (scaleFactor > 1) { maxLevel = 0; } diff --git a/Windows/MainWindowMenu.cpp b/Windows/MainWindowMenu.cpp index a4c958fde3..dac18e2a1e 100644 --- a/Windows/MainWindowMenu.cpp +++ b/Windows/MainWindowMenu.cpp @@ -325,6 +325,7 @@ namespace MainWindow { TranslateMenuItem(menu, ID_OPTIONS_TEXTUREFILTERING_AUTO); TranslateMenuItem(menu, ID_OPTIONS_NEARESTFILTERING); TranslateMenuItem(menu, ID_OPTIONS_LINEARFILTERING); + TranslateMenuItem(menu, ID_OPTIONS_AUTOMAXQUALITYFILTERING); TranslateMenuItem(menu, ID_OPTIONS_SCREENFILTER_MENU); TranslateMenuItem(menu, ID_OPTIONS_BUFLINEARFILTER); TranslateMenuItem(menu, ID_OPTIONS_BUFNEARESTFILTER); @@ -979,9 +980,10 @@ namespace MainWindow { g_Config.iShowFPSCounter = g_Config.iShowFPSCounter ? 0 : 3; // 3 = both speed and FPS break; - case ID_OPTIONS_TEXTUREFILTERING_AUTO: setTexFiltering(TEX_FILTER_AUTO); break; - case ID_OPTIONS_NEARESTFILTERING: setTexFiltering(TEX_FILTER_FORCE_NEAREST); break; - case ID_OPTIONS_LINEARFILTERING: setTexFiltering(TEX_FILTER_FORCE_LINEAR); break; + case ID_OPTIONS_TEXTUREFILTERING_AUTO: setTexFiltering(TEX_FILTER_AUTO); break; + case ID_OPTIONS_NEARESTFILTERING: setTexFiltering(TEX_FILTER_FORCE_NEAREST); break; + case ID_OPTIONS_LINEARFILTERING: setTexFiltering(TEX_FILTER_FORCE_LINEAR); break; + case ID_OPTIONS_AUTOMAXQUALITYFILTERING: setTexFiltering(TEX_FILTER_AUTO_MAX_QUALITY); break; case ID_OPTIONS_BUFLINEARFILTER: setBufFilter(SCALE_LINEAR); break; case ID_OPTIONS_BUFNEARESTFILTER: setBufFilter(SCALE_NEAREST); break;