diff options
author | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2020-09-22 15:47:10 +0300 |
---|---|---|
committer | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2020-09-22 15:50:43 +0300 |
commit | 626201683ec0d96e86d681bb0273a324cdf91916 (patch) | |
tree | f8fbff2aad4e57b25a8a843ae08e3552815af115 /intern/cycles/graph/node_type.h | |
parent | 8d1123ba220b2e473d99960ab44b798c78bad73c (diff) |
Cycles: add update flags to Node and SocketType
Those flags are meant for detecting which socket has changed, so in the
future we can have more granular updates.
`Node` now stores an `update_flags` member which is modified every time
a socket is changed though `Node::set`. The flags are or-able bits
stored in `SocketType` instances. Each `SocketType` stores a unique bit
out of 64, for the 64 bits of an uint64_t; the bit
corresponds to the index of the socket in the `Node`'s sockets array +
1, so the socket at index 5 will have the 6th bit set as its flag. This
limits us to 64 sockets per Node, which should be plenty for the current
set of `Nodes` that we have.
This does not change the behavior of other parts of Cycles.
This is part of T79131.
Reviewed By: brecht
Maniphest Tasks: T79131
Differential Revision: https://developer.blender.org/D8644
Diffstat (limited to 'intern/cycles/graph/node_type.h')
-rw-r--r-- | intern/cycles/graph/node_type.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/intern/cycles/graph/node_type.h b/intern/cycles/graph/node_type.h index a79d44b82f3..0d182945e16 100644 --- a/intern/cycles/graph/node_type.h +++ b/intern/cycles/graph/node_type.h @@ -28,6 +28,8 @@ CCL_NAMESPACE_BEGIN struct Node; struct NodeType; +typedef uint64_t SocketModifiedFlags; + /* Socket Type */ struct SocketType { @@ -88,6 +90,7 @@ struct SocketType { const NodeType **node_type; int flags; ustring ui_name; + SocketModifiedFlags modified_flag_bit; size_t size() const; bool is_array() const; |