diff --git a/glamor/glamor_pixmap.c b/glamor/glamor_pixmap.c index ed273ccbb..c573e7982 100644 --- a/glamor/glamor_pixmap.c +++ b/glamor/glamor_pixmap.c @@ -136,6 +136,21 @@ glamor_set_alu(DrawablePtr drawable, unsigned char alu) glDisable(GL_COLOR_LOGIC_OP); return TRUE; } + + switch (alu) { + case GXnoop: + case GXor: + case GXset: + /* These leave the alpha channel at 1.0 */ + break; + default: + if (glamor_drawable_effective_depth(drawable) == 24 && + glamor_get_drawable_pixmap(drawable)->drawable.depth == 32) { + glamor_fallback("ALU %x not supported with mixed depth\n", alu); + return FALSE; + } + } + glEnable(GL_COLOR_LOGIC_OP); switch (alu) { case GXclear: