From 97d8bb9bc6049a33cb8e07faab84f2c5935e770f Mon Sep 17 00:00:00 2001 From: Konstantin Seurer Date: Sat, 10 Sep 2022 14:33:02 +0200 Subject: [PATCH] radv/rra: Map accel struct VAs to handles When validating a BVH, rra_validate_node uses _mesa_hash_table_u64_search to lookup, whether a BLAS pointer is valid. Since _mesa_hash_table_u64_search returns the data field of the found entry, we need to populate it. Otherwise, the NULL-check won't work. Fixes: 5749806 ("radv: Add Radeon Raytracing Analyzer trace dumping utilities") Signed-off-by: Konstantin Seurer Reviewed-by: Friedrich Vock Part-of: --- src/amd/vulkan/layers/radv_rra_layer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/vulkan/layers/radv_rra_layer.c b/src/amd/vulkan/layers/radv_rra_layer.c index b14ea11e50b..5ea2df7c870 100644 --- a/src/amd/vulkan/layers/radv_rra_layer.c +++ b/src/amd/vulkan/layers/radv_rra_layer.c @@ -130,7 +130,7 @@ rra_CreateAccelerationStructureKHR(VkDevice _device, _mesa_hash_table_insert(device->rra_trace.accel_structs, structure, build_submit_event); _mesa_hash_table_u64_insert(device->rra_trace.accel_struct_vas, - radv_accel_struct_get_va(structure), NULL); + radv_accel_struct_get_va(structure), structure); simple_mtx_unlock(&device->rra_trace.data_mtx); return VK_SUCCESS;