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:
Natalie Vock 2025-09-19 20:53:17 +02:00 committed by Marge Bot
parent e14adc5cb2
commit 33099040a3

View file

@ -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