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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-12-23 00:29:44 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-12-23 00:29:44 +0400
commit4d7c44717aa67671518431183d38dab5d2a7a3dd (patch)
tree7738e22f5990b9bfbd4d15c845990b41b91728b1 /source/blender/gpu
parent3563f677f88baf7b1f68d7f435787e3bf4a20d24 (diff)
Code cleanup: fix some clang static checker warnings.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/intern/gpu_codegen.c8
-rw-r--r--source/blender/gpu/intern/gpu_draw.c2
-rw-r--r--source/blender/gpu/intern/gpu_material.c1
3 files changed, 3 insertions, 8 deletions
diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c
index 33796b7c215..7182bbc38e2 100644
--- a/source/blender/gpu/intern/gpu_codegen.c
+++ b/source/blender/gpu/intern/gpu_codegen.c
@@ -538,12 +538,8 @@ static void codegen_call_functions(DynStr *ds, ListBase *nodes, GPUOutput *final
BLI_dynstr_appendf(ds, ", gl_TexCoord[%d].st", input->texid);
}
else if (input->source == GPU_SOURCE_TEX_PIXEL) {
- if (input->link && input->link->output)
- codegen_convert_datatype(ds, input->link->output->type, input->type,
- "tmp", input->link->output->id);
- else
- codegen_convert_datatype(ds, input->link->output->type, input->type,
- "tex", input->texid);
+ codegen_convert_datatype(ds, input->link->output->type, input->type,
+ "tmp", input->link->output->id);
}
else if(input->source == GPU_SOURCE_BUILTIN)
BLI_dynstr_appendf(ds, "%s", GPU_builtin_name(input->builtin));
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index 2dcce996065..5d36ba169f3 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -1069,7 +1069,7 @@ void GPU_begin_object_materials(View3D *v3d, RegionView3D *rv3d, Scene *scene, O
/* setting do_alpha_after = 1 indicates this object needs to be
* drawn in a second alpha pass for improved blending */
- if(GMS.use_alpha_pass && !GMS.is_alpha_pass)
+ if(do_alpha_after && !GMS.is_alpha_pass)
if(ELEM3(alphablend, GPU_BLEND_ALPHA, GPU_BLEND_ADD, GPU_BLEND_ALPHA_SORT))
*do_alpha_after= 1;
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c
index 250ea51f8c8..fb1d10b5491 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -972,7 +972,6 @@ static void do_material_tex(GPUShadeInput *shi)
GPU_link(mat, "mtex_mapping_ofs", texco, GPU_uniform(ofs), &texco);
talpha = 0;
- rgbnor = 0;
if(tex && tex->type == TEX_IMAGE && tex->ima) {
GPU_link(mat, "mtex_image", texco, GPU_image(tex->ima, &tex->iuser), &tin, &trgb);