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:
authorBrecht Van Lommel <brecht>2022-03-02 13:03:58 +0300
committerSergey Sharybin <sergey@blender.org>2022-03-02 13:45:17 +0300
commit383a6ee78c111e3e1fa0be464d5493f7941fe67c (patch)
treec2547016aee13d8831cd47b2f138c316a9853039
parent5086913b28d2c0d66167e6945edf1207f540d9e2 (diff)
Fix T94609: geometry nodes always re-evaluated with image texture nodes
previously_visible_components_mask was not preserved for Image ID nodes, which meant it was always detected as newly visible and tagged to be updated, which in turn caused the geometry nodes using it to be always updated also. Reviewed By: sergey, JacquesLucke Maniphest Tasks: T94609 Differential Revision: https://developer.blender.org/D14217
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_nodes.cc12
1 files changed, 3 insertions, 9 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
index 79d674e8415..9c842d2030c 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@ -351,16 +351,10 @@ void DepsgraphNodeBuilder::begin_build()
* same as id_orig. Additionally, such ID might have been removed, which makes the check
* for whether id_cow is expanded to access freed memory. In order to deal with this we
* check whether CoW is needed based on a scalar value which does not lead to access of
- * possibly deleted memory.
- * Additionally, this saves some space in the map by skipping mapping for datablocks which
- * do not need CoW, */
- if (!deg_copy_on_write_is_needed(id_node->id_type)) {
- id_node->id_cow = nullptr;
- continue;
- }
-
+ * possibly deleted memory. */
IDInfo *id_info = (IDInfo *)MEM_mallocN(sizeof(IDInfo), "depsgraph id info");
- if (deg_copy_on_write_is_expanded(id_node->id_cow) && id_node->id_orig != id_node->id_cow) {
+ if (deg_copy_on_write_is_needed(id_node->id_type) &&
+ deg_copy_on_write_is_expanded(id_node->id_cow) && id_node->id_orig != id_node->id_cow) {
id_info->id_cow = id_node->id_cow;
}
else {