From 873ad6b6d511185df91dd8fb5fc299da28104912 Mon Sep 17 00:00:00 2001 From: Michael Cheng Date: Sun, 9 Feb 2025 19:31:43 -0800 Subject: [PATCH] anv: Fix missing Perfetto trace for as build The as_build and related functions only appear when MESA_GPU_TRACES= perfetto is set. By default, when running an RT workload for profiling, these traces should be recorded alongside other trace points. This commit ensures that acceleration structure build events are properly captured when running an RT workload. v2(Michael Cheng): Move this logic up to anv_device_init_accel_struct_build_state v3(Michael Cheng): Set emit_markers = true and let the generated functions handle the check for u_trace_enable and intel_gpu_tracepoint Signed-off-by: Michael Cheng Reviewed-by: Casey Bowman Part-of: --- src/intel/vulkan/genX_acceleration_structure.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/vulkan/genX_acceleration_structure.c b/src/intel/vulkan/genX_acceleration_structure.c index 505919ec25a..34cc4b6a2aa 100644 --- a/src/intel/vulkan/genX_acceleration_structure.c +++ b/src/intel/vulkan/genX_acceleration_structure.c @@ -620,7 +620,7 @@ anv_device_init_accel_struct_build_state(struct anv_device *device) device->accel_struct_build.build_args = (struct vk_acceleration_structure_build_args) { - .emit_markers = u_trace_enabled(&device->ds.trace_context), + .emit_markers = true, .subgroup_size = device->info->ver >= 20 ? 16 : 8, .radix_sort = device->accel_struct_build.radix_sort, /* See struct anv_accel_struct_header from anv_bvh.h