From: Jason Ekstrand Date: Thu, 2 Jun 2016 23:34:11 +0000 (-0700) Subject: anv/blit: Use CLAMP_TO_EDGE for scaled blits X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=441194edd91c2ca9d2b219f7e16ba2c7783396df;p=mesa.git anv/blit: Use CLAMP_TO_EDGE for scaled blits When upscaling you can end up interpolating between the edge pixel and one past the edge. Using CLAMP_TO_EDGE seems like the most reasonable thing to do in this case. This fixes two of the new Vulkan CTS tests in dEQP-VK.api.copy_and_blit.blit_image.* Jason Ekstrand Reviewed-by: Ian Romanick Cc: "12.0" --- diff --git a/src/intel/vulkan/anv_meta_blit.c b/src/intel/vulkan/anv_meta_blit.c index 3c54ef4bafb..dc098efca39 100644 --- a/src/intel/vulkan/anv_meta_blit.c +++ b/src/intel/vulkan/anv_meta_blit.c @@ -211,6 +211,9 @@ meta_emit_blit(struct anv_cmd_buffer *cmd_buffer, .sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO, .magFilter = blit_filter, .minFilter = blit_filter, + .addressModeU = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, + .addressModeV = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, + .addressModeW = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, }, &cmd_buffer->pool->alloc, &sampler); VkDescriptorPool desc_pool;