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:
Diffstat (limited to 'source/blender/compositor/intern/COM_ExecutionSystem.cc')
-rw-r--r--source/blender/compositor/intern/COM_ExecutionSystem.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/compositor/intern/COM_ExecutionSystem.cc b/source/blender/compositor/intern/COM_ExecutionSystem.cc
index cd2738fc2c7..a449d86deb9 100644
--- a/source/blender/compositor/intern/COM_ExecutionSystem.cc
+++ b/source/blender/compositor/intern/COM_ExecutionSystem.cc
@@ -82,6 +82,7 @@ ExecutionSystem::ExecutionSystem(RenderData *rd,
BLI_assert_msg(0, "Non implemented execution model");
break;
}
+ num_work_threads_ = WorkScheduler::get_num_cpu_threads();
}
ExecutionSystem::~ExecutionSystem()
@@ -130,7 +131,7 @@ void ExecutionSystem::execute_work(const rcti &work_rect,
/* Split work vertically to maximize continuous memory. */
const int work_height = BLI_rcti_size_y(&work_rect);
- const int num_sub_works = MIN2(WorkScheduler::get_num_cpu_threads(), work_height);
+ const int num_sub_works = MIN2(num_work_threads_, work_height);
const int split_height = num_sub_works == 0 ? 0 : work_height / num_sub_works;
int remaining_height = work_height - split_height * num_sub_works;