mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 03:48:06 +02:00
radv: Fix encoding empty acceleration structures
There will always be at least one internal node so the expectation that
there are more leaf nodes than internal nodes dows not hold when the
acceleration structure has no leaf nodes.
Fixes: f8b584d ("vulkan/runtime,radv: Add shared BVH building framework")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12302
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32820>
This commit is contained in:
parent
2f76bdf35d
commit
407186994c
1 changed files with 1 additions and 1 deletions
|
|
@ -451,7 +451,7 @@ radv_encode_as(VkCommandBuffer commandBuffer, const VkAccelerationStructureBuild
|
|||
struct radv_dispatch_info dispatch = {
|
||||
.unaligned = true,
|
||||
.ordered = true,
|
||||
.blocks = {leaf_count, 1, 1},
|
||||
.blocks = {MAX2(leaf_count, 1), 1, 1},
|
||||
};
|
||||
|
||||
radv_compute_dispatch(cmd_buffer, &dispatch);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue