radv: Use hw_leaf_node_count for computing BVH size

Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38462>
This commit is contained in:
Konstantin Seurer 2025-11-15 09:31:40 +01:00 committed by Marge Bot
parent 034f58c7e3
commit 07afe65beb

View file

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