From 9229c04ebf344f59246cc6f599dde5460a69a51a Mon Sep 17 00:00:00 2001 From: nmzik Date: Sun, 27 Sep 2026 15:43:37 +0400 Subject: [PATCH] samplerCache: handle reserved sampler anisotropy ratios Co-authored-by: EmK530 Co-authored-by: Hamza Shakir <60213466+hamzashakir99@users.noreply.github.com> --- src/graphics/host_gpu/renderer/cache/samplerCache.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/graphics/host_gpu/renderer/cache/samplerCache.cpp b/src/graphics/host_gpu/renderer/cache/samplerCache.cpp index ca010eae0..8eeddbc47 100644 --- a/src/graphics/host_gpu/renderer/cache/samplerCache.cpp +++ b/src/graphics/host_gpu/renderer/cache/samplerCache.cpp @@ -55,11 +55,9 @@ vk::Sampler SamplerCache::GetSampler(const ShaderSamplerResource& r) { case Prospero::SamplerAnisoRatio::kTwo: aniso_ratio = 2.0f; break; case Prospero::SamplerAnisoRatio::kFour: aniso_ratio = 4.0f; break; case Prospero::SamplerAnisoRatio::kEight: aniso_ratio = 8.0f; break; - case Prospero::SamplerAnisoRatio::kSixteen: aniso_ratio = 16.0f; break; - default: - EXIT("unknown ratio: %d dwords=%08x,%08x,%08x,%08x\n", - static_cast(r.MaxAnisoRatio()), r.fields[0], r.fields[1], r.fields[2], - r.fields[3]); + case Prospero::SamplerAnisoRatio::kSixteen: + // Reserved encodings 5-7 fall back to the maximum ratio. + default: aniso_ratio = 16.0f; break; } }