summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_vulkan
diff options
context:
space:
mode:
authorWollnashorn <Wollnashorn@users.noreply.github.com>2023-06-15 18:46:40 +0200
committerWollnashorn <Wollnashorn@users.noreply.github.com>2023-06-15 18:46:40 +0200
commit3e8cd91d548433344d9c479bb7ad83a3bf1560c1 (patch)
treea1b04a5ea149d6b45ad52f1fcd01733740552e30 /src/video_core/renderer_vulkan
parentvideo_core: Add per-image anisotropy heuristics (format & mip count) (diff)
downloadyuzu-3e8cd91d548433344d9c479bb7ad83a3bf1560c1.tar
yuzu-3e8cd91d548433344d9c479bb7ad83a3bf1560c1.tar.gz
yuzu-3e8cd91d548433344d9c479bb7ad83a3bf1560c1.tar.bz2
yuzu-3e8cd91d548433344d9c479bb7ad83a3bf1560c1.tar.lz
yuzu-3e8cd91d548433344d9c479bb7ad83a3bf1560c1.tar.xz
yuzu-3e8cd91d548433344d9c479bb7ad83a3bf1560c1.tar.zst
yuzu-3e8cd91d548433344d9c479bb7ad83a3bf1560c1.zip
Diffstat (limited to 'src/video_core/renderer_vulkan')
-rw-r--r--src/video_core/renderer_vulkan/vk_texture_cache.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.cpp b/src/video_core/renderer_vulkan/vk_texture_cache.cpp
index 0e8f8a064..8ec181335 100644
--- a/src/video_core/renderer_vulkan/vk_texture_cache.cpp
+++ b/src/video_core/renderer_vulkan/vk_texture_cache.cpp
@@ -1802,7 +1802,7 @@ Sampler::Sampler(TextureCacheRuntime& runtime, const Tegra::Texture::TSCEntry& t
// Some games have samplers with garbage. Sanitize them here.
const f32 max_anisotropy = std::clamp(tsc.MaxAnisotropy(), 1.0f, 16.0f);
- const auto create_sampler = [&](const f32 max_anisotropy) {
+ const auto create_sampler = [&](const f32 anisotropy) {
return device.GetLogical().CreateSampler(VkSamplerCreateInfo{
.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO,
.pNext = pnext,
@@ -1814,8 +1814,8 @@ Sampler::Sampler(TextureCacheRuntime& runtime, const Tegra::Texture::TSCEntry& t
.addressModeV = MaxwellToVK::Sampler::WrapMode(device, tsc.wrap_v, tsc.mag_filter),
.addressModeW = MaxwellToVK::Sampler::WrapMode(device, tsc.wrap_p, tsc.mag_filter),
.mipLodBias = tsc.LodBias(),
- .anisotropyEnable = static_cast<VkBool32>(max_anisotropy > 1.0f ? VK_TRUE : VK_FALSE),
- .maxAnisotropy = max_anisotropy,
+ .anisotropyEnable = static_cast<VkBool32>(anisotropy > 1.0f ? VK_TRUE : VK_FALSE),
+ .maxAnisotropy = anisotropy,
.compareEnable = tsc.depth_compare_enabled,
.compareOp = MaxwellToVK::Sampler::DepthCompareFunction(tsc.depth_compare_func),
.minLod = tsc.mipmap_filter == TextureMipmapFilter::None ? 0.0f : tsc.MinLod(),