Browse Source

vulkan: don't try to enable anisotropic filtering if anisotropy is 1.

Sasha Szpakowski 7 months ago
parent
commit
dd3ebae7a1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/modules/graphics/vulkan/Graphics.cpp

+ 1 - 1
src/modules/graphics/vulkan/Graphics.cpp

@@ -2795,7 +2795,7 @@ VkSampler Graphics::createSampler(const SamplerState &samplerState)
 	samplerInfo.addressModeU = Vulkan::getWrapMode(samplerState.wrapU);
 	samplerInfo.addressModeV = Vulkan::getWrapMode(samplerState.wrapV);
 	samplerInfo.addressModeW = Vulkan::getWrapMode(samplerState.wrapW);
-	samplerInfo.anisotropyEnable = VK_TRUE;
+	samplerInfo.anisotropyEnable = samplerState.maxAnisotropy > 1 ? VK_TRUE : VK_FALSE;
 	samplerInfo.maxAnisotropy = static_cast<float>(samplerState.maxAnisotropy);
 
 	// TODO: This probably needs to branch on a pixel format to determine whether