diff options
Diffstat (limited to 'source/blender/gpu/intern/gpu_node_graph.h')
-rw-r--r-- | source/blender/gpu/intern/gpu_node_graph.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_node_graph.h b/source/blender/gpu/intern/gpu_node_graph.h index 085620b30e4..75ca05ffaea 100644 --- a/source/blender/gpu/intern/gpu_node_graph.h +++ b/source/blender/gpu/intern/gpu_node_graph.h @@ -179,6 +179,21 @@ typedef struct GPUNodeGraph { void gpu_node_graph_prune_unused(GPUNodeGraph *graph); void gpu_node_graph_finalize_uniform_attrs(GPUNodeGraph *graph); + +/** + * Optimize node graph for optimized material shader path. + * Once the base material has been generated, we can modify the shader + * node graph to create one which will produce an optimally performing shader. + * This currently involves baking uniform data into constant data to enable + * aggressive constant folding by the compiler in order to reduce complexity and + * shader core memory pressure. + * + * NOTE: Graph optimizations will produce a shader which needs to be re-compiled + * more frequently, however, the default material pass will always exist to fall + * back on. + */ +void gpu_node_graph_optimize(GPUNodeGraph *graph); + /** * Free intermediate node graph. */ |