anv/state: if enabled, use anisotropic filtering also with VK_FILTER_NEAREST
authorIago Toral Quiroga <itoral@igalia.com>
Thu, 24 Nov 2016 10:21:20 +0000 (11:21 +0100)
committerIago Toral Quiroga <itoral@igalia.com>
Fri, 25 Nov 2016 07:20:28 +0000 (08:20 +0100)
Fixes multiple Vulkan CTS tests that combine anisotropy and VK_FILTER_NEAREST
in dEQP-VK.texture.filtering_anisotropy.*

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/genX_state.c

index 4122395a51956af0ad8c764c03468a32b0ffa607..0f621f9a2754202795f4778f3e7d12b6b0a6628b 100644 (file)
@@ -101,7 +101,7 @@ vk_to_gen_tex_filter(VkFilter filter, bool anisotropyEnable)
    default:
       assert(!"Invalid filter");
    case VK_FILTER_NEAREST:
-      return MAPFILTER_NEAREST;
+      return anisotropyEnable ? MAPFILTER_ANISOTROPIC : MAPFILTER_NEAREST;
    case VK_FILTER_LINEAR:
       return anisotropyEnable ? MAPFILTER_ANISOTROPIC : MAPFILTER_LINEAR;
    }