From 33a694fe9ba4eb65330ef50c4372667558f407fb Mon Sep 17 00:00:00 2001 From: Konstantin Seurer Date: Sat, 19 Jul 2025 17:31:47 +0200 Subject: [PATCH] radv: Initialize base IDs when doing a BVH update with src!=dst Fixes: 2d48b2c ("radv: Use subgroup OPs for BVH updates on GFX12") Reviewed-by: Natalie Vock Part-of: --- src/amd/vulkan/bvh/update_gfx12.comp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/amd/vulkan/bvh/update_gfx12.comp b/src/amd/vulkan/bvh/update_gfx12.comp index 32da58fca68..e4599cd7126 100644 --- a/src/amd/vulkan/bvh/update_gfx12.comp +++ b/src/amd/vulkan/bvh/update_gfx12.comp @@ -139,6 +139,10 @@ main() uvec3 extent_exponents = floatBitsToUint(extent) >> 23; if (cluster.invocation_index == 0) { + if (!VK_BUILD_FLAG(RADV_BUILD_FLAG_UPDATE_IN_PLACE)) { + DEREF(dst_node).primitive_base_id = src_node.primitive_base_id; + DEREF(dst_node).internal_base_id = src_node.internal_base_id; + } DEREF(dst_node).origin = origin; DEREF(dst_node).child_count_exponents = extent_exponents.x | (extent_exponents.y << 8) | (extent_exponents.z << 16) | (valid_child_count_minus_one << 28);