summaryrefslogtreecommitdiff
path: root/thirdparty/embree/kernels/common/state.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/embree/kernels/common/state.cpp')
-rw-r--r--thirdparty/embree/kernels/common/state.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/thirdparty/embree/kernels/common/state.cpp b/thirdparty/embree/kernels/common/state.cpp
index 01c862da0c..db6b803041 100644
--- a/thirdparty/embree/kernels/common/state.cpp
+++ b/thirdparty/embree/kernels/common/state.cpp
@@ -144,7 +144,20 @@ namespace embree
}
bool State::checkISASupport() {
+#if defined(__ARM_NEON)
+ /*
+ * NEON CPU type is a mixture of NEON and SSE2
+ */
+
+ bool hasSSE2 = (getCPUFeatures() & enabled_cpu_features) & CPU_FEATURE_SSE2;
+
+ /* this will be true when explicitly initialize Device with `isa=neon` config */
+ bool hasNEON = (getCPUFeatures() & enabled_cpu_features) & CPU_FEATURE_NEON;
+
+ return hasSSE2 || hasNEON;
+#else
return (getCPUFeatures() & enabled_cpu_features) == enabled_cpu_features;
+#endif
}
void State::verify()
@@ -157,8 +170,10 @@ namespace embree
* functions */
#if defined(DEBUG)
#if defined(EMBREE_TARGET_SSE2)
+#if !defined(__ARM_NEON)
assert(sse2::getISA() <= SSE2);
#endif
+#endif
#if defined(EMBREE_TARGET_SSE42)
assert(sse42::getISA() <= SSE42);
#endif