Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/intern/gpu_node_graph.h
| Show First 20 Lines • Show All 173 Lines • ▼ Show 20 Lines | typedef struct GPUNodeGraph { | ||||
| /** Set of all the GLSL lib code blocks . */ | /** Set of all the GLSL lib code blocks . */ | ||||
| GSet *used_libraries; | GSet *used_libraries; | ||||
| } GPUNodeGraph; | } GPUNodeGraph; | ||||
| /* Node Graph */ | /* Node Graph */ | ||||
| void gpu_node_graph_prune_unused(GPUNodeGraph *graph); | void gpu_node_graph_prune_unused(GPUNodeGraph *graph); | ||||
| void gpu_node_graph_finalize_uniform_attrs(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. | * Free intermediate node graph. | ||||
| */ | */ | ||||
| void gpu_node_graph_free_nodes(GPUNodeGraph *graph); | void gpu_node_graph_free_nodes(GPUNodeGraph *graph); | ||||
| /** | /** | ||||
| * Free both node graph and requested attributes and textures. | * Free both node graph and requested attributes and textures. | ||||
| */ | */ | ||||
| void gpu_node_graph_free(GPUNodeGraph *graph); | void gpu_node_graph_free(GPUNodeGraph *graph); | ||||
| Show All 20 Lines | |||||