[Mesa-dev] [PATCH 07/13] st/dri: Convert to bytewise formats

Adam Jackson ajax at redhat.com
Thu May 16 06:06:10 PDT 2013


Reviewed-by: Adam Jackson <ajax at redhat.com>
---
 src/gallium/state_trackers/dri/common/dri_screen.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/gallium/state_trackers/dri/common/dri_screen.c b/src/gallium/state_trackers/dri/common/dri_screen.c
index e09fe1d..43cca30 100644
--- a/src/gallium/state_trackers/dri/common/dri_screen.c
+++ b/src/gallium/state_trackers/dri/common/dri_screen.c
@@ -87,8 +87,8 @@ dri_fill_in_modes(struct dri_screen *screen)
       MESA_FORMAT_RGB565,
    };
    static const enum pipe_format pipe_formats[3] = {
-      PIPE_FORMAT_B8G8R8A8_UNORM,
-      PIPE_FORMAT_B8G8R8X8_UNORM,
+      PIPE_FORMAT_ARGB8888_UNORM,
+      PIPE_FORMAT_XRGB8888_UNORM,
       PIPE_FORMAT_B5G6R5_UNORM,
    };
    gl_format format;
@@ -250,11 +250,11 @@ dri_fill_st_visual(struct st_visual *stvis, struct dri_screen *screen,
 
    if (mode->redBits == 8) {
       if (mode->alphaBits == 8)
-         stvis->color_format = PIPE_FORMAT_B8G8R8A8_UNORM;
+         stvis->color_format = PIPE_FORMAT_ARGB8888_UNORM;
       else
-         stvis->color_format = PIPE_FORMAT_B8G8R8X8_UNORM;
+         stvis->color_format = PIPE_FORMAT_XRGB8888_UNORM;
    } else {
-      stvis->color_format = PIPE_FORMAT_B5G6R5_UNORM;
+      stvis->color_format = PIPE_FORMAT_B5G6R5_UNORM; /* XXX big-endian? */
    }
 
    if (mode->sampleBuffers) {
-- 
1.8.2.1



More information about the mesa-dev mailing list