From 2ce5dc3bbe4839a7cfa7b12b4e9bf7f35c2332c0 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Wed, 30 Dec 2020 14:57:32 +1000 Subject: [PATCH] Vulkan: Don't hardcode mipmap samplers to lod0 --- src/common/vulkan/builders.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/common/vulkan/builders.cpp b/src/common/vulkan/builders.cpp index c0947e457..13cf33597 100644 --- a/src/common/vulkan/builders.cpp +++ b/src/common/vulkan/builders.cpp @@ -454,6 +454,12 @@ void SamplerBuilder::SetLinearSampler(bool mipmaps, SetFilter(VK_FILTER_LINEAR, VK_FILTER_LINEAR, mipmaps ? VK_SAMPLER_MIPMAP_MODE_LINEAR : VK_SAMPLER_MIPMAP_MODE_NEAREST); SetAddressMode(address_mode, address_mode, address_mode); + + if (mipmaps) + { + m_ci.minLod = std::numeric_limits::min(); + m_ci.maxLod = std::numeric_limits::max(); + } } DescriptorSetUpdateBuilder::DescriptorSetUpdateBuilder()