Commit 743b6f23 authored by Keith Packard's avatar Keith Packard

glamor: Disable logic ops when doing compositing [v4]

If the logic op gets left enabled, it overrides the blending
operation, causing incorrect contents on the display.

v2: Disable only on non-ES2, but disable even for PictOpSrc

v3: Found another place this is needed in
    glamor_composite_set_shader_blend

v4: Remove change dependent on new glamor_set_composite_texture
    API. This belongs in a different patch.
    Found by Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
Reviewed-by: Michel Dänzer's avatarMichel Dänzer <michel.daenzer@amd.com>
parent f5670b4a
......@@ -445,6 +445,7 @@ static struct blendinfo composite_op_info[] = {
static void
glamor_set_blend(CARD8 op, glamor_program_alpha alpha, PicturePtr dst)
{
glamor_screen_private *glamor_priv = glamor_get_screen_private(dst->pDrawable->pScreen);
GLenum src_blend, dst_blend;
struct blendinfo *op_info;
......@@ -459,6 +460,9 @@ glamor_set_blend(CARD8 op, glamor_program_alpha alpha, PicturePtr dst)
break;
}
if (glamor_priv->gl_flavor != GLAMOR_GL_ES2)
glDisable(GL_COLOR_LOGIC_OP);
if (op == PictOpSrc)
return;
......
......@@ -1091,6 +1091,9 @@ glamor_composite_set_shader_blend(glamor_screen_private *glamor_priv,
}
}
if (glamor_priv->gl_flavor != GLAMOR_GL_ES2)
glDisable(GL_COLOR_LOGIC_OP);
if (op_info->source_blend == GL_ONE && op_info->dest_blend == GL_ZERO) {
glDisable(GL_BLEND);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment