You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-24 15:26:15 +00:00
15
thirdparty/embree/kernels/common/state.cpp
vendored
15
thirdparty/embree/kernels/common/state.cpp
vendored
@@ -147,7 +147,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()
|
||||
@@ -160,8 +173,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
|
||||
|
||||
Reference in New Issue
Block a user