[Mesa-dev] [Mesa-stable] [PATCH] anv/blit: Use CLAMP_TO_EDGE for scaled blits

Jason Ekstrand jason at jlekstrand.net
Fri Jun 3 00:59:46 UTC 2016


On Thu, Jun 2, 2016 at 5:01 PM, Ian Romanick <idr at freedesktop.org> wrote:

> I believe this is what GL meta blits do also.  This patch is
>
> Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
>

Thanks!


> On 06/02/2016 04:36 PM, Jason Ekstrand wrote:
> > 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 at jlekstrand.net>
> > Cc: "12.0" <mesa-stable at lists.freedesktop.org>
> > ---
> >  src/intel/vulkan/anv_meta_blit.c | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > 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;
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160602/ddd7f4ef/attachment.html>


More information about the mesa-dev mailing list