glamor: Fall back for mixed depth 24/32 in glamor_set_alu
For ALUs which may leave the alpha channel at values other than 1.0. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1615 v2: * List safe ALUs instead of unsafe ones
This commit is contained in:
parent
8f66c15694
commit
e5a3f3e84d
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue