Depsgraph: execute all COPY_ON_WRITE nodes first as a separate stage.
authorAlexander Gavrilov <angavrilov@gmail.com>
Tue, 4 Dec 2018 10:58:29 +0000 (13:58 +0300)
committerAlexander Gavrilov <angavrilov@gmail.com>
Tue, 4 Dec 2018 11:08:50 +0000 (14:08 +0300)
commitb97cd0e6908b133514232c57509861ca06eca91e
tree2af01434f1fd5402af1a9ece5ef53286ce0022b3
parent01581d4a1eb595f2bb49d4b87aebfa8bd67ceb38
Depsgraph: execute all COPY_ON_WRITE nodes first as a separate stage.

COW nodes in the graph are mostly connected via a relation type
that doesn't propagate the update flags. Unfortunately, due to
the scheduling implementation that means the relations don't
actually guarantee execution order for indirect dependencies.
Relations also don't guarantee order in case of cycles.

As mentioned in IRC, the simplest way to fix possible problems
is to execute all COW nodes as a separate execution stage. This
seems to fix crashes with Data Transfer modifier in a cycle.

Staging works by simply delaying actual scheduling of tasks for
non-COW nodes until the second run of schedule_graph.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D4027
source/blender/depsgraph/intern/depsgraph.cc
source/blender/depsgraph/intern/eval/deg_eval.cc