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:
authorJames Monteath <james@blender.org>2021-06-01 16:07:46 +0300
committerJeroen Bakker <jeroen@blender.org>2021-06-01 16:18:11 +0300
commit8a63466ca3380479a92a65b670a074277d9a8671 (patch)
treece89d6a394431a36770de9bb4421a41962862194 /source/blender/compositor/intern/COM_WorkScheduler.cc
parentee54a8ace753a56236f5d1d647da7a40904af6b3 (diff)
parent6899dcab5339d1f17dd2ea665a38e4ab28ab23fc (diff)
BuildBot: Cleanup
Removing scripts that were placed in the source tree that would drive the old buildbot. With the new buildbot in place these scripts aren't being used anymore. The buildbit is currently driven by `build_files/config/pipeline_config.json`. In the near future make update would also use this config. Overview of the new buildbot: https://wiki.blender.org/wiki/Infrastructure/BuildBot Work done by James Monteath.
Diffstat (limited to 'source/blender/compositor/intern/COM_WorkScheduler.cc')
-rw-r--r--source/blender/compositor/intern/COM_WorkScheduler.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/compositor/intern/COM_WorkScheduler.cc b/source/blender/compositor/intern/COM_WorkScheduler.cc
index d578ac24a4a..157ded943d6 100644
--- a/source/blender/compositor/intern/COM_WorkScheduler.cc
+++ b/source/blender/compositor/intern/COM_WorkScheduler.cc
@@ -98,6 +98,8 @@ static struct {
bool active = false;
bool initialized = false;
} opencl;
+
+ int num_cpu_threads;
} g_work_scheduler;
/* -------------------------------------------------------------------- */
@@ -143,7 +145,8 @@ static void opencl_start(CompositorContext &context)
static bool opencl_schedule(WorkPackage *package)
{
- if (package->execution_group->get_flags().open_cl && g_work_scheduler.opencl.active) {
+ if (package->type == eWorkPackageType::Tile && package->execution_group->get_flags().open_cl &&
+ g_work_scheduler.opencl.active) {
BLI_thread_queue_push(g_work_scheduler.opencl.queue, package);
return true;
}
@@ -532,11 +535,12 @@ void WorkScheduler::initialize(bool use_opencl, int num_cpu_threads)
opencl_initialize(use_opencl);
}
+ g_work_scheduler.num_cpu_threads = num_cpu_threads;
switch (COM_threading_model()) {
case ThreadingModel::SingleThreaded:
+ g_work_scheduler.num_cpu_threads = 1;
/* Nothing to do. */
break;
-
case ThreadingModel::Queue:
threading_model_queue_initialize(num_cpu_threads);
break;
@@ -568,6 +572,11 @@ void WorkScheduler::deinitialize()
}
}
+int WorkScheduler::get_num_cpu_threads()
+{
+ return g_work_scheduler.num_cpu_threads;
+}
+
int WorkScheduler::current_thread_id()
{
if (COM_threading_model() == ThreadingModel::SingleThreaded) {