[cogl] opengl: Fix conditional call of BlendFuncSeparate
- From: Neil Roberts <nroberts src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl] opengl: Fix conditional call of BlendFuncSeparate
- Date: Fri, 7 Dec 2012 15:52:03 +0000 (UTC)
commit fc292c25db3004543e277d92693ab9cb388d2121
Author: Adam Jackson <ajax redhat com>
Date: Fri Dec 7 09:47:50 2012 -0500
opengl: Fix conditional call of BlendFuncSeparate
Checking whether src_rgb != src_alpha twice is pointless; not checking
whether dst_rgb != dst_alpha is clearly wrong.
Found by Coverity.
Signed-off-by: Adam Jackson <ajax redhat com>
https://bugzilla.gnome.org/show_bug.cgi?id=689850
Reviewed-by: Neil Roberts <neil linux intel com>
cogl/driver/gl/cogl-pipeline-opengl.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/cogl/driver/gl/cogl-pipeline-opengl.c b/cogl/driver/gl/cogl-pipeline-opengl.c
index 344078d..105321e 100644
--- a/cogl/driver/gl/cogl-pipeline-opengl.c
+++ b/cogl/driver/gl/cogl-pipeline-opengl.c
@@ -516,8 +516,8 @@ _cogl_pipeline_flush_color_blend_alpha_depth_state (
if (ctx->glBlendFuncSeparate &&
(blend_state->blend_src_factor_rgb !=
blend_state->blend_src_factor_alpha ||
- (blend_state->blend_src_factor_rgb !=
- blend_state->blend_src_factor_alpha)))
+ (blend_state->blend_dst_factor_rgb !=
+ blend_state->blend_dst_factor_alpha)))
GE (ctx, glBlendFuncSeparate (blend_state->blend_src_factor_rgb,
blend_state->blend_dst_factor_rgb,
blend_state->blend_src_factor_alpha,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]