radeonsi: create prime buffers as uncached

8791e831b1 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 <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14615>
This commit is contained in:
Pierre-Eric Pelloux-Prayer 2022-01-19 11:36:45 +01:00 committed by Marge Bot
parent 18c38bf78f
commit 3b27ad1504
1 changed files with 2 additions and 0 deletions

View File

@ -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);