radv: allocate the prime buffer as uncached

This is a write only buffer so caches aren't needed.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13959>
This commit is contained in:
Pierre-Eric Pelloux-Prayer 2021-12-06 10:47:34 +01:00 committed by Marge Bot
parent 7b5ab48c40
commit d6ea60d5a2
1 changed files with 7 additions and 0 deletions

View File

@ -4624,6 +4624,13 @@ radv_alloc_memory(struct radv_device *device, const VkMemoryAllocateInfo *pAlloc
mem->buffer = NULL;
}
if (wsi_info && wsi_info->implicit_sync && mem->buffer) {
/* Mark the linear prime buffer (aka the destination of the prime blit
* as uncached.
*/
flags |= RADEON_FLAG_VA_UNCACHED;
}
float priority_float = 0.5;
const struct VkMemoryPriorityAllocateInfoEXT *priority_ext =
vk_find_struct_const(pAllocateInfo->pNext, MEMORY_PRIORITY_ALLOCATE_INFO_EXT);