diff --git a/src/video_core/amdgpu/resource.h b/src/video_core/amdgpu/resource.h index 58b286e9c..6bbe1fb7e 100644 --- a/src/video_core/amdgpu/resource.h +++ b/src/video_core/amdgpu/resource.h @@ -447,7 +447,7 @@ struct Sampler { } float MaxAniso() const { - switch (max_aniso) { + switch (max_aniso.Value()) { case AnisoRatio::One: return 1.0f; case AnisoRatio::Two: diff --git a/src/video_core/texture_cache/sampler.cpp b/src/video_core/texture_cache/sampler.cpp index 5ce10ff0e..8dbdd2912 100644 --- a/src/video_core/texture_cache/sampler.cpp +++ b/src/video_core/texture_cache/sampler.cpp @@ -18,7 +18,8 @@ Sampler::Sampler(const Vulkan::Instance& instance, const AmdGpu::Sampler& sample (AmdGpu::IsAnisoFilter(sampler.xy_mag_filter) || AmdGpu::IsAnisoFilter(sampler.xy_min_filter)); const float maxAnisotropy = - std::clamp(sampler.MaxAniso(), 1.0f, instance.MaxSamplerAnisotropy()); + anisotropyEnable ? std::clamp(sampler.MaxAniso(), 1.0f, instance.MaxSamplerAnisotropy()) + : 1.0f; const vk::SamplerCreateInfo sampler_ci = { .magFilter = LiverpoolToVK::Filter(sampler.xy_mag_filter), .minFilter = LiverpoolToVK::Filter(sampler.xy_min_filter),