diff options
author | Manuel Castilla <manzanillawork@gmail.com> | 2021-06-01 11:25:38 +0300 |
---|---|---|
committer | Manuel Castilla <manzanillawork@gmail.com> | 2021-06-01 11:51:53 +0300 |
commit | 9adfd278f7487798f1b0124c7e44cf9934b4ba54 (patch) | |
tree | 5061ed25bdace84562707533aeaf0f550510313f /source/blender/makesdna | |
parent | 930ad9257d00a1891a948ff71756ffe8acb61686 (diff) |
Compositor: Full-frame base system
This patch adds the base code needed to make the full-frame system work for both current tiled/per-pixel implementation of operations and full-frame.
Two execution models:
- Tiled: Current implementation. Renders execution groups in tiles from outputs to input. Not all operations are buffered. Runs the tiled/per-pixel implementation.
- FullFrame: All operations are buffered. Fully renders operations from inputs to outputs. Runs full-frame implementation of operations if available otherwise the current tiled/per-pixel. Creates output buffers on first read and free them as soon as all its readers have finished, reducing peak memory usage of complex/long trees. Operations are multi-threaded but do not run in parallel as Tiled (will be done in another patch).
This should allow us to convert operations to full-frame in small steps with the system already working and solve the problem of high memory usage.
FullFrame breaking changes respect Tiled system, mainly:
- Translate, Rotate, Scale, and Transform take effect immediately instead of next buffered operation.
- Any sampling is always done over inputs instead of last buffered operation.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D11113
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_node_types.h | 9 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_userdef_types.h | 3 |
2 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index 58c94b6f369..0fa1d1a74ac 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -461,7 +461,6 @@ typedef struct bNodeTree { short is_updating; /** Generic temporary flag for recursion check (DFS/BFS). */ short done; - char _pad2[4]; /** Specific node type this tree is used for. */ int nodetype DNA_DEPRECATED; @@ -472,6 +471,8 @@ typedef struct bNodeTree { short render_quality; /** Tile size for compositor engine. */ int chunksize; + /** Execution mode to use for compositor engine. */ + int execution_mode; rctf viewer_border; @@ -545,6 +546,12 @@ typedef enum eNodeTreeUpdate { NTREE_UPDATE_GROUP = (NTREE_UPDATE_GROUP_IN | NTREE_UPDATE_GROUP_OUT), } eNodeTreeUpdate; +/* tree->execution_mode */ +typedef enum eNodeTreeExecutionMode { + NTREE_EXECUTION_MODE_TILED = 0, + NTREE_EXECUTION_MODE_FULL_FRAME = 1, +} eNodeTreeExecutionMode; + /* socket value structs for input buttons * DEPRECATED now using ID properties */ diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 1fed8e14bd6..61d2c04d98b 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -642,11 +642,12 @@ typedef struct UserDef_Experimental { * when the release cycle is not alpha. */ char use_new_hair_type; char use_new_point_cloud_type; + char use_full_frame_compositor; char use_sculpt_vertex_colors; char use_sculpt_tools_tilt; char use_asset_browser; char use_override_templates; - char _pad[6]; + char _pad[5]; /** `makesdna` does not allow empty structs. */ } UserDef_Experimental; |