summaryrefslogtreecommitdiff
path: root/src/amd/vulkan
diff options
context:
space:
mode:
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>2021-12-06 10:47:34 +0100
committerMarge Bot <emma+marge@anholt.net>2022-01-11 12:18:35 +0000
commitd6ea60d5a2dd21a92eac71d2e7ff09e9d29e1126 (patch)
tree38d30ba3797f841d3f569ed79d734808d93ce174 /src/amd/vulkan
parent7b5ab48c40bf391568a2128a7c7de09f708234a9 (diff)
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>
Diffstat (limited to 'src/amd/vulkan')
-rw-r--r--src/amd/vulkan/radv_device.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index 5a1bb95c305..91ae1932def 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -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);