Blender Git Loki

Git Commits -> Revision fc5be0b

Revision fc5be0b by Manuel Castilla (master)
July 6, 2021, 16:11 (GMT)
Compositor: Constant folding

Currently there is no clear way to know if an operation is constant
(i.e. when all rendered pixels have same values). Operations may
need to get constant input values before rendering to determine
their resolution or areas of interest. This is the case of scale, rotate
and translate operations. Only "set operations" are known as
constant but many more are constant when all their inputs are so.
Such cases can be optimized by only rendering one pixel.

Current solution for tiled implementation is to get first pixel
from input. This works for root execution groups, others
need previous groups to be rendered.

On full frame implementation this is not possible, because buffers
are created on rendering to reduce peak memory and there is
no per pixel calls.

This patch evaluates all operations that are constant into primitive
operations (Value/Vector/Color) before determining resolutions.

Reviewed By: jbakker

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

Commit Details:

Full Hash: fc5be0b59883c28d5d0702acb96dc3d72295dda8
Parent Commit: a070dd8
Lines Changed: +431, -30

4 Added Paths:

/source/blender/compositor/intern/COM_ConstantFolder.cc (+186, -0) (View)
/source/blender/compositor/intern/COM_ConstantFolder.h (+64, -0) (View)
/source/blender/compositor/operations/COM_ConstantOperation.cc (+28, -0) (View)
/source/blender/compositor/operations/COM_ConstantOperation.h (+36, -0) (View)

14 Modified Paths:

/source/blender/compositor/CMakeLists.txt (+4, -0) (Diff)
/source/blender/compositor/intern/COM_BufferOperation.cc (+7, -0) (Diff)
/source/blender/compositor/intern/COM_BufferOperation.h (+3, -2) (Diff)
/source/blender/compositor/intern/COM_Debug.cc (+7, -2) (Diff)
/source/blender/compositor/intern/COM_Debug.h (+1, -1) (Diff)
/source/blender/compositor/intern/COM_FullFrameExecutionModel.cc (+2, -4) (Diff)
/source/blender/compositor/intern/COM_NodeOperation.cc (+6, -0) (Diff)
/source/blender/compositor/intern/COM_NodeOperation.h (+14, -0) (Diff)
/source/blender/compositor/intern/COM_NodeOperationBuilder.cc (+32, -0) (Diff)
/source/blender/compositor/intern/COM_NodeOperationBuilder.h (+3, -0) (Diff)
/source/blender/compositor/operations/COM_SetColorOperation.h (+7, -2) (Diff)
/source/blender/compositor/operations/COM_SetValueOperation.h (+7, -2) (Diff)
/source/blender/compositor/operations/COM_SetVectorOperation.cc (+3, -3) (Diff)
/source/blender/compositor/operations/COM_SetVectorOperation.h (+21, -14) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021