Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2021-01-22 21:30:23 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-01-22 21:30:23 +0300
commitaaa1d580548d27d946a8f97fc7c6e99f8fd40f1c (patch)
tree7ab66637f51d939affba32665fe5de49a7199878 /intern/cycles/util
parent90bcd5e724f3ca6d6f38e3a0551c300751382e62 (diff)
parenta1f44e43a253eabee74f40315b62cc0c0ff4cb9c (diff)
Merge branch 'blender-v2.92-release'
Diffstat (limited to 'intern/cycles/util')
-rw-r--r--intern/cycles/util/util_tbb.h7
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