[PATCH 7/7] XXX glamor: Only use supported tex formats

Maarten Lankhorst maarten.lankhorst at ubuntu.com
Mon Jan 12 06:29:37 PST 2015


Some GLES2 implementations don't support GL_UNSIGNED_8888_REV and only
guarantee less fancy things to work.

I'm only certain it fixes the GLES2 errors, but is this a sane way to handle
things? Or am I just shutting up the errors?
---
 glamor/glamor_transfer.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/glamor/glamor_transfer.c b/glamor/glamor_transfer.c
index aa5e861..28b910d 100644
--- a/glamor/glamor_transfer.c
+++ b/glamor/glamor_transfer.c
@@ -30,16 +30,16 @@ glamor_format_for_pixmap(PixmapPtr pixmap, GLenum *format, GLenum *type)
     switch (pixmap->drawable.depth) {
     case 24:
     case 32:
-        *format = GL_BGRA;
-        *type = GL_UNSIGNED_INT_8_8_8_8_REV;
+        *format = GL_RGBA;
+        *type = GL_UNSIGNED_BYTE;
         break;
     case 16:
         *format = GL_RGB;
         *type = GL_UNSIGNED_SHORT_5_6_5;
         break;
     case 15:
-        *format = GL_BGRA;
-        *type = GL_UNSIGNED_SHORT_1_5_5_5_REV;
+        *format = GL_RGBA;
+        *type = GL_UNSIGNED_SHORT_5_5_5_1;
         break;
     case 8:
         *format = GL_ALPHA;
-- 
2.2.1



More information about the xorg-devel mailing list