Blender Git Loki

Git Commits -> Revision 47276b8

Revision 47276b8 by Jacques Lucke (master)
November 23, 2021, 13:49 (GMT)
Geometry Nodes: reduce overhead when processing single values

Currently the geometry nodes evaluator always stores a field for every
type that supports it, even if it is just a single value. This results in a lot
of overhead when there are many sockets that just contain a single
value, which is often the case.

This introduces a new `ValueOrField<T>` type that is used by the geometry
nodes evaluator. Now a field will only be created when it is actually
necessary. See D13307 for more details. In extrem cases this can speed
up the evaluation 2-3x (those cases are probably never hit in practice
though, but it's good to get rid of unnecessary overhead nevertheless).

Differential Revision: https://developer.blender.org/D13307

Commit Details:

Full Hash: 47276b84701727c2f187c77f1ec502b4ca4963bd
Parent Commit: 0bedd5d
Lines Changed: +388, -109

9 Modified Paths:

/source/blender/editors/space_node/node_draw.cc (+24, -24) (Diff)
/source/blender/functions/FN_field.hh (+62, -1) (Diff)
/source/blender/functions/FN_field_cpp_type.hh (+87, -0) (Diff)
/source/blender/functions/intern/field.cc (+8, -2) (Diff)
/source/blender/modifiers/intern/MOD_nodes.cc (+20, -9) (Diff)
/source/blender/modifiers/intern/MOD_nodes_evaluator.cc (+115, -28) (Diff)
/source/blender/nodes/intern/geometry_nodes_eval_log.cc (+30, -16) (Diff)
/source/blender/nodes/intern/node_socket.cc (+13, -15) (Diff)
/source/blender/nodes/NOD_geometry_exec.hh (+29, -14) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021