radv: Enable Radeon Raytracing Analyzer traces

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18166>
This commit is contained in:
Friedrich Vock 2022-08-20 23:54:06 +02:00 committed by Marge Bot
parent 97ffaea52e
commit 2bdb1b4641

View file

@ -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);