Hi,
On 14-05-16 17:52, Keith Packard wrote:
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
Signed-off-by: Keith Packard <[email protected]>
I've given this series a quick test run on skylake integrated graphics
with the modesetting driver.
I've not noticed any regressions:
Tested-by: Hans de Goede <[email protected]>
Note I've not actually tested if these patches fix the issues at
hand, I've only run my normal stuff and did not notice any
regressions.
Regards,
Hans
---
glamor/glamor_program.c | 4 ++++
glamor/glamor_render.c | 6 +++++-
2 files changed, 9 insertions(+), 1 deletion(-)
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;
diff --git a/glamor/glamor_render.c b/glamor/glamor_render.c
index 65f7059..ea9abc7 100644
--- a/glamor/glamor_render.c
+++ b/glamor/glamor_render.c
@@ -1075,10 +1075,14 @@ glamor_composite_set_shader_blend(glamor_screen_private
*glamor_priv,
glamor_set_composite_texture(glamor_priv, 1,
shader->mask,
shader->mask_pixmap, shader->mask_wh,
- shader->mask_repeat_mode);
+ shader->mask_repeat_mode,
+ dest_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);
}
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel