Eric Anholt <e...@anholt.net> writes: > Keith Packard <kei...@keithp.com> writes: > >> If the logic op gets left enabled, it overrides the blending >> operation, causing incorrect contents on the display. >> >> Signed-off-by: Keith Packard <kei...@keithp.com> > > Reviewed-by: Eric Anholt <e...@anholt.net>
And it's actually wrong (sigh). Need to do this in all paths through this function (even the PictOpSrc case), and we only want to do it on non-ES2 flavors. Here's an updated version.
From 1ac2ef66369f36ef132f643969ad176db39babe7 Mon Sep 17 00:00:00 2001 From: Keith Packard <kei...@keithp.com> Date: Fri, 13 May 2016 04:25:43 -0700 Subject: [PATCH xserver] glamor: Disable logic ops when doing compositing [v2] 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 Signed-off-by: Keith Packard <kei...@keithp.com> --- glamor/glamor_program.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/glamor/glamor_program.c b/glamor/glamor_program.c index 0a94de6..322d198 100644 --- a/glamor/glamor_program.c +++ b/glamor/glamor_program.c @@ -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; -- 2.8.0.rc3
-- -keith
signature.asc
Description: PGP signature
_______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel