From f32640109469a47b9725b736be61e15ff46f9fee Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 7 Dec 2012 09:47:50 -0500 Subject: [PATCH] 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 https://bugzilla.gnome.org/show_bug.cgi?id=689850 Reviewed-by: Neil Roberts (cherry picked from commit fc292c25db3004543e277d92693ab9cb388d2121) --- cogl/cogl-pipeline-opengl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cogl/cogl-pipeline-opengl.c b/cogl/cogl-pipeline-opengl.c index a047e81e3..cb34cb9a6 100644 --- a/cogl/cogl-pipeline-opengl.c +++ b/cogl/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,