GS/Vulkan: Enable samplerAnisotropy before using

This commit is contained in:
Connor McLaughlin 2022-11-26 15:53:30 +10:00 committed by refractionpcsx2
parent daebb5753a
commit ebeba2ba17
2 changed files with 2 additions and 1 deletions

View File

@ -483,6 +483,7 @@ namespace Vulkan
m_device_features.wideLines = available_features.wideLines; m_device_features.wideLines = available_features.wideLines;
m_device_features.fragmentStoresAndAtomics = available_features.fragmentStoresAndAtomics; m_device_features.fragmentStoresAndAtomics = available_features.fragmentStoresAndAtomics;
m_device_features.textureCompressionBC = available_features.textureCompressionBC; m_device_features.textureCompressionBC = available_features.textureCompressionBC;
m_device_features.samplerAnisotropy = available_features.samplerAnisotropy;
return true; return true;
} }

View File

@ -1042,7 +1042,7 @@ VkSampler GSDeviceVK::GetSampler(GSHWDrawConfig::SamplerSelector ss)
if (it != m_samplers.end()) if (it != m_samplers.end())
return it->second; return it->second;
const bool aniso = (ss.aniso && GSConfig.MaxAnisotropy > 1); const bool aniso = (ss.aniso && GSConfig.MaxAnisotropy > 1 && g_vulkan_context->GetDeviceFeatures().samplerAnisotropy);
// See https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSamplerCreateInfo.html#_description // See https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSamplerCreateInfo.html#_description
// for the reasoning behind 0.25f here. // for the reasoning behind 0.25f here.