glamor: Fix loose ends in color depth 30 support.

This makes it work properly with OpenGL based desktop
compositing, as tested with EGL and GLX based compositing
under OpenGL-2/3, and also artifact free with XRender
based 2D compositing.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Antoine Martin <antoine@nagafix.co.uk>
This commit is contained in:
Mario Kleiner
2018-02-27 03:05:27 +01:00
committed by Adam Jackson
parent 9ab5d91c6c
commit c326c717c8
3 changed files with 15 additions and 3 deletions

View File

@@ -78,6 +78,15 @@ use_copyplane(PixmapPtr dst, GCPtr gc, glamor_program *prog, void *arg)
/* XXX handle 2 10 10 10 and 1555 formats; presumably the pixmap private knows this? */
switch (args->src_pixmap->drawable.depth) {
case 30:
glUniform4ui(prog->bitplane_uniform,
(args->bitplane >> 20) & 0x3ff,
(args->bitplane >> 10) & 0x3ff,
(args->bitplane ) & 0x3ff,
0);
glUniform4f(prog->bitmul_uniform, 0x3ff, 0x3ff, 0x3ff, 0);
break;
case 24:
glUniform4ui(prog->bitplane_uniform,
(args->bitplane >> 16) & 0xff,