Page MenuHome

Fix T94609: geometry nodes always re-evaluated with image texture nodes
ClosedPublic

Authored by Brecht Van Lommel (brecht) on Mar 1 2022, 6:43 PM.

Details

Summary

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.

Diff Detail

Repository
rB Blender
Branch
blender-v3.1-release
Build Status
Buildable 20783
Build 20783: arc lint + arc unit

Event Timeline

Brecht Van Lommel (brecht) requested review of this revision.Mar 1 2022, 6:43 PM
Brecht Van Lommel (brecht) created this revision.

More specifically the problem is:

  • Image datablocks do not use CoW.
  • DepsgraphNodeBuilder::begin_build excludes non-CoW datablocks from id_info_hash_.
  • Because of this, previously_visible_components_mask is lost and set to zero for corresponding ID node.
  • graph_tag_ids_for_visible_update finds that the ID node was not previously visible, and tags it to be updated.

The modified code should still avoid accessing possibly deleted memory, but no longer saves id_info_hash_ memory for non-CoW datablocks.

This revision is now accepted and ready to land.Mar 2 2022, 9:54 AM

Can you or someone else commit this patch for 3.1? Assuming we change to bcon5 today.

I will commit, no worries.