diff options
-rw-r--r-- | glamor/glamor.c | 8 | ||||
-rw-r--r-- | glamor/glamor_picture.c | 7 |
2 files changed, 6 insertions, 9 deletions
diff --git a/glamor/glamor.c b/glamor/glamor.c index da2ea94ba..bc91de201 100644 --- a/glamor/glamor.c +++ b/glamor/glamor.c @@ -586,10 +586,10 @@ glamor_setup_formats(ScreenPtr screen) if (glamor_priv->is_gles) { assert(X_BYTE_ORDER == X_LITTLE_ENDIAN); - glamor_add_format(screen, 24, PICT_x8b8g8r8, - GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE, TRUE); - glamor_add_format(screen, 32, PICT_a8b8g8r8, - GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE, TRUE); + glamor_add_format(screen, 24, PICT_x8r8g8b8, + GL_BGRA, GL_BGRA, GL_UNSIGNED_BYTE, TRUE); + glamor_add_format(screen, 32, PICT_a8r8g8b8, + GL_BGRA, GL_BGRA, GL_UNSIGNED_BYTE, TRUE); } else { glamor_add_format(screen, 24, PICT_x8r8g8b8, GL_RGBA, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, TRUE); diff --git a/glamor/glamor_picture.c b/glamor/glamor_picture.c index 33b3bebd9..2152b85e1 100644 --- a/glamor/glamor_picture.c +++ b/glamor/glamor_picture.c @@ -94,7 +94,7 @@ glamor_get_tex_format_type_from_pictformat(ScreenPtr pScreen, *tex_format = GL_BGRA; *tex_type = GL_UNSIGNED_INT_8_8_8_8; } else { - *tex_format = GL_RGBA; + *tex_format = GL_BGRA; *tex_type = GL_UNSIGNED_BYTE; swizzle[0] = GL_GREEN; @@ -113,12 +113,9 @@ glamor_get_tex_format_type_from_pictformat(ScreenPtr pScreen, *tex_format = GL_BGRA; *tex_type = GL_UNSIGNED_INT_8_8_8_8_REV; } else { - *tex_format = GL_RGBA; + *tex_format = GL_BGRA; *tex_type = GL_UNSIGNED_BYTE; - swizzle[0] = GL_BLUE; - swizzle[2] = GL_RED; - if (!is_little_endian) byte_swap_swizzle(swizzle); break; |