diff options
Diffstat (limited to 'source/blender/gpu/intern/gpu_codegen.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_codegen.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c index b5512aa108d..a9cef0b5ad3 100644 --- a/source/blender/gpu/intern/gpu_codegen.c +++ b/source/blender/gpu/intern/gpu_codegen.c @@ -109,7 +109,7 @@ static int gpu_str_prefix(const char *str, const char *prefix) str++; prefix++; } - + return (*prefix == '\0'); } @@ -221,7 +221,7 @@ static char *gpu_generate_function_prototyps(GHash *hash) GPUFunction *function; char *name, *prototypes; int a; - + /* automatically generate function prototypes to add to the top of the * generated code, to avoid have to add the actual code & recompile all */ ghi = BLI_ghashIterator_new(hash); @@ -610,7 +610,7 @@ static void codegen_call_functions(DynStr *ds, ListBase *nodes, GPUOutput *final for (node = nodes->first; node; node = node->next) { BLI_dynstr_appendf(ds, "\t%s(", node->name); - + for (input = node->inputs.first; input; input = input->next) { if (input->source == GPU_SOURCE_TEX) { BLI_dynstr_appendf(ds, "samp%d", input->texid); @@ -740,7 +740,7 @@ static char *code_generate_vertex(ListBase *nodes, const GPUMatType type) GPUInput *input; char *code; char *vertcode = NULL; - + for (node = nodes->first; node; node = node->next) { for (input = node->inputs.first; input; input = input->next) { if (input->source == GPU_SOURCE_ATTRIB && input->attribfirst) { @@ -781,7 +781,7 @@ static char *code_generate_vertex(ListBase *nodes, const GPUMatType type) } BLI_dynstr_append(ds, vertcode); - + for (node = nodes->first; node; node = node->next) for (input = node->inputs.first; input; input = input->next) if (input->source == GPU_SOURCE_ATTRIB && input->attribfirst) { @@ -1084,7 +1084,7 @@ void GPU_pass_unbind(GPUPass *pass) if (input->ima || input->prv) input->tex = NULL; } - + GPU_shader_unbind(); } @@ -1105,7 +1105,7 @@ static void gpu_node_link_free(GPUNodeLink *link) if (link->users < 0) fprintf(stderr, "GPU_node_link_free: negative refcount\n"); - + if (link->users == 0) { if (link->output) link->output->link = NULL; @@ -1146,7 +1146,7 @@ static void gpu_node_input_link(GPUNode *node, GPUNodeLink *link, const GPUType return; } } - + input = MEM_callocN(sizeof(GPUInput), "GPUInput"); input->node = node; @@ -1372,7 +1372,7 @@ static void gpu_nodes_get_builtin_flag(ListBase *nodes, int *builtin) { GPUNode *node; GPUInput *input; - + *builtin = 0; for (node = nodes->first; node; node = node->next) @@ -1443,10 +1443,10 @@ GPUNodeLink *GPU_cube_map(Image *ima, ImageUser *iuser, bool is_data) GPUNodeLink *GPU_image_preview(PreviewImage *prv) { GPUNodeLink *link = GPU_node_link_create(); - + link->image = GPU_NODE_LINK_IMAGE_PREVIEW; link->ptr1 = prv; - + return link; } @@ -1550,7 +1550,7 @@ bool GPU_stack_link(GPUMaterial *mat, const char *name, GPUNodeStack *in, GPUNod totin++; } } - + if (out) { for (i = 0; out[i].type != GPU_NONE; i++) { gpu_node_output(node, out[i].type, &out[i].link); @@ -1583,7 +1583,7 @@ bool GPU_stack_link(GPUMaterial *mat, const char *name, GPUNodeStack *in, GPUNod va_end(params); gpu_material_add_node(mat, node); - + return true; } @@ -1621,7 +1621,7 @@ static void gpu_nodes_tag(GPUNodeLink *link) node = link->output->node; if (node->tag) return; - + node->tag = true; for (input = node->inputs.first; input; input = input->next) if (input->link) @@ -1704,7 +1704,7 @@ GPUPass *GPU_generate_pass( gpu_nodes_free(nodes); return NULL; } - + /* create pass */ pass = MEM_callocN(sizeof(GPUPass), "GPUPass"); |