From 18d8c3ca339d346b9d531f49c343353ac7a61c89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Roberto=20de=20Souza?= Date: Thu, 18 Apr 2024 12:06:16 -0700 Subject: [PATCH] anv: Add missing ANV_BO_ALLOC_INTERNAL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some places doing driver internal allocations was not setting ANV_BO_ALLOC_INTERNAL, so adding the flag in those places here. This will increase the accuracy of the RMV report. Reviewed-by: Lionel Landwerlin Signed-off-by: José Roberto de Souza Part-of: --- src/intel/vulkan/anv_bo_sync.c | 3 ++- src/intel/vulkan/anv_cmd_buffer.c | 4 ++-- src/intel/vulkan/anv_measure.c | 4 +++- src/intel/vulkan/anv_sparse.c | 4 +++- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/intel/vulkan/anv_bo_sync.c b/src/intel/vulkan/anv_bo_sync.c index c48d52d285d..af12c6d61dd 100644 --- a/src/intel/vulkan/anv_bo_sync.c +++ b/src/intel/vulkan/anv_bo_sync.c @@ -46,7 +46,8 @@ anv_bo_sync_init(struct vk_device *vk_device, return anv_device_alloc_bo(device, "bo-sync", 4096, ANV_BO_ALLOC_EXTERNAL | - ANV_BO_ALLOC_IMPLICIT_SYNC, + ANV_BO_ALLOC_IMPLICIT_SYNC | + ANV_BO_ALLOC_INTERNAL, 0 /* explicit_address */, &sync->bo); } diff --git a/src/intel/vulkan/anv_cmd_buffer.c b/src/intel/vulkan/anv_cmd_buffer.c index 55472d28d48..68d05eb74b2 100644 --- a/src/intel/vulkan/anv_cmd_buffer.c +++ b/src/intel/vulkan/anv_cmd_buffer.c @@ -465,7 +465,7 @@ anv_cmd_buffer_set_ray_query_buffer(struct anv_cmd_buffer *cmd_buffer, struct anv_bo *new_bo; VkResult result = anv_device_alloc_bo(device, "RT queries shadow", ray_shadow_size, - 0, /* alloc_flags */ + ANV_BO_ALLOC_INTERNAL, /* alloc_flags */ 0, /* explicit_address */ &new_bo); if (result != VK_SUCCESS) { @@ -1457,7 +1457,7 @@ void anv_CmdSetRayTracingPipelineStackSizeKHR( struct anv_bo *new_bo; VkResult result = anv_device_alloc_bo(device, "RT scratch", rt->scratch.layout.total_size, - 0, /* alloc_flags */ + ANV_BO_ALLOC_INTERNAL, /* alloc_flags */ 0, /* explicit_address */ &new_bo); if (result != VK_SUCCESS) { diff --git a/src/intel/vulkan/anv_measure.c b/src/intel/vulkan/anv_measure.c index 9223ca158fe..8e778946ea8 100644 --- a/src/intel/vulkan/anv_measure.c +++ b/src/intel/vulkan/anv_measure.c @@ -94,7 +94,9 @@ anv_measure_init(struct anv_cmd_buffer *cmd_buffer) ASSERTED VkResult result = anv_device_alloc_bo(device, "measure data", config->batch_size * sizeof(uint64_t), - ANV_BO_ALLOC_MAPPED | ANV_BO_ALLOC_HOST_CACHED_COHERENT, + ANV_BO_ALLOC_MAPPED | + ANV_BO_ALLOC_HOST_CACHED_COHERENT | + ANV_BO_ALLOC_INTERNAL, 0, (struct anv_bo**)&measure->bo); measure->base.timestamps = measure->bo->map; diff --git a/src/intel/vulkan/anv_sparse.c b/src/intel/vulkan/anv_sparse.c index 3efc6910225..279dffea510 100644 --- a/src/intel/vulkan/anv_sparse.c +++ b/src/intel/vulkan/anv_sparse.c @@ -308,7 +308,9 @@ trtt_make_page_table_bo(struct anv_device *device, struct anv_bo **bo) struct anv_trtt *trtt = &device->trtt; result = anv_device_alloc_bo(device, "trtt-page-table", - ANV_TRTT_PAGE_TABLE_BO_SIZE, 0, 0, bo); + ANV_TRTT_PAGE_TABLE_BO_SIZE | + ANV_BO_ALLOC_INTERNAL, + 0, 0, bo); if (result != VK_SUCCESS) return result;