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@blender.org>2022-07-20 10:59:33 +0300
committerSergey Sharybin <sergey@blender.org>2022-07-21 10:48:59 +0300
commit4089b7b80ba291dc04266a0dc58820ceeb48eb7b (patch)
treecd6a0c3e148bcc94fcd200bc25f0502799636146 /source/blender/depsgraph
parentd6faee2824b9647a96a3679ead7220bf32b2430b (diff)
Depsgraph: Clear operation evaluation flags early on
The goal is to make it possible to evaluate the graph in multiple passes without evaluating the same node multiple times. Currently should not be any functional changes.
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r--source/blender/depsgraph/intern/eval/deg_eval.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/eval/deg_eval.cc b/source/blender/depsgraph/intern/eval/deg_eval.cc
index 9ac1f5275ac..47f2a8ca219 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval.cc
@@ -101,6 +101,12 @@ void evaluate_node(const DepsgraphEvalState *state, OperationNode *operation_nod
else {
operation_node->evaluate(depsgraph);
}
+
+ /* Clear the flag early on, allowing partial updates without re-evaluating the same node multiple
+ * times.
+ * This is a thread-safe modification as the node's flags are only read for a non-scheduled nodes
+ * and this node has been scheduled. */
+ operation_node->flag &= ~DEPSOP_FLAG_NEEDS_UPDATE;
}
void deg_task_run_func(TaskPool *pool, void *taskdata)