From 3b27ad150464c11c95a796d64acedddfe1963f03 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Wed, 19 Jan 2022 11:36:45 +0100 Subject: [PATCH] radeonsi: create prime buffers as uncached 8791e831b11 marked imported prime buffers as uncached (useful when prime buffer is allocated by the display GPU), but they should also be created as uncached (useful when allocated by the render GPU). Reviewed-by: Kenneth Graunke Part-of: --- src/gallium/drivers/radeonsi/si_texture.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/radeonsi/si_texture.c b/src/gallium/drivers/radeonsi/si_texture.c index c95ebd1dfd8..05e21f23c6a 100644 --- a/src/gallium/drivers/radeonsi/si_texture.c +++ b/src/gallium/drivers/radeonsi/si_texture.c @@ -1015,6 +1015,8 @@ static struct si_texture *si_texture_create_object(struct pipe_screen *screen, } else if (!(surface->flags & RADEON_SURF_IMPORTED)) { if (base->flags & PIPE_RESOURCE_FLAG_SPARSE) resource->b.b.flags |= SI_RESOURCE_FLAG_UNMAPPABLE; + if (base->bind & PIPE_BIND_PRIME_BLIT_DST) + resource->b.b.flags |= SI_RESOURCE_FLAG_UNCACHED; /* Create the backing buffer. */ si_init_resource_fields(sscreen, resource, alloc_size, alignment);