From 2bdb1b4641a098920bd7e1be4c26de42421f68b5 Mon Sep 17 00:00:00 2001 From: Friedrich Vock Date: Sat, 20 Aug 2022 23:54:06 +0200 Subject: [PATCH] radv: Enable Radeon Raytracing Analyzer traces Reviewed-by: Konstantin Seurer Part-of: --- src/amd/vulkan/radv_device.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 0c73819ede7..7994a34bb36 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -3410,6 +3410,9 @@ radv_CreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCr } else if (radv_thread_trace_enabled()) { vk_device_dispatch_table_from_entrypoints(&dispatch_table, &sqtt_device_entrypoints, true); vk_device_dispatch_table_from_entrypoints(&dispatch_table, &radv_device_entrypoints, false); + } else if (radv_rra_trace_enabled() && radv_enable_rt(physical_device, false)) { + vk_device_dispatch_table_from_entrypoints(&dispatch_table, &rra_device_entrypoints, true); + vk_device_dispatch_table_from_entrypoints(&dispatch_table, &radv_device_entrypoints, false); } else { vk_device_dispatch_table_from_entrypoints(&dispatch_table, &radv_device_entrypoints, true); } @@ -3691,6 +3694,10 @@ radv_CreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCr } } + if (radv_rra_trace_enabled() && radv_enable_rt(physical_device, false)) { + radv_rra_trace_init(device); + } + *pDevice = radv_device_to_handle(device); return VK_SUCCESS; @@ -3789,6 +3796,8 @@ radv_DestroyDevice(VkDevice _device, const VkAllocationCallbacks *pAllocator) radv_thread_trace_finish(device); + radv_rra_trace_finish(_device, &device->rra_trace); + radv_spm_finish(device); vk_device_finish(&device->vk);