mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 18:10:11 +01:00
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:
parent
034f58c7e3
commit
07afe65beb
1 changed files with 2 additions and 2 deletions
|
|
@ -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)) {
|
if (!(state->config.encode_key[0] & RADV_ENCODE_KEY_BATCH_COMPRESS_GFX12)) {
|
||||||
accel_struct->leaf_nodes_offset = offset;
|
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;
|
accel_struct->internal_nodes_offset = offset;
|
||||||
/* Factor out the root node. */
|
/* Factor out the root node. */
|
||||||
offset += internal_node_size * (internal_count - 1);
|
offset += internal_node_size * (internal_count - 1);
|
||||||
if (state->config.encode_key[0] & RADV_ENCODE_KEY_BATCH_COMPRESS_GFX12)
|
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;
|
accel_struct->size = offset;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue