From 12a22da6834f21cb089bf9ecd44c483bd264ccd3 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Thu, 20 Feb 2020 13:19:41 +0100 Subject: [PATCH] radv: add the trace BO to the BO list at submit time Instead of adding it in every command buffer. Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen Tested-by: Marge Bot Part-of: --- src/amd/vulkan/radv_cmd_buffer.c | 8 +------- src/amd/vulkan/radv_device.c | 3 +++ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index 66c7d0721ba..b4fe37824b1 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -3433,14 +3433,8 @@ VkResult radv_BeginCommandBuffer( radv_cmd_buffer_set_subpass(cmd_buffer, subpass); } - if (unlikely(cmd_buffer->device->trace_bo)) { - struct radv_device *device = cmd_buffer->device; - - radv_cs_add_buffer(device->ws, cmd_buffer->cs, - device->trace_bo); - + if (unlikely(cmd_buffer->device->trace_bo)) radv_cmd_buffer_trace_emit(cmd_buffer); - } cmd_buffer->status = RADV_CMD_BUFFER_STATUS_RECORDING; diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 348104a186c..c9947592dd7 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -3899,6 +3899,9 @@ radv_get_preamble_cs(struct radv_queue *queue, if (gds_oa_bo) radv_cs_add_buffer(queue->device->ws, cs, gds_oa_bo); + if (queue->device->trace_bo) + radv_cs_add_buffer(queue->device->ws, cs, queue->device->trace_bo); + if (i == 0) { si_cs_emit_cache_flush(cs, queue->device->physical_device->rad_info.chip_class, -- 2.30.2