radv: Skip more acceleration structure build markers

We should skip even more stuff when using updates only.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28228>
This commit is contained in:
Konstantin Seurer 2024-03-02 15:35:29 +01:00 committed by Marge Bot
parent b58b6d2d32
commit d902b6d805

View file

@ -1447,33 +1447,36 @@ radv_CmdBuildAccelerationStructuresKHR(VkCommandBuffer commandBuffer, uint32_t i
cmd_buffer->state.current_event_type = EventInternalUnknown;
if (batch_state.any_non_updateable)
build_leaves(commandBuffer, infoCount, pInfos, ppBuildRangeInfos, bvh_states, false);
if (batch_state.any_updateable)
build_leaves(commandBuffer, infoCount, pInfos, ppBuildRangeInfos, bvh_states, true);
if (batch_state.any_lbvh || batch_state.any_ploc) {
if (batch_state.any_non_updateable)
build_leaves(commandBuffer, infoCount, pInfos, ppBuildRangeInfos, bvh_states, false);
if (batch_state.any_updateable)
build_leaves(commandBuffer, infoCount, pInfos, ppBuildRangeInfos, bvh_states, true);
cmd_buffer->state.flush_bits |= flush_bits;
cmd_buffer->state.flush_bits |= flush_bits;
morton_generate(commandBuffer, infoCount, pInfos, bvh_states, flush_bits);
morton_generate(commandBuffer, infoCount, pInfos, bvh_states, flush_bits);
morton_sort(commandBuffer, infoCount, pInfos, bvh_states, flush_bits);
morton_sort(commandBuffer, infoCount, pInfos, bvh_states, flush_bits);
cmd_buffer->state.flush_bits |= flush_bits;
cmd_buffer->state.flush_bits |= flush_bits;
lbvh_build_internal(commandBuffer, infoCount, pInfos, bvh_states, flush_bits);
if (batch_state.any_lbvh)
lbvh_build_internal(commandBuffer, infoCount, pInfos, bvh_states, flush_bits);
if (batch_state.any_ploc)
ploc_build_internal(commandBuffer, infoCount, pInfos, bvh_states);
if (batch_state.any_ploc)
ploc_build_internal(commandBuffer, infoCount, pInfos, bvh_states);
cmd_buffer->state.flush_bits |= flush_bits;
cmd_buffer->state.flush_bits |= flush_bits;
if (batch_state.any_non_compact)
encode_nodes(commandBuffer, infoCount, pInfos, bvh_states, false);
if (batch_state.any_non_compact)
encode_nodes(commandBuffer, infoCount, pInfos, bvh_states, false);
if (batch_state.any_compact)
encode_nodes(commandBuffer, infoCount, pInfos, bvh_states, true);
if (batch_state.any_compact)
encode_nodes(commandBuffer, infoCount, pInfos, bvh_states, true);
cmd_buffer->state.flush_bits |= flush_bits;
cmd_buffer->state.flush_bits |= flush_bits;
}
init_header(commandBuffer, infoCount, pInfos, bvh_states, &batch_state);