diff options
author | Jason Ekstrand <[email protected]> | 2016-01-25 15:33:08 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-01-25 15:33:08 -0800 |
commit | 6bbf3814dc937371c2918ea56b18d4c32000b951 (patch) | |
tree | 7f14822e126f40b9f3fc72268f8b2871ca5357fc /src/vulkan | |
parent | 9c69f4632d7ae36efb59f4e7002de28dac08a896 (diff) |
gen7/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.
Diffstat (limited to 'src/vulkan')
-rw-r--r-- | src/vulkan/gen7_state.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/vulkan/gen7_state.c b/src/vulkan/gen7_state.c index 55cff90a723..b3abe74090d 100644 --- a/src/vulkan/gen7_state.c +++ b/src/vulkan/gen7_state.c @@ -81,17 +81,16 @@ 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); - struct GEN7_SAMPLER_STATE sampler_state = { .SamplerDisable = false, .TextureBorderColorMode = DX10OGL, .LODPreClampEnable = OGL, .BaseMipLevel = 0.0, .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 = pCreateInfo->mipLodBias * 256, .AnisotropicAlgorithm = EWAApproximation, .MinLOD = pCreateInfo->minLod, |