From 9c69f4632d7ae36efb59f4e7002de28dac08a896 Mon Sep 17 00:00:00 2001 From: Ben Widawsky Date: Mon, 25 Jan 2016 15:26:25 -0800 Subject: [PATCH] gen8/state: Apply min/mag filters individually for samplers This fixes tests which apply different min and mag filters, and depend on the min filter to be correct. --- src/vulkan/gen8_state.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/vulkan/gen8_state.c b/src/vulkan/gen8_state.c index ce142e6fb26..6e4c3eafe11 100644 --- a/src/vulkan/gen8_state.c +++ b/src/vulkan/gen8_state.c @@ -324,9 +324,6 @@ VkResult genX(CreateSampler)( if (!sampler) return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY); - uint32_t filter = vk_to_gen_tex_filter(pCreateInfo->magFilter, - pCreateInfo->anisotropyEnable); - uint32_t border_color_offset = device->border_colors.offset + pCreateInfo->borderColor * 64; @@ -338,8 +335,8 @@ VkResult genX(CreateSampler)( .BaseMipLevel = 0.0, #endif .MipModeFilter = vk_to_gen_mipmap_mode[pCreateInfo->mipmapMode], - .MagModeFilter = filter, - .MinModeFilter = filter, + .MagModeFilter = vk_to_gen_tex_filter(pCreateInfo->magFilter, pCreateInfo->anisotropyEnable), + .MinModeFilter = vk_to_gen_tex_filter(pCreateInfo->minFilter, pCreateInfo->anisotropyEnable), .TextureLODBias = anv_clamp_f(pCreateInfo->mipLodBias, -16, 15.996), .AnisotropicAlgorithm = EWAApproximation, .MinLOD = anv_clamp_f(pCreateInfo->minLod, 0, 14), -- 2.30.2