diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2020-06-18 10:43:06 +0200 |
---|---|---|
committer | Morph <39850852+Morph1984@users.noreply.github.com> | 2020-06-18 10:56:31 +0200 |
commit | 2f420618ea88c897b8607a2e1bfd0b34fa7c2017 (patch) | |
tree | d320a0a6ee2431270d497eb7f4f286bca1075208 /src | |
parent | maxwell_to_vk: Reorder filter cases and correct mipmap_filter=None (diff) | |
download | yuzu-2f420618ea88c897b8607a2e1bfd0b34fa7c2017.tar yuzu-2f420618ea88c897b8607a2e1bfd0b34fa7c2017.tar.gz yuzu-2f420618ea88c897b8607a2e1bfd0b34fa7c2017.tar.bz2 yuzu-2f420618ea88c897b8607a2e1bfd0b34fa7c2017.tar.lz yuzu-2f420618ea88c897b8607a2e1bfd0b34fa7c2017.tar.xz yuzu-2f420618ea88c897b8607a2e1bfd0b34fa7c2017.tar.zst yuzu-2f420618ea88c897b8607a2e1bfd0b34fa7c2017.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_sampler_cache.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/video_core/renderer_vulkan/vk_sampler_cache.cpp b/src/video_core/renderer_vulkan/vk_sampler_cache.cpp index e6f2fa553..616eacc36 100644 --- a/src/video_core/renderer_vulkan/vk_sampler_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_sampler_cache.cpp @@ -9,6 +9,8 @@ #include "video_core/renderer_vulkan/wrapper.h" #include "video_core/textures/texture.h" +using Tegra::Texture::TextureMipmapFilter; + namespace Vulkan { namespace { @@ -63,8 +65,8 @@ vk::Sampler VKSamplerCache::CreateSampler(const Tegra::Texture::TSCEntry& tsc) c ci.maxAnisotropy = tsc.GetMaxAnisotropy(); ci.compareEnable = tsc.depth_compare_enabled; ci.compareOp = MaxwellToVK::Sampler::DepthCompareFunction(tsc.depth_compare_func); - ci.minLod = tsc.GetMinLod(); - ci.maxLod = tsc.GetMaxLod(); + ci.minLod = tsc.mipmap_filter == TextureMipmapFilter::None ? 0.0f : tsc.GetMinLod(); + ci.maxLod = tsc.mipmap_filter == TextureMipmapFilter::None ? 0.25f : tsc.GetMaxLod(); ci.borderColor = arbitrary_borders ? VK_BORDER_COLOR_INT_CUSTOM_EXT : ConvertBorderColor(color); ci.unnormalizedCoordinates = VK_FALSE; return device.GetLogical().CreateSampler(ci); |