summaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2016-06-02 16:34:11 -0700
committerJason Ekstrand <jason.ekstrand@intel.com>2016-06-03 19:29:28 -0700
commit441194edd91c2ca9d2b219f7e16ba2c7783396df (patch)
treec0a34475a36387dbf79d8145d937b3cc9ca02006 /src/intel
parent9313a568169bddabaac675361497efff4a0709d6 (diff)
downloadexternal_mesa3d-441194edd91c2ca9d2b219f7e16ba2c7783396df.zip
external_mesa3d-441194edd91c2ca9d2b219f7e16ba2c7783396df.tar.gz
external_mesa3d-441194edd91c2ca9d2b219f7e16ba2c7783396df.tar.bz2
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 <jason@jlekstrand.net> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/vulkan/anv_meta_blit.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_meta_blit.c b/src/intel/vulkan/anv_meta_blit.c
index 3c54ef4..dc098ef 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;