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 20:14:04 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-01-22 21:24:13 +0300
commita1f44e43a253eabee74f40315b62cc0c0ff4cb9c (patch)
tree7224c22d82b9e62e24e2a09f82c30cd61d1689ed /source/blender/blenlib/intern/task_pool.cc
parent5d6e5a9076e02fdd47c9cf168b368213f6399019 (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 'source/blender/blenlib/intern/task_pool.cc')
-rw-r--r--source/blender/blenlib/intern/task_pool.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/task_pool.cc b/source/blender/blenlib/intern/task_pool.cc
index 4b545c5647e..10f15f8749c 100644
--- a/source/blender/blenlib/intern/task_pool.cc
+++ b/source/blender/blenlib/intern/task_pool.cc
@@ -131,6 +131,12 @@ class TBBTaskGroup : public tbb::task_group {
public:
TBBTaskGroup(TaskPriority priority)
{
+# if TBB_INTERFACE_VERSION_MAJOR >= 12
+ /* TODO: support priorities in TBB 2021, where they are only available as
+ * part of task arenas, no longer for task groups. Or remove support for
+ * task priorities if they are no longer useful. */
+ UNUSED_VARS(priority);
+# else
switch (priority) {
case TASK_PRIORITY_LOW:
my_context.set_priority(tbb::priority_low);
@@ -139,6 +145,7 @@ class TBBTaskGroup : public tbb::task_group {
my_context.set_priority(tbb::priority_normal);
break;
}
+# endif
}
~TBBTaskGroup()