1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-15 13:51:40 +00:00

Switch to embree-aarch64

(cherry picked from commit 73e2ccd603)
This commit is contained in:
JFonS
2021-05-04 11:07:12 +02:00
committed by Rémi Verschelde
parent 4b8a1d21f3
commit 1cfed0d583
97 changed files with 6063 additions and 1294 deletions

View File

@@ -43,7 +43,7 @@ namespace embree
template<typename Index, typename Value, typename Func, typename Reduction>
__forceinline Value parallel_reduce( const Index first, const Index last, const Index minStepSize, const Value& identity, const Func& func, const Reduction& reduction )
{
#if defined(TASKING_INTERNAL)
#if defined(TASKING_INTERNAL) || (defined(TASKING_GCD) && defined(BUILD_IOS))
/* fast path for small number of iterations */
Index taskCount = (last-first+minStepSize-1)/minStepSize;
@@ -58,15 +58,19 @@ namespace embree
const Value v = tbb::parallel_reduce(tbb::blocked_range<Index>(first,last,minStepSize),identity,
[&](const tbb::blocked_range<Index>& r, const Value& start) { return reduction(start,func(range<Index>(r.begin(),r.end()))); },
reduction,context);
if (context.is_group_execution_cancelled())
throw std::runtime_error("task cancelled");
// -- GODOT start --
// if (context.is_group_execution_cancelled())
// throw std::runtime_error("task cancelled");
// -- GODOT end --
return v;
#else
const Value v = tbb::parallel_reduce(tbb::blocked_range<Index>(first,last,minStepSize),identity,
[&](const tbb::blocked_range<Index>& r, const Value& start) { return reduction(start,func(range<Index>(r.begin(),r.end()))); },
reduction);
if (tbb::task::self().is_cancelled())
throw std::runtime_error("task cancelled");
// -- GODOT start --
// if (tbb::task::self().is_cancelled())
// throw std::runtime_error("task cancelled");
// -- GODOT end --
return v;
#endif
#else // TASKING_PPL