From 07afe65beb017384f35dba8fc95a1a87b2e329f6 Mon Sep 17 00:00:00 2001 From: Konstantin Seurer Date: Sat, 15 Nov 2025 09:31:40 +0100 Subject: [PATCH] radv: Use hw_leaf_node_count for computing BVH size Reviewed-by: Natalie Vock Part-of: --- src/amd/vulkan/radv_acceleration_structure.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/amd/vulkan/radv_acceleration_structure.c b/src/amd/vulkan/radv_acceleration_structure.c index 4271a0be143..27c696b8a55 100644 --- a/src/amd/vulkan/radv_acceleration_structure.c +++ b/src/amd/vulkan/radv_acceleration_structure.c @@ -170,14 +170,14 @@ radv_get_acceleration_structure_layout(struct radv_device *device, if (!(state->config.encode_key[0] & RADV_ENCODE_KEY_BATCH_COMPRESS_GFX12)) { accel_struct->leaf_nodes_offset = offset; - offset += bvh_leaf_size * state->leaf_node_count; + offset += bvh_leaf_size * hw_leaf_node_count; } accel_struct->internal_nodes_offset = offset; /* Factor out the root node. */ offset += internal_node_size * (internal_count - 1); if (state->config.encode_key[0] & RADV_ENCODE_KEY_BATCH_COMPRESS_GFX12) - offset += bvh_leaf_size * state->leaf_node_count; + offset += bvh_leaf_size * hw_leaf_node_count; accel_struct->size = offset; }