Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-05-31 16:21:16 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-05-31 16:22:52 +0300
commitaba4e6810f8b4d0e459137b64e061a2cadc457d1 (patch)
tree2b6159c7ba0f23c020600b71276772fa4a882b5b /source/blender/gpu/intern
parent72a563cdee8fef198a200ff65b57ddb847c01795 (diff)
Cleanup: style, use braces in source/ (include disabled blocks)
Diffstat (limited to 'source/blender/gpu/intern')
-rw-r--r--source/blender/gpu/intern/gpu_codegen.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c
index 8dda98ab990..12c35d76ac4 100644
--- a/source/blender/gpu/intern/gpu_codegen.c
+++ b/source/blender/gpu/intern/gpu_codegen.c
@@ -328,23 +328,29 @@ static char *gpu_generate_function_prototyps(GHash *hash)
BLI_dynstr_appendf(ds, "void %s(", name);
for (a = 0; a < function->totparam; a++) {
- if (function->paramqual[a] == FUNCTION_QUAL_OUT)
+ if (function->paramqual[a] == FUNCTION_QUAL_OUT) {
BLI_dynstr_append(ds, "out ");
- else if (function->paramqual[a] == FUNCTION_QUAL_INOUT)
+ }
+ else if (function->paramqual[a] == FUNCTION_QUAL_INOUT) {
BLI_dynstr_append(ds, "inout ");
+ }
- if (function->paramtype[a] == GPU_TEX2D)
+ if (function->paramtype[a] == GPU_TEX2D) {
BLI_dynstr_append(ds, "sampler2D");
- else if (function->paramtype[a] == GPU_SHADOW2D)
+ }
+ else if (function->paramtype[a] == GPU_SHADOW2D) {
BLI_dynstr_append(ds, "sampler2DShadow");
- else
+ }
+ else {
BLI_dynstr_append(ds, GPU_DATATYPE_STR[function->paramtype[a]]);
+ }
# if 0
BLI_dynstr_appendf(ds, " param%d", a);
# endif
- if (a != function->totparam - 1)
+ if (a != function->totparam - 1) {
BLI_dynstr_append(ds, ", ");
+ }
}
BLI_dynstr_append(ds, ");\n");
}
@@ -937,8 +943,9 @@ static char *code_generate_fragment(GPUMaterial *material,
BLI_dynstr_free(ds);
#if 0
- if (G.debug & G_DEBUG)
+ if (G.debug & G_DEBUG) {
printf("%s\n", code);
+ }
#endif
return code;
@@ -1209,8 +1216,9 @@ static char *code_generate_vertex(ListBase *nodes, const char *vert_code, bool u
BLI_dynstr_free(ds);
#if 0
- if (G.debug & G_DEBUG)
+ if (G.debug & G_DEBUG) {
printf("%s\n", code);
+ }
#endif
return code;