diff options
author | Brecht Van Lommel <brecht@blender.org> | 2021-01-22 20:14:04 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2021-01-22 21:24:13 +0300 |
commit | a1f44e43a253eabee74f40315b62cc0c0ff4cb9c (patch) | |
tree | 7224c22d82b9e62e24e2a09f82c30cd61d1689ed /intern/cycles/util | |
parent | 5d6e5a9076e02fdd47c9cf168b368213f6399019 (diff) |
Fix T84745: more build errors with TBB 2021
* tbb::blocked_range moved to a different namespace and since the fix is
non-trivial, remove some unused code that used this.
* Task group priorities are no longer supported. It's unclear if they are
useful at all right now and even set correctly, for now all tasks are equal
priority with TBB 2021.
Diffstat (limited to 'intern/cycles/util')
-rw-r--r-- | intern/cycles/util/util_tbb.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/intern/cycles/util/util_tbb.h b/intern/cycles/util/util_tbb.h index 206ba106ca6..168bd5db961 100644 --- a/intern/cycles/util/util_tbb.h +++ b/intern/cycles/util/util_tbb.h @@ -36,7 +36,14 @@ using tbb::parallel_for; static inline void parallel_for_cancel() { +#if TBB_INTERFACE_VERSION_MAJOR >= 12 + tbb::task_group_context *ctx = tbb::task::current_context(); + if (ctx) { + ctx->cancel_group_execution(); + } +#else tbb::task::self().cancel_group_execution(); +#endif } CCL_NAMESPACE_END |