diff options
| author | JMC47 <JMC4789@gmail.com> | 2021-11-18 13:08:23 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-18 13:08:23 -0500 |
| commit | 6f4bbac528682389e34a1a4985820ee5137619c7 (patch) | |
| tree | 9f07e21fa1da14c7485fddac611a2618888afcf0 /Source/Core/VideoBackends/Vulkan/ObjectCache.cpp | |
| parent | 8b57aad8edd82ccc414775d22e96d896bcac6176 (diff) | |
| parent | 95b99410443e7ae47df1f3e9436e275c80dd3678 (diff) | |
Merge pull request #9956 from Pokechu22/non-power-of-2-wrap-2
VideoCommon: Manually handle texture wrapping and sampling
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan/ObjectCache.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Vulkan/ObjectCache.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/ObjectCache.cpp b/Source/Core/VideoBackends/Vulkan/ObjectCache.cpp index a1ccdd6f30..fd296457e4 100644 --- a/Source/Core/VideoBackends/Vulkan/ObjectCache.cpp +++ b/Source/Core/VideoBackends/Vulkan/ObjectCache.cpp @@ -315,28 +315,28 @@ VkSampler ObjectCache::GetSampler(const SamplerState& info) VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT}}; VkSamplerCreateInfo create_info = { - VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO, // VkStructureType sType - nullptr, // const void* pNext - 0, // VkSamplerCreateFlags flags - filters[static_cast<u32>(info.mag_filter.Value())], // VkFilter magFilter - filters[static_cast<u32>(info.min_filter.Value())], // VkFilter minFilter - mipmap_modes[static_cast<u32>(info.mipmap_filter.Value())], // VkSamplerMipmapMode mipmapMode - address_modes[static_cast<u32>(info.wrap_u.Value())], // VkSamplerAddressMode addressModeU - address_modes[static_cast<u32>(info.wrap_v.Value())], // VkSamplerAddressMode addressModeV - VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, // VkSamplerAddressMode addressModeW - info.lod_bias / 256.0f, // float mipLodBias + VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO, // VkStructureType sType + nullptr, // const void* pNext + 0, // VkSamplerCreateFlags flags + filters[u32(info.tm0.mag_filter.Value())], // VkFilter magFilter + filters[u32(info.tm0.min_filter.Value())], // VkFilter minFilter + mipmap_modes[u32(info.tm0.mipmap_filter.Value())], // VkSamplerMipmapMode mipmapMode + address_modes[u32(info.tm0.wrap_u.Value())], // VkSamplerAddressMode addressModeU + address_modes[u32(info.tm0.wrap_v.Value())], // VkSamplerAddressMode addressModeV + VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, // VkSamplerAddressMode addressModeW + info.tm0.lod_bias / 256.0f, // float mipLodBias VK_FALSE, // VkBool32 anisotropyEnable 0.0f, // float maxAnisotropy VK_FALSE, // VkBool32 compareEnable VK_COMPARE_OP_ALWAYS, // VkCompareOp compareOp - info.min_lod / 16.0f, // float minLod - info.max_lod / 16.0f, // float maxLod + info.tm1.min_lod / 16.0f, // float minLod + info.tm1.max_lod / 16.0f, // float maxLod VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK, // VkBorderColor borderColor VK_FALSE // VkBool32 unnormalizedCoordinates }; // Can we use anisotropic filtering with this sampler? - if (info.anisotropic_filtering && g_vulkan_context->SupportsAnisotropicFiltering()) + if (info.tm0.anisotropic_filtering && g_vulkan_context->SupportsAnisotropicFiltering()) { // Cap anisotropy to device limits. create_info.anisotropyEnable = VK_TRUE; |
