Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/intern/gpu_node_graph.h
| Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | typedef enum eGPUDataSource { | ||||
| GPU_SOURCE_OUTPUT, | GPU_SOURCE_OUTPUT, | ||||
| GPU_SOURCE_CONSTANT, | GPU_SOURCE_CONSTANT, | ||||
| GPU_SOURCE_UNIFORM, | GPU_SOURCE_UNIFORM, | ||||
| GPU_SOURCE_ATTR, | GPU_SOURCE_ATTR, | ||||
| GPU_SOURCE_BUILTIN, | GPU_SOURCE_BUILTIN, | ||||
| GPU_SOURCE_STRUCT, | GPU_SOURCE_STRUCT, | ||||
| GPU_SOURCE_TEX, | GPU_SOURCE_TEX, | ||||
| GPU_SOURCE_TEX_TILED_MAPPING, | GPU_SOURCE_TEX_TILED_MAPPING, | ||||
| GPU_SOURCE_VOLUME_GRID, | |||||
| GPU_SOURCE_VOLUME_GRID_TRANSFORM, | |||||
| } eGPUDataSource; | } eGPUDataSource; | ||||
| typedef enum { | typedef enum { | ||||
| GPU_NODE_LINK_NONE = 0, | GPU_NODE_LINK_NONE = 0, | ||||
| GPU_NODE_LINK_ATTR, | GPU_NODE_LINK_ATTR, | ||||
| GPU_NODE_LINK_BUILTIN, | GPU_NODE_LINK_BUILTIN, | ||||
| GPU_NODE_LINK_COLORBAND, | GPU_NODE_LINK_COLORBAND, | ||||
| GPU_NODE_LINK_CONSTANT, | GPU_NODE_LINK_CONSTANT, | ||||
| GPU_NODE_LINK_IMAGE, | GPU_NODE_LINK_IMAGE, | ||||
| GPU_NODE_LINK_IMAGE_TILED, | GPU_NODE_LINK_IMAGE_TILED, | ||||
| GPU_NODE_LINK_IMAGE_TILED_MAPPING, | GPU_NODE_LINK_IMAGE_TILED_MAPPING, | ||||
| GPU_NODE_LINK_VOLUME_GRID, | |||||
| GPU_NODE_LINK_OUTPUT, | GPU_NODE_LINK_OUTPUT, | ||||
| GPU_NODE_LINK_UNIFORM, | GPU_NODE_LINK_UNIFORM, | ||||
| } GPUNodeLinkType; | } GPUNodeLinkType; | ||||
| struct GPUNode { | struct GPUNode { | ||||
| struct GPUNode *next, *prev; | struct GPUNode *next, *prev; | ||||
| const char *name; | const char *name; | ||||
| Show All 13 Lines | struct GPUNodeLink { | ||||
| union { | union { | ||||
| /* GPU_NODE_LINK_CONSTANT | GPU_NODE_LINK_UNIFORM */ | /* GPU_NODE_LINK_CONSTANT | GPU_NODE_LINK_UNIFORM */ | ||||
| const float *data; | const float *data; | ||||
| /* GPU_NODE_LINK_BUILTIN */ | /* GPU_NODE_LINK_BUILTIN */ | ||||
| eGPUBuiltin builtin; | eGPUBuiltin builtin; | ||||
| /* GPU_NODE_LINK_COLORBAND */ | /* GPU_NODE_LINK_COLORBAND */ | ||||
| struct GPUTexture **colorband; | struct GPUTexture **colorband; | ||||
| /* GPU_NODE_LINK_VOLUME_GRID */ | |||||
| struct GPUMaterialVolumeGrid *volume_grid; | |||||
| /* GPU_NODE_LINK_OUTPUT */ | /* GPU_NODE_LINK_OUTPUT */ | ||||
| struct GPUOutput *output; | struct GPUOutput *output; | ||||
| /* GPU_NODE_LINK_ATTR */ | /* GPU_NODE_LINK_ATTR */ | ||||
| struct GPUMaterialAttribute *attr; | struct GPUMaterialAttribute *attr; | ||||
| /* GPU_NODE_LINK_IMAGE_BLENDER */ | /* GPU_NODE_LINK_IMAGE_BLENDER */ | ||||
| struct GPUMaterialTexture *texture; | struct GPUMaterialTexture *texture; | ||||
| }; | }; | ||||
| }; | }; | ||||
| Show All 22 Lines | union { | ||||
| /* GPU_SOURCE_CONSTANT | GPU_SOURCE_UNIFORM */ | /* GPU_SOURCE_CONSTANT | GPU_SOURCE_UNIFORM */ | ||||
| float vec[16]; /* vector data */ | float vec[16]; /* vector data */ | ||||
| /* GPU_SOURCE_BUILTIN */ | /* GPU_SOURCE_BUILTIN */ | ||||
| eGPUBuiltin builtin; /* builtin uniform */ | eGPUBuiltin builtin; /* builtin uniform */ | ||||
| /* GPU_SOURCE_TEX | GPU_SOURCE_TEX_TILED_MAPPING */ | /* GPU_SOURCE_TEX | GPU_SOURCE_TEX_TILED_MAPPING */ | ||||
| struct GPUMaterialTexture *texture; | struct GPUMaterialTexture *texture; | ||||
| /* GPU_SOURCE_ATTR */ | /* GPU_SOURCE_ATTR */ | ||||
| struct GPUMaterialAttribute *attr; | struct GPUMaterialAttribute *attr; | ||||
| /* GPU_SOURCE_VOLUME_GRID */ | |||||
| struct GPUMaterialVolumeGrid *volume_grid; | |||||
| }; | }; | ||||
| } GPUInput; | } GPUInput; | ||||
| typedef struct GPUNodeGraph { | typedef struct GPUNodeGraph { | ||||
| /* Nodes */ | /* Nodes */ | ||||
| ListBase nodes; | ListBase nodes; | ||||
| /* Output. */ | /* Output. */ | ||||
| GPUNodeLink *outlink; | GPUNodeLink *outlink; | ||||
| /* Requested attributes and textures. */ | /* Requested attributes and textures. */ | ||||
| ListBase attributes; | ListBase attributes; | ||||
| ListBase textures; | ListBase textures; | ||||
| ListBase volume_grids; | |||||
| } 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_free_nodes(GPUNodeGraph *graph); | void gpu_node_graph_free_nodes(GPUNodeGraph *graph); | ||||
| void gpu_node_graph_free(GPUNodeGraph *graph); | void gpu_node_graph_free(GPUNodeGraph *graph); | ||||
| Show All 11 Lines | |||||