From 37e5aaa34acb2d95ec8b6d512986709a34d1464c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 15 Apr 2025 11:10:36 +0200 Subject: [PATCH] Vulkan: Auto Max Quality: Avoid conflict between aniso filtering and nearest filtering. Fixes #19555 --- GPU/Common/TextureCacheCommon.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/GPU/Common/TextureCacheCommon.cpp b/GPU/Common/TextureCacheCommon.cpp index bd15b25943..5eccb78e49 100644 --- a/GPU/Common/TextureCacheCommon.cpp +++ b/GPU/Common/TextureCacheCommon.cpp @@ -272,13 +272,19 @@ SamplerCacheKey TextureCacheCommon::GetSamplingParams(int maxLevel, const TexCac case TEX_FILTER_AUTO_MAX_QUALITY: default: forceFiltering = TEX_FILTER_AUTO_MAX_QUALITY; + if (gstate_c.Use(GPU_USE_ANISOTROPY) && g_Config.iAnisotropyLevel > 0) { + key.aniso = true; + } if (gstate.isModeThrough() && g_Config.iInternalResolution != 1) { bool uglyColorTest = gstate.isColorTestEnabled() && !IsColorTestTriviallyTrue() && gstate.getColorTestRef() != 0; - if (uglyColorTest) + if (uglyColorTest) { forceFiltering = TEX_FILTER_FORCE_NEAREST; + key.aniso = false; + } } if (gstate_c.pixelMapped) { forceFiltering = TEX_FILTER_FORCE_NEAREST; + key.aniso = false; } break; } @@ -304,9 +310,6 @@ SamplerCacheKey TextureCacheCommon::GetSamplingParams(int maxLevel, const TexCac key.mipFilt = 1; key.maxLevel = 9 * 256; key.lodBias = 0.0f; - if (gstate_c.Use(GPU_USE_ANISOTROPY) && g_Config.iAnisotropyLevel > 0) { - key.aniso = true; - } break; }