Skip to content

Commit 7431d15

Browse files
authored
Merge branch 'master' into fix/interpolate-bufferslot-validation
2 parents 680fa34 + 932a3d3 commit 7431d15

7 files changed

Lines changed: 152 additions & 218 deletions

File tree

‎common/sys/sysinfo.cpp‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -765,9 +765,12 @@ namespace embree
765765
cpu_set_t set;
766766
if (pthread_getaffinity_np(pthread_self(), sizeof(set), &set) == 0)
767767
nThreads = CPU_COUNT(&set);
768+
else
769+
nThreads = (int)sysconf(_SC_NPROCESSORS_ONLN);
768770
#endif
769-
770-
assert(nThreads);
771+
772+
if (nThreads < 1)
773+
nThreads = 1;
771774
return nThreads;
772775
}
773776

‎kernels/common/instance_stack.h‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,14 @@ RTC_FORCEINLINE bool push(RTCPointQueryContext* context,
8484
{
8585
assert(context);
8686
const size_t stackSize = context->instStackSize;
87-
assert(stackSize < RTC_MAX_INSTANCE_LEVEL_COUNT);
87+
88+
/* We assert here because instances are silently dropped when the stack is full.
89+
This might be quite hard to find in production. */
90+
const bool spaceAvailable = stackSize < RTC_MAX_INSTANCE_LEVEL_COUNT;
91+
assert(spaceAvailable);
92+
if (unlikely(!spaceAvailable))
93+
return false;
94+
8895
context->instID[stackSize] = instanceId;
8996
#if defined(RTC_GEOMETRY_INSTANCE_ARRAY)
9097
context->instPrimID[stackSize] = instancePrimId;

‎tutorials/CMakeLists.txt‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ ADD_SUBDIRECTORY(ray_mask)
113113
ADD_SUBDIRECTORY(forest)
114114
ADD_SUBDIRECTORY(host_device_memory)
115115
ADD_SUBDIRECTORY(embree_tests)
116-
ADD_SUBDIRECTORY(embree_regression_tests)
117116

118117

119118
ENDIF()

‎tutorials/embree_regression_tests/CMakeLists.txt‎

Lines changed: 0 additions & 12 deletions
This file was deleted.

‎tutorials/embree_regression_tests/embree_regression_tests.cpp‎

Lines changed: 0 additions & 198 deletions
This file was deleted.

0 commit comments

Comments
 (0)