summaryrefslogtreecommitdiff
path: root/thirdparty/embree/kernels/bvh/bvh_node_qaabb.h
diff options
context:
space:
mode:
authorDeeJayLSP <djlsplays@gmail.com>2022-11-24 11:45:59 -0300
committerRĂ©mi Verschelde <rverschelde@gmail.com>2022-11-25 13:09:04 +0100
commit5e4158eb4869427ac13a0fe57e9b688ea4c3b0f1 (patch)
tree1a659e532fcba81af33d1f874c65311f093e4535 /thirdparty/embree/kernels/bvh/bvh_node_qaabb.h
parentf16c5b564b569497d04deb965a4fd63b3ea2ab2f (diff)
Update embree to 3.13.5
Diffstat (limited to 'thirdparty/embree/kernels/bvh/bvh_node_qaabb.h')
-rw-r--r--thirdparty/embree/kernels/bvh/bvh_node_qaabb.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/thirdparty/embree/kernels/bvh/bvh_node_qaabb.h b/thirdparty/embree/kernels/bvh/bvh_node_qaabb.h
index 2afc8c98e7..99671ddc5a 100644
--- a/thirdparty/embree/kernels/bvh/bvh_node_qaabb.h
+++ b/thirdparty/embree/kernels/bvh/bvh_node_qaabb.h
@@ -190,6 +190,14 @@ namespace embree
template<typename BuildRecord>
__forceinline NodeRef operator() (const BuildRecord& precord, const BuildRecord* crecords, NodeRef ref, NodeRef* children, const size_t num) const
{
+#if defined(DEBUG)
+ // check that empty children are only at the end of the child list
+ bool emptyChild = false;
+ for (size_t i=0; i<num; i++) {
+ emptyChild |= (children[i] == NodeRef::emptyNode);
+ assert(emptyChild == (children[i] == NodeRef::emptyNode));
+ }
+#endif
QuantizedNode_t* node = ref.quantizedNode();
for (size_t i=0; i<num; i++) node->setRef(i,children[i]);
return ref;