vulkan/runtime/bvh: Set leaf_node_count for updates

Since the leaf node pass doesn't run for updates, leaf_node_count never
got set. This resulted in updates always running on 0 leaves (i.e. being
no-ops).

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32451>
This commit is contained in:
Friedrich Vock 2024-12-03 05:25:41 +01:00 committed by Marge Bot
parent 3effa3d53b
commit ff76d27554

View file

@ -1015,6 +1015,8 @@ vk_cmd_build_acceleration_structures(VkCommandBuffer commandBuffer,
batch_state.any_lbvh = true;
} else if (config.internal_type == INTERNAL_BUILD_TYPE_UPDATE) {
batch_state.any_update = true;
/* For updates, the leaf node pass never runs, so set leaf_node_count here. */
bvh_states[i].leaf_node_count = leaf_node_count;
} else {
unreachable("Unknown internal_build_type");
}