mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 06:30:10 +01:00
vulkan/bvh: Mark instances with NAN AABBs as inactive
They can never be hit, remove them from the BVH. Cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37492>
This commit is contained in:
parent
e14adc5cb2
commit
33099040a3
1 changed files with 3 additions and 0 deletions
|
|
@ -148,6 +148,9 @@ build_instance(inout vk_aabb bounds, VOID_REF src_ptr, VOID_REF dst_ptr, uint32_
|
|||
|
||||
vk_aabb blas_aabb = DEREF(REF(vk_aabb)(instance.accelerationStructureReference + BVH_BOUNDS_OFFSET));
|
||||
|
||||
if (any(isnan(blas_aabb.min)) || any(isnan(blas_aabb.max)))
|
||||
return false;
|
||||
|
||||
bounds = calculate_instance_node_bounds(blas_aabb, mat3x4(transform));
|
||||
|
||||
#ifdef CALCULATE_FINE_INSTANCE_NODE_BOUNDS
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue