mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-30 23:00:11 +01:00
radv/bvh: Treat instances with mask == 0 as inactive
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25268>
This commit is contained in:
parent
8d2dcd55d7
commit
3e7850f97b
1 changed files with 4 additions and 2 deletions
|
|
@ -268,8 +268,10 @@ build_instance(inout radv_aabb bounds, VOID_REF src_ptr, VOID_REF dst_ptr, uint3
|
|||
AccelerationStructureInstance instance = DEREF(REF(AccelerationStructureInstance)(src_ptr));
|
||||
DEREF(node).base_ptr = instance.accelerationStructureReference;
|
||||
|
||||
/* An inactive instance is one whose acceleration structure handle is VK_NULL_HANDLE. */
|
||||
if (instance.accelerationStructureReference == 0)
|
||||
/* An inactive instance is one whose acceleration structure handle is VK_NULL_HANDLE. Since the active terminology is
|
||||
* only relevant for BVH updates, which we do not implement, we can also skip instances with mask == 0.
|
||||
*/
|
||||
if (instance.accelerationStructureReference == 0 || instance.custom_instance_and_mask < (1u << 24u))
|
||||
return false;
|
||||
|
||||
DEREF(node).otw_matrix = instance.transform;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue