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:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-01-09 18:15:33 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-01-09 18:15:33 +0300
commit6deb908a5c9f34deb4c19561082b14d8eda51e43 (patch)
treee72c9fd7b77f486deea839428573c0788c9ceda9 /source/blender/depsgraph/intern/eval/deg_eval.cc
parent1cab3be7a7af483ed645c2912b3aed3292812746 (diff)
parent932d448ae013b5425efa974be5a106d9d6a16652 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/depsgraph/intern/eval/deg_eval.cc')
-rw-r--r--source/blender/depsgraph/intern/eval/deg_eval.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/depsgraph/intern/eval/deg_eval.cc b/source/blender/depsgraph/intern/eval/deg_eval.cc
index ee58a3b02a5..38a7470c0ec 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval.cc
@@ -102,7 +102,9 @@ typedef struct CalculatePengindData {
Depsgraph *graph;
} CalculatePengindData;
-static void calculate_pending_func(void *data_v, int i)
+static void calculate_pending_func(void *data_v,
+ int i,
+ const ParallelRangeTLS * /*tls*/)
{
CalculatePengindData *data = (CalculatePengindData *)data_v;
Depsgraph *graph = data->graph;
@@ -129,14 +131,17 @@ static void calculate_pending_func(void *data_v, int i)
static void calculate_pending_parents(Depsgraph *graph)
{
const int num_operations = graph->operations.size();
- const bool do_threads = num_operations > 256;
+ const bool do_threads = (num_operations > 256);
CalculatePengindData data;
data.graph = graph;
+ ParallelRangeSettings settings;
+ BLI_parallel_range_settings_defaults(&settings);
+ settings.use_threading = do_threads;
BLI_task_parallel_range(0,
num_operations,
&data,
calculate_pending_func,
- do_threads);
+ &settings);
}
static void initialize_execution(DepsgraphEvalState *state, Depsgraph *graph)