diff options
author | Mario Kleiner <mario.kleiner.de@gmail.com> | 2018-02-27 03:05:27 +0100 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2018-02-27 10:18:06 -0500 |
commit | c326c717c8dbf4a3f0c64a031fbe6030e73ff355 (patch) | |
tree | ed5dbe3288776afcca87369dc9b350f8b4db5b71 /glamor/glamor.c | |
parent | 9ab5d91c6c228e8f5b34e4b30c5104aed6c41958 (diff) | |
download | xserver-c326c717c8dbf4a3f0c64a031fbe6030e73ff355.tar.gz |
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>
Diffstat (limited to 'glamor/glamor.c')
-rw-r--r-- | glamor/glamor.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/glamor/glamor.c b/glamor/glamor.c index 4a41fe783..d61e27563 100644 --- a/glamor/glamor.c +++ b/glamor/glamor.c @@ -805,7 +805,8 @@ glamor_fd_from_pixmap(ScreenPtr screen, switch (pixmap_priv->type) { case GLAMOR_TEXTURE_DRM: case GLAMOR_TEXTURE_ONLY: - if (!glamor_pixmap_ensure_fbo(pixmap, GL_RGBA, 0)) + if (!glamor_pixmap_ensure_fbo(pixmap, pixmap->drawable.depth == 30 ? + GL_RGB10_A2 : GL_RGBA, 0)) return -1; return glamor_egl_dri3_fd_name_from_tex(screen, pixmap, @@ -845,7 +846,8 @@ glamor_name_from_pixmap(PixmapPtr pixmap, CARD16 *stride, CARD32 *size) switch (pixmap_priv->type) { case GLAMOR_TEXTURE_DRM: case GLAMOR_TEXTURE_ONLY: - if (!glamor_pixmap_ensure_fbo(pixmap, GL_RGBA, 0)) + if (!glamor_pixmap_ensure_fbo(pixmap, pixmap->drawable.depth == 30 ? + GL_RGB10_A2 : GL_RGBA, 0)) return -1; return glamor_egl_dri3_fd_name_from_tex(pixmap->drawable.pScreen, pixmap, |