diff options
author | Brecht Van Lommel <brecht@blender.org> | 2021-01-15 19:21:14 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2021-01-15 19:29:36 +0300 |
commit | 3732508c64ad51c77a6fb83a2444af104d95cfd9 (patch) | |
tree | e9d31126cb4c3cf6a1e7e9601ce2ba93e5282fcc /intern/cycles | |
parent | 340529a8453ca9c2715c545245379e442f6006c8 (diff) |
Fix T84745: build error with TBB 2021
task_group::is_canceling() was removed.
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/device/device_cpu.cpp | 8 | ||||
-rw-r--r-- | intern/cycles/util/util_task.cpp | 2 | ||||
-rw-r--r-- | intern/cycles/util/util_task.h | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/intern/cycles/device/device_cpu.cpp b/intern/cycles/device/device_cpu.cpp index bd00d4db775..fdfd3f83be6 100644 --- a/intern/cycles/device/device_cpu.cpp +++ b/intern/cycles/device/device_cpu.cpp @@ -951,7 +951,7 @@ class CPUDevice : public Device { SIMD_SET_FLUSH_TO_ZERO; for (int sample = start_sample; sample < end_sample; sample++) { - if (task.get_cancel() || task_pool.canceled()) { + if (task.get_cancel() || TaskPool::canceled()) { if (task.need_finish_queue == false) break; } @@ -1249,7 +1249,7 @@ class CPUDevice : public Device { void thread_render(DeviceTask &task) { - if (task_pool.canceled()) { + if (TaskPool::canceled()) { if (task.need_finish_queue == false) return; } @@ -1319,7 +1319,7 @@ class CPUDevice : public Device { task.release_tile(tile); - if (task_pool.canceled()) { + if (TaskPool::canceled()) { if (task.need_finish_queue == false) break; } @@ -1416,7 +1416,7 @@ class CPUDevice : public Device { task.offset, sample); - if (task.get_cancel() || task_pool.canceled()) + if (task.get_cancel() || TaskPool::canceled()) break; task.update_progress(NULL); diff --git a/intern/cycles/util/util_task.cpp b/intern/cycles/util/util_task.cpp index 50c236ac968..949ba0a7b4d 100644 --- a/intern/cycles/util/util_task.cpp +++ b/intern/cycles/util/util_task.cpp @@ -62,7 +62,7 @@ void TaskPool::cancel() bool TaskPool::canceled() { - return tbb_group.is_canceling(); + return tbb::is_current_task_group_canceling(); } /* Task Scheduler */ diff --git a/intern/cycles/util/util_task.h b/intern/cycles/util/util_task.h index f2718600f30..7c39ed675b5 100644 --- a/intern/cycles/util/util_task.h +++ b/intern/cycles/util/util_task.h @@ -61,7 +61,7 @@ class TaskPool { void wait_work(Summary *stats = NULL); /* work and wait until all tasks are done */ void cancel(); /* cancel all tasks and wait until they are no longer executing */ - bool canceled(); /* for worker threads, test if canceled */ + static bool canceled(); /* For worker threads, test if current task pool canceled. */ protected: tbb::task_group tbb_group; |