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-05 18:33:13 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-01-09 18:09:33 +0300
commitd2708b0f73d5f0e0a40b36da21c6a0d15405e739 (patch)
tree53d699a0a7701dbe009234633a38065e6f474cdf /source/blender/depsgraph/intern/eval
parentf5d64b59f5152114cfa25a2b7433ed25204cb149 (diff)
Task scheduler: Get rid of extended version of parallel range callback
Wrap all arguments into TLS type of argument. Avoids some branching and also makes it easier to extend things in the future.
Diffstat (limited to 'source/blender/depsgraph/intern/eval')
-rw-r--r--source/blender/depsgraph/intern/eval/deg_eval.cc4
-rw-r--r--source/blender/depsgraph/intern/eval/deg_eval_flush.cc12
2 files changed, 12 insertions, 4 deletions
diff --git a/source/blender/depsgraph/intern/eval/deg_eval.cc b/source/blender/depsgraph/intern/eval/deg_eval.cc
index 09d25be41d6..4c5d68fb7ef 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval.cc
@@ -107,7 +107,9 @@ typedef struct CalculatePengindData {
unsigned int layers;
} 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;
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
index 63d010849c3..546d4e3cf5d 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
@@ -83,14 +83,18 @@ void lib_id_recalc_data_tag(Main *bmain, ID *id)
DEG_id_type_tag(bmain, GS(id->name));
}
-void flush_init_operation_node_func(void *data_v, int i)
+void flush_init_operation_node_func(void *data_v,
+ int i,
+ const ParallelRangeTLS * /*tls*/)
{
Depsgraph *graph = (Depsgraph *)data_v;
OperationDepsNode *node = graph->operations[i];
node->scheduled = false;
}
-void flush_init_id_node_func(void *data_v, int i)
+void flush_init_id_node_func(void *data_v,
+ int i,
+ const ParallelRangeTLS * /*tls*/)
{
Depsgraph *graph = (Depsgraph *)data_v;
IDDepsNode *id_node = graph->id_nodes[i];
@@ -279,7 +283,9 @@ void deg_graph_flush_updates(Main *bmain, Depsgraph *graph)
flush_editors_id_update(bmain, graph);
}
-static void graph_clear_func(void *data_v, int i)
+static void graph_clear_func(void *data_v,
+ int i,
+ const ParallelRangeTLS * /*tls*/)
{
Depsgraph *graph = (Depsgraph *)data_v;
OperationDepsNode *node = graph->operations[i];