mesa: Rename 4 color component unsigned byte MESA_FORMATs
authorMark Mueller <MarkKMueller@gmail.com>
Mon, 20 Jan 2014 22:21:43 +0000 (14:21 -0800)
committerMark Mueller <MarkKMueller@gmail.com>
Mon, 27 Jan 2014 22:29:13 +0000 (14:29 -0800)
Change all 4 color component unsigned byte formats to meet spec for P
Type formats:
    s/MESA_FORMAT_RGBA8888\b/MESA_FORMAT_A8B8G8R8_UNORM/g
    s/MESA_FORMAT_RGBA8888_REV\b/MESA_FORMAT_R8G8B8A8_UNORM/g
    s/MESA_FORMAT_ARGB8888\b/MESA_FORMAT_B8G8R8A8_UNORM/g
    s/MESA_FORMAT_ARGB8888_REV\b/MESA_FORMAT_A8R8G8B8_UNORM/g
    s/MESA_FORMAT_RGBX8888\b/MESA_FORMAT_X8B8G8R8_UNORM/g
    s/MESA_FORMAT_RGBX8888_REV\b/MESA_FORMAT_R8G8B8X8_UNORM/g
    s/MESA_FORMAT_XRGB8888\b/MESA_FORMAT_B8G8R8X8_UNORM/g
    s/MESA_FORMAT_XRGB8888_REV\b/MESA_FORMAT_X8R8G8B8_UNORM/g

70 files changed:
src/gallium/state_trackers/dri/common/dri_screen.c
src/mesa/drivers/dri/common/dri_util.c
src/mesa/drivers/dri/common/utils.c
src/mesa/drivers/dri/i915/i830_texstate.c
src/mesa/drivers/dri/i915/i830_vtbl.c
src/mesa/drivers/dri/i915/i915_context.c
src/mesa/drivers/dri/i915/i915_texstate.c
src/mesa/drivers/dri/i915/i915_vtbl.c
src/mesa/drivers/dri/i915/intel_blit.c
src/mesa/drivers/dri/i915/intel_fbo.c
src/mesa/drivers/dri/i915/intel_pixel_bitmap.c
src/mesa/drivers/dri/i915/intel_screen.c
src/mesa/drivers/dri/i915/intel_tex_image.c
src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
src/mesa/drivers/dri/i965/brw_context.c
src/mesa/drivers/dri/i965/brw_surface_formats.c
src/mesa/drivers/dri/i965/intel_blit.c
src/mesa/drivers/dri/i965/intel_fbo.c
src/mesa/drivers/dri/i965/intel_mipmap_tree.c
src/mesa/drivers/dri/i965/intel_pixel_bitmap.c
src/mesa/drivers/dri/i965/intel_screen.c
src/mesa/drivers/dri/i965/intel_tex_image.c
src/mesa/drivers/dri/i965/intel_tex_subimage.c
src/mesa/drivers/dri/nouveau/nouveau_fbo.c
src/mesa/drivers/dri/nouveau/nouveau_screen.c
src/mesa/drivers/dri/nouveau/nouveau_texture.c
src/mesa/drivers/dri/nouveau/nouveau_util.h
src/mesa/drivers/dri/nouveau/nv04_context.c
src/mesa/drivers/dri/nouveau/nv04_state_fb.c
src/mesa/drivers/dri/nouveau/nv04_state_frag.c
src/mesa/drivers/dri/nouveau/nv04_state_raster.c
src/mesa/drivers/dri/nouveau/nv04_state_tex.c
src/mesa/drivers/dri/nouveau/nv04_surface.c
src/mesa/drivers/dri/nouveau/nv10_state_fb.c
src/mesa/drivers/dri/nouveau/nv10_state_frag.c
src/mesa/drivers/dri/nouveau/nv10_state_tex.c
src/mesa/drivers/dri/nouveau/nv10_state_tnl.c
src/mesa/drivers/dri/nouveau/nv20_state_fb.c
src/mesa/drivers/dri/nouveau/nv20_state_tex.c
src/mesa/drivers/dri/nouveau/nv20_state_tnl.c
src/mesa/drivers/dri/r200/r200_blit.c
src/mesa/drivers/dri/r200/r200_texstate.c
src/mesa/drivers/dri/radeon/radeon_blit.c
src/mesa/drivers/dri/radeon/radeon_pixel_read.c
src/mesa/drivers/dri/radeon/radeon_screen.c
src/mesa/drivers/dri/radeon/radeon_tex_copy.c
src/mesa/drivers/dri/radeon/radeon_texstate.c
src/mesa/drivers/dri/radeon/radeon_texture.c
src/mesa/drivers/dri/swrast/swrast.c
src/mesa/drivers/haiku/swrast/SoftwareRast.cpp
src/mesa/drivers/osmesa/osmesa.c
src/mesa/drivers/x11/xm_buffer.c
src/mesa/main/debug.c
src/mesa/main/format_pack.c
src/mesa/main/format_unpack.c
src/mesa/main/formats.c
src/mesa/main/formats.h
src/mesa/main/framebuffer.c
src/mesa/main/readpix.c
src/mesa/main/shaderimage.c
src/mesa/main/texformat.c
src/mesa/main/teximage.c
src/mesa/main/texstore.c
src/mesa/state_tracker/st_format.c
src/mesa/swrast/s_drawpix.c
src/mesa/swrast/s_renderbuffer.c
src/mesa/swrast/s_texfetch.c
src/mesa/swrast/s_texfetch_tmp.h
src/mesa/swrast/s_texfilter.c
src/mesa/swrast/s_triangle.c

index c13b2ed813c94f5d37b7ce5aa53a9e7e382b4c1c..5907ed6ad7bc650472d14e1566fe9daf54ae15c5 100644 (file)
@@ -82,8 +82,8 @@ static const __DRIconfig **
 dri_fill_in_modes(struct dri_screen *screen)
 {
    static const mesa_format mesa_formats[3] = {
-      MESA_FORMAT_ARGB8888,
-      MESA_FORMAT_XRGB8888,
+      MESA_FORMAT_B8G8R8A8_UNORM,
+      MESA_FORMAT_B8G8R8X8_UNORM,
       MESA_FORMAT_RGB565,
    };
    static const enum pipe_format pipe_formats[3] = {
index e8c0d91e2642722d55b1ff641eabac777a2f11c3..5320ec06d1ede11463473812f21e72e15dbfac5d 100644 (file)
@@ -811,17 +811,17 @@ driGLFormatToImageFormat(mesa_format format)
    switch (format) {
    case MESA_FORMAT_RGB565:
       return __DRI_IMAGE_FORMAT_RGB565;
-   case MESA_FORMAT_XRGB8888:
+   case MESA_FORMAT_B8G8R8X8_UNORM:
       return __DRI_IMAGE_FORMAT_XRGB8888;
    case MESA_FORMAT_ARGB2101010:
       return __DRI_IMAGE_FORMAT_ARGB2101010;
    case MESA_FORMAT_XRGB2101010_UNORM:
       return __DRI_IMAGE_FORMAT_XRGB2101010;
-   case MESA_FORMAT_ARGB8888:
+   case MESA_FORMAT_B8G8R8A8_UNORM:
       return __DRI_IMAGE_FORMAT_ARGB8888;
-   case MESA_FORMAT_RGBA8888_REV:
+   case MESA_FORMAT_R8G8B8A8_UNORM:
       return __DRI_IMAGE_FORMAT_ABGR8888;
-   case MESA_FORMAT_RGBX8888_REV:
+   case MESA_FORMAT_R8G8B8X8_UNORM:
       return __DRI_IMAGE_FORMAT_XBGR8888;
    case MESA_FORMAT_R8:
       return __DRI_IMAGE_FORMAT_R8;
@@ -843,17 +843,17 @@ driImageFormatToGLFormat(uint32_t image_format)
    case __DRI_IMAGE_FORMAT_RGB565:
       return MESA_FORMAT_RGB565;
    case __DRI_IMAGE_FORMAT_XRGB8888:
-      return MESA_FORMAT_XRGB8888;
+      return MESA_FORMAT_B8G8R8X8_UNORM;
    case __DRI_IMAGE_FORMAT_ARGB2101010:
       return MESA_FORMAT_ARGB2101010;
    case __DRI_IMAGE_FORMAT_XRGB2101010:
       return MESA_FORMAT_XRGB2101010_UNORM;
    case __DRI_IMAGE_FORMAT_ARGB8888:
-      return MESA_FORMAT_ARGB8888;
+      return MESA_FORMAT_B8G8R8A8_UNORM;
    case __DRI_IMAGE_FORMAT_ABGR8888:
-      return MESA_FORMAT_RGBA8888_REV;
+      return MESA_FORMAT_R8G8B8A8_UNORM;
    case __DRI_IMAGE_FORMAT_XBGR8888:
-      return MESA_FORMAT_RGBX8888_REV;
+      return MESA_FORMAT_R8G8B8X8_UNORM;
    case __DRI_IMAGE_FORMAT_R8:
       return MESA_FORMAT_R8;
    case __DRI_IMAGE_FORMAT_GR88:
index 06981c20bc8bd47fc18d4eb6031cc2b22f983825..b18256e355d38d1553658e591929a6fd9e9eda4a 100644 (file)
@@ -186,9 +186,9 @@ driCreateConfigs(mesa_format format,
    static const uint32_t masks_table[][4] = {
       /* MESA_FORMAT_RGB565 */
       { 0x0000F800, 0x000007E0, 0x0000001F, 0x00000000 },
-      /* MESA_FORMAT_XRGB8888 */
+      /* MESA_FORMAT_B8G8R8X8_UNORM */
       { 0x00FF0000, 0x0000FF00, 0x000000FF, 0x00000000 },
-      /* MESA_FORMAT_ARGB8888 */
+      /* MESA_FORMAT_B8G8R8A8_UNORM */
       { 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000 },
       /* MESA_FORMAT_XRGB2101010_UNORM */
       { 0x3FF00000, 0x000FFC00, 0x000003FF, 0x00000000 },
@@ -212,10 +212,10 @@ driCreateConfigs(mesa_format format,
    case MESA_FORMAT_RGB565:
       masks = masks_table[0];
       break;
-   case MESA_FORMAT_XRGB8888:
+   case MESA_FORMAT_B8G8R8X8_UNORM:
       masks = masks_table[1];
       break;
-   case MESA_FORMAT_ARGB8888:
+   case MESA_FORMAT_B8G8R8A8_UNORM:
    case MESA_FORMAT_SARGB8:
       masks = masks_table[2];
       break;
index 8bad12676ea9f6f9e315d38baa59c2bb3d18af70..d6aaf45332763e84e336fe54736f8521a9aa49f6 100644 (file)
@@ -57,9 +57,9 @@ translate_texture_format(GLuint mesa_format)
       return MAPSURF_16BIT | MT_16BIT_ARGB1555;
    case MESA_FORMAT_ARGB4444:
       return MAPSURF_16BIT | MT_16BIT_ARGB4444;
-   case MESA_FORMAT_ARGB8888:
+   case MESA_FORMAT_B8G8R8A8_UNORM:
       return MAPSURF_32BIT | MT_32BIT_ARGB8888;
-   case MESA_FORMAT_XRGB8888:
+   case MESA_FORMAT_B8G8R8X8_UNORM:
       return MAPSURF_32BIT | MT_32BIT_XRGB8888;
    case MESA_FORMAT_YCBCR_REV:
       return (MAPSURF_422 | MT_422_YCRCB_NORMAL);
index c9effad6812f9620b0b73f4c1cfc0859f37e9d4f..3da4dbe8de213d764e2a1e81afe2729d1ae0da45 100644 (file)
@@ -582,8 +582,8 @@ i830_destroy_context(struct intel_context *intel)
 
 static uint32_t i830_render_target_format_for_mesa_format[MESA_FORMAT_COUNT] =
 {
-   [MESA_FORMAT_ARGB8888] = DV_PF_8888,
-   [MESA_FORMAT_XRGB8888] = DV_PF_8888,
+   [MESA_FORMAT_B8G8R8A8_UNORM] = DV_PF_8888,
+   [MESA_FORMAT_B8G8R8X8_UNORM] = DV_PF_8888,
    [MESA_FORMAT_RGB565] = DV_PF_565,
    [MESA_FORMAT_ARGB1555] = DV_PF_1555,
    [MESA_FORMAT_ARGB4444] = DV_PF_4444,
index 035a8f811d9d57ceed2bae38f23f3005855a2b78..a11a01002f7890ec7ebbf837be962251d111cbd2 100644 (file)
@@ -99,10 +99,10 @@ intel_init_texture_formats(struct gl_context *ctx)
    struct intel_context *intel = intel_context(ctx);
    struct intel_screen *intel_screen = intel->intelScreen;
 
-   ctx->TextureFormatSupported[MESA_FORMAT_ARGB8888] = true;
+   ctx->TextureFormatSupported[MESA_FORMAT_B8G8R8A8_UNORM] = true;
    if (intel_screen->deviceID != PCI_CHIP_I830_M &&
        intel_screen->deviceID != PCI_CHIP_845_G)
-      ctx->TextureFormatSupported[MESA_FORMAT_XRGB8888] = true;
+      ctx->TextureFormatSupported[MESA_FORMAT_B8G8R8X8_UNORM] = true;
    if (intel->gen == 3)
       ctx->TextureFormatSupported[MESA_FORMAT_SARGB8] = true;
    ctx->TextureFormatSupported[MESA_FORMAT_ARGB4444] = true;
index 40bd48a24016792bcaa6f53494a4e43e145fad40..3e10de36cbdabe04c4ec7cb91d53490780ee7ac7 100644 (file)
@@ -57,11 +57,11 @@ translate_texture_format(mesa_format mesa_format, GLenum DepthMode)
    case MESA_FORMAT_ARGB4444:
       return MAPSURF_16BIT | MT_16BIT_ARGB4444;
    case MESA_FORMAT_SARGB8:
-   case MESA_FORMAT_ARGB8888:
+   case MESA_FORMAT_B8G8R8A8_UNORM:
       return MAPSURF_32BIT | MT_32BIT_ARGB8888;
-   case MESA_FORMAT_XRGB8888:
+   case MESA_FORMAT_B8G8R8X8_UNORM:
       return MAPSURF_32BIT | MT_32BIT_XRGB8888;
-   case MESA_FORMAT_RGBA8888_REV:
+   case MESA_FORMAT_R8G8B8A8_UNORM:
       return MAPSURF_32BIT | MT_32BIT_ABGR8888;
    case MESA_FORMAT_YCBCR_REV:
       return (MAPSURF_422 | MT_422_YCRCB_NORMAL);
index 137ca76a34729a6a98c694d4e36539a664912e2c..bc1ee55b89599b4bb3d8ab174d51d44fcf6356ef 100644 (file)
@@ -549,8 +549,8 @@ i915_set_buf_info_for_region(uint32_t *state, struct intel_region *region,
 
 static uint32_t i915_render_target_format_for_mesa_format[MESA_FORMAT_COUNT] =
 {
-   [MESA_FORMAT_ARGB8888] = DV_PF_8888,
-   [MESA_FORMAT_XRGB8888] = DV_PF_8888,
+   [MESA_FORMAT_B8G8R8A8_UNORM] = DV_PF_8888,
+   [MESA_FORMAT_B8G8R8X8_UNORM] = DV_PF_8888,
    [MESA_FORMAT_RGB565] = DV_PF_565 | DITHER_FULL_ALWAYS,
    [MESA_FORMAT_ARGB1555] = DV_PF_1555 | DITHER_FULL_ALWAYS,
    [MESA_FORMAT_ARGB4444] = DV_PF_4444 | DITHER_FULL_ALWAYS,
index 267b096aeff7fea25b6b6a670158de85e300bfa6..d4d6b430fbe98e086b60d28fa98c3e5bdd5b3e8d 100644 (file)
@@ -129,10 +129,10 @@ intel_miptree_blit(struct intel_context *intel,
     * channel to 1.0 at the end.
     */
    if (src_format != dst_format &&
-      ((src_format != MESA_FORMAT_ARGB8888 &&
-        src_format != MESA_FORMAT_XRGB8888) ||
-       (dst_format != MESA_FORMAT_ARGB8888 &&
-        dst_format != MESA_FORMAT_XRGB8888))) {
+      ((src_format != MESA_FORMAT_B8G8R8A8_UNORM &&
+        src_format != MESA_FORMAT_B8G8R8X8_UNORM) ||
+       (dst_format != MESA_FORMAT_B8G8R8A8_UNORM &&
+        dst_format != MESA_FORMAT_B8G8R8X8_UNORM))) {
       perf_debug("%s: Can't use hardware blitter from %s to %s, "
                  "falling back.\n", __FUNCTION__,
                  _mesa_get_format_name(src_format),
@@ -201,8 +201,8 @@ intel_miptree_blit(struct intel_context *intel,
       return false;
    }
 
-   if (src_mt->format == MESA_FORMAT_XRGB8888 &&
-       dst_mt->format == MESA_FORMAT_ARGB8888) {
+   if (src_mt->format == MESA_FORMAT_B8G8R8X8_UNORM &&
+       dst_mt->format == MESA_FORMAT_B8G8R8A8_UNORM) {
       intel_miptree_set_alpha_to_one(intel, dst_mt,
                                      dst_x, dst_y,
                                      width, height);
@@ -450,8 +450,8 @@ intelClearWithBlit(struct gl_context *ctx, GLbitfield mask)
         _mesa_unclamped_float_rgba_to_ubyte(clear, color);
 
         switch (intel_rb_format(irb)) {
-        case MESA_FORMAT_ARGB8888:
-        case MESA_FORMAT_XRGB8888:
+        case MESA_FORMAT_B8G8R8A8_UNORM:
+        case MESA_FORMAT_B8G8R8X8_UNORM:
            clear_val = PACK_COLOR_8888(clear[3], clear[0],
                                        clear[1], clear[2]);
            break;
index 2b82bb151a0d2562eee5ba2015953461e143c0f4..735f3460f6a9f07ab1587d34166b16f868b4a2f7 100644 (file)
@@ -238,7 +238,7 @@ intel_image_target_renderbuffer_storage(struct gl_context *ctx,
 
    /* __DRIimage is opaque to the core so it has to be checked here */
    switch (image->format) {
-   case MESA_FORMAT_RGBA8888_REV:
+   case MESA_FORMAT_R8G8B8A8_UNORM:
       _mesa_error(&intel->ctx, GL_INVALID_OPERATION,
             "glEGLImageTargetRenderbufferStorage(unsupported image format");
       return;
index 775d6d2802692e65e2d1ec9b9391c0c892d5074c..09ced23a8b3414a2cb1076dff5ca66cbe64e1df6 100644 (file)
@@ -228,8 +228,8 @@ do_blit_bitmap( struct gl_context *ctx,
    UNCLAMPED_FLOAT_TO_UBYTE(ubcolor[3], tmpColor[3]);
 
    switch (irb->mt->format) {
-   case MESA_FORMAT_ARGB8888:
-   case MESA_FORMAT_XRGB8888:
+   case MESA_FORMAT_B8G8R8A8_UNORM:
+   case MESA_FORMAT_B8G8R8X8_UNORM:
       color = PACK_COLOR_8888(ubcolor[3], ubcolor[0], ubcolor[1], ubcolor[2]);
       break;
    case MESA_FORMAT_RGB565:
index f921d29935b13c7f1883c769f3c4370f16a6f878..053e73a5e955f0354a6a3bf811d1958d48fd0715 100644 (file)
@@ -124,8 +124,8 @@ aub_dump_bmp(struct gl_context *ctx)
         enum aub_dump_bmp_format format;
 
         switch (irb->Base.Base.Format) {
-        case MESA_FORMAT_ARGB8888:
-        case MESA_FORMAT_XRGB8888:
+        case MESA_FORMAT_B8G8R8A8_UNORM:
+        case MESA_FORMAT_B8G8R8X8_UNORM:
            format = AUB_DUMP_BMP_FORMAT_ARGB_8888;
            break;
         default:
@@ -861,9 +861,9 @@ intelCreateBuffer(__DRIscreen * driScrnPriv,
    else if (mesaVis->sRGBCapable)
       rgbFormat = MESA_FORMAT_SARGB8;
    else if (mesaVis->alphaBits == 0)
-      rgbFormat = MESA_FORMAT_XRGB8888;
+      rgbFormat = MESA_FORMAT_B8G8R8X8_UNORM;
    else
-      rgbFormat = MESA_FORMAT_ARGB8888;
+      rgbFormat = MESA_FORMAT_B8G8R8A8_UNORM;
 
    /* setup the hardware-based renderbuffers */
    rb = intel_create_renderbuffer(rgbFormat);
@@ -1044,7 +1044,7 @@ intel_screen_make_configs(__DRIscreen *dri_screen)
 {
    static const mesa_format formats[] = {
       MESA_FORMAT_RGB565,
-      MESA_FORMAT_ARGB8888
+      MESA_FORMAT_B8G8R8A8_UNORM
    };
 
    /* GLX_SWAP_COPY_OML is not supported due to page flipping. */
index fc23a5ee02cb2d087dcb60e29cf2b58795530eb6..6aa11411439d05b4c448544637c325d2606de005 100644 (file)
@@ -309,11 +309,11 @@ intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
    if (rb->mt->cpp == 4) {
       if (texture_format == __DRI_TEXTURE_FORMAT_RGB) {
          internalFormat = GL_RGB;
-         texFormat = MESA_FORMAT_XRGB8888;
+         texFormat = MESA_FORMAT_B8G8R8X8_UNORM;
       }
       else {
          internalFormat = GL_RGBA;
-         texFormat = MESA_FORMAT_ARGB8888;
+         texFormat = MESA_FORMAT_B8G8R8A8_UNORM;
       }
    } else if (rb->mt->cpp == 2) {
       internalFormat = GL_RGB;
index 00f37b37469bb15873c3f524bbe9791190e99884..d8df4afd08f722e4bbc44f49014c5250ba76aad2 100644 (file)
@@ -207,10 +207,10 @@ color_formats_match(mesa_format src_format, mesa_format dst_format)
     * (overriding alpha to 1.0 via blending).
     */
    return linear_src_format == linear_dst_format ||
-          (linear_src_format == MESA_FORMAT_XRGB8888 &&
-           linear_dst_format == MESA_FORMAT_ARGB8888) ||
-          (linear_src_format == MESA_FORMAT_ARGB8888 &&
-           linear_dst_format == MESA_FORMAT_XRGB8888);
+          (linear_src_format == MESA_FORMAT_B8G8R8X8_UNORM &&
+           linear_dst_format == MESA_FORMAT_B8G8R8A8_UNORM) ||
+          (linear_src_format == MESA_FORMAT_B8G8R8A8_UNORM &&
+           linear_dst_format == MESA_FORMAT_B8G8R8X8_UNORM);
 }
 
 static bool
index 00105216e92e29751aaad7ff033dce989f7a0487..b82f76f72cc24bf6b5bde39c9cada088f417ba2a 100644 (file)
@@ -892,7 +892,7 @@ intel_gles3_srgb_workaround(struct brw_context *brw,
    for (int i = 0; i < BUFFER_COUNT; i++) {
       if (fb->Attachment[i].Renderbuffer &&
           fb->Attachment[i].Renderbuffer->Format == MESA_FORMAT_SARGB8) {
-         fb->Attachment[i].Renderbuffer->Format = MESA_FORMAT_ARGB8888;
+         fb->Attachment[i].Renderbuffer->Format = MESA_FORMAT_B8G8R8A8_UNORM;
       }
    }
 }
index ebbd335c5360d088bdeb220c72dfeb56f22aec2d..566d68834f78db35724624f413b13ff7a51c572e 100644 (file)
@@ -319,14 +319,14 @@ brw_format_for_mesa_format(mesa_format mesa_format)
     */
    static const uint32_t table[MESA_FORMAT_COUNT] =
    {
-      [MESA_FORMAT_RGBA8888] = 0,
-      [MESA_FORMAT_RGBA8888_REV] = BRW_SURFACEFORMAT_R8G8B8A8_UNORM,
-      [MESA_FORMAT_ARGB8888] = BRW_SURFACEFORMAT_B8G8R8A8_UNORM,
-      [MESA_FORMAT_ARGB8888_REV] = 0,
-      [MESA_FORMAT_RGBX8888] = 0,
-      [MESA_FORMAT_RGBX8888_REV] = BRW_SURFACEFORMAT_R8G8B8X8_UNORM,
-      [MESA_FORMAT_XRGB8888] = BRW_SURFACEFORMAT_B8G8R8X8_UNORM,
-      [MESA_FORMAT_XRGB8888_REV] = 0,
+      [MESA_FORMAT_A8B8G8R8_UNORM] = 0,
+      [MESA_FORMAT_R8G8B8A8_UNORM] = BRW_SURFACEFORMAT_R8G8B8A8_UNORM,
+      [MESA_FORMAT_B8G8R8A8_UNORM] = BRW_SURFACEFORMAT_B8G8R8A8_UNORM,
+      [MESA_FORMAT_A8R8G8B8_UNORM] = 0,
+      [MESA_FORMAT_X8B8G8R8_UNORM] = 0,
+      [MESA_FORMAT_R8G8B8X8_UNORM] = BRW_SURFACEFORMAT_R8G8B8X8_UNORM,
+      [MESA_FORMAT_B8G8R8X8_UNORM] = BRW_SURFACEFORMAT_B8G8R8X8_UNORM,
+      [MESA_FORMAT_X8R8G8B8_UNORM] = 0,
       [MESA_FORMAT_RGB888] = 0,
       [MESA_FORMAT_BGR888] = BRW_SURFACEFORMAT_R8G8B8_UNORM,
       [MESA_FORMAT_RGB565] = BRW_SURFACEFORMAT_B5G6R5_UNORM,
index 82720d174dd62141c45eed41847c329f90699bdc..b12ecca366df5dd1f72510e65290bb791f7d5331 100644 (file)
@@ -171,10 +171,10 @@ intel_miptree_blit(struct brw_context *brw,
     * channel to 1.0 at the end.
     */
    if (src_format != dst_format &&
-      ((src_format != MESA_FORMAT_ARGB8888 &&
-        src_format != MESA_FORMAT_XRGB8888) ||
-       (dst_format != MESA_FORMAT_ARGB8888 &&
-        dst_format != MESA_FORMAT_XRGB8888))) {
+      ((src_format != MESA_FORMAT_B8G8R8A8_UNORM &&
+        src_format != MESA_FORMAT_B8G8R8X8_UNORM) ||
+       (dst_format != MESA_FORMAT_B8G8R8A8_UNORM &&
+        dst_format != MESA_FORMAT_B8G8R8X8_UNORM))) {
       perf_debug("%s: Can't use hardware blitter from %s to %s, "
                  "falling back.\n", __FUNCTION__,
                  _mesa_get_format_name(src_format),
@@ -271,8 +271,8 @@ intel_miptree_blit(struct brw_context *brw,
       return false;
    }
 
-   if (src_mt->format == MESA_FORMAT_XRGB8888 &&
-       dst_mt->format == MESA_FORMAT_ARGB8888) {
+   if (src_mt->format == MESA_FORMAT_B8G8R8X8_UNORM &&
+       dst_mt->format == MESA_FORMAT_B8G8R8A8_UNORM) {
       intel_miptree_set_alpha_to_one(brw, dst_mt,
                                      dst_x, dst_y,
                                      width, height);
index 7f6db9ddc65ff154678417a1f56f72fc0090004f..961bbc28386b1df2c5100a8a88f3eb52476a71c4 100644 (file)
@@ -269,7 +269,7 @@ intel_image_target_renderbuffer_storage(struct gl_context *ctx,
 
    /* __DRIimage is opaque to the core so it has to be checked here */
    switch (image->format) {
-   case MESA_FORMAT_RGBA8888_REV:
+   case MESA_FORMAT_R8G8B8A8_UNORM:
       _mesa_error(ctx, GL_INVALID_OPERATION,
             "glEGLImageTargetRenderbufferStorage(unsupported image format");
       return;
index cadf622e5874fa01450aaee252d61e58a3946bc4..9f3c9a76f07b78cf00a0a3aeb6bb3ac3ced02d05 100644 (file)
@@ -504,10 +504,10 @@ intel_miptree_create(struct brw_context *brw,
    if (brw->gen < 8 && !brw->is_baytrail) {
       switch (format) {
       case MESA_FORMAT_ETC1_RGB8:
-         format = MESA_FORMAT_RGBX8888_REV;
+         format = MESA_FORMAT_R8G8B8X8_UNORM;
          break;
       case MESA_FORMAT_ETC2_RGB8:
-         format = MESA_FORMAT_RGBX8888_REV;
+         format = MESA_FORMAT_R8G8B8X8_UNORM;
          break;
       case MESA_FORMAT_ETC2_SRGB8:
       case MESA_FORMAT_ETC2_SRGB8_ALPHA8_EAC:
@@ -516,7 +516,7 @@ intel_miptree_create(struct brw_context *brw,
          break;
       case MESA_FORMAT_ETC2_RGBA8_EAC:
       case MESA_FORMAT_ETC2_RGB8_PUNCHTHROUGH_ALPHA1:
-         format = MESA_FORMAT_RGBA8888_REV;
+         format = MESA_FORMAT_R8G8B8A8_UNORM;
          break;
       case MESA_FORMAT_ETC2_R11_EAC:
          format = MESA_FORMAT_R16;
@@ -2004,7 +2004,7 @@ intel_miptree_map_etc(struct brw_context *brw,
 {
    assert(mt->etc_format != MESA_FORMAT_NONE);
    if (mt->etc_format == MESA_FORMAT_ETC1_RGB8) {
-      assert(mt->format == MESA_FORMAT_RGBX8888_REV);
+      assert(mt->format == MESA_FORMAT_R8G8B8X8_UNORM);
    }
 
    assert(map->mode & GL_MAP_WRITE_BIT);
index e8977c4cc54af759fa90cd5a7fbc88bf2ab59262..34edc246cc3a4add49e2ad818012ff31814aa014 100644 (file)
@@ -229,8 +229,8 @@ do_blit_bitmap( struct gl_context *ctx,
    UNCLAMPED_FLOAT_TO_UBYTE(ubcolor[3], tmpColor[3]);
 
    switch (_mesa_get_render_format(ctx, intel_rb_format(irb))) {
-   case MESA_FORMAT_ARGB8888:
-   case MESA_FORMAT_XRGB8888:
+   case MESA_FORMAT_B8G8R8A8_UNORM:
+   case MESA_FORMAT_B8G8R8X8_UNORM:
       color = PACK_COLOR_8888(ubcolor[3], ubcolor[0], ubcolor[1], ubcolor[2]);
       break;
    case MESA_FORMAT_RGB565:
index f5b8aa57b0a51575f54ac10d01dc274ebb7509ca..2f2d478d15636d7d54e49f9239cc8d390b1733b8 100644 (file)
@@ -135,8 +135,8 @@ aub_dump_bmp(struct gl_context *ctx)
         enum aub_dump_bmp_format format;
 
         switch (irb->Base.Base.Format) {
-        case MESA_FORMAT_ARGB8888:
-        case MESA_FORMAT_XRGB8888:
+        case MESA_FORMAT_B8G8R8A8_UNORM:
+        case MESA_FORMAT_B8G8R8X8_UNORM:
            format = AUB_DUMP_BMP_FORMAT_ARGB_8888;
            break;
         default:
@@ -980,7 +980,7 @@ intelCreateBuffer(__DRIscreen * driScrnPriv,
    else if (mesaVis->sRGBCapable)
       rgbFormat = MESA_FORMAT_SARGB8;
    else if (mesaVis->alphaBits == 0)
-      rgbFormat = MESA_FORMAT_XRGB8888;
+      rgbFormat = MESA_FORMAT_B8G8R8X8_UNORM;
    else {
       rgbFormat = MESA_FORMAT_SARGB8;
       fb->Visual.sRGBCapable = true;
@@ -1126,7 +1126,7 @@ intel_screen_make_configs(__DRIscreen *dri_screen)
 {
    static const mesa_format formats[] = {
       MESA_FORMAT_RGB565,
-      MESA_FORMAT_ARGB8888
+      MESA_FORMAT_B8G8R8A8_UNORM
    };
 
    /* GLX_SWAP_COPY_OML is not supported due to page flipping. */
index b774efe820e2cc58e99a3b4c1cff79ed1f724545..40095312f3fba45c33cc4d0d66e128b0b07018f6 100644 (file)
@@ -300,11 +300,11 @@ intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
    if (rb->mt->cpp == 4) {
       if (texture_format == __DRI_TEXTURE_FORMAT_RGB) {
          internalFormat = GL_RGB;
-         texFormat = MESA_FORMAT_XRGB8888;
+         texFormat = MESA_FORMAT_B8G8R8X8_UNORM;
       }
       else {
          internalFormat = GL_RGBA;
-         texFormat = MESA_FORMAT_ARGB8888;
+         texFormat = MESA_FORMAT_B8G8R8A8_UNORM;
       }
    } else if (rb->mt->cpp == 2) {
       internalFormat = GL_RGB;
index f1de6c96bfd454aeaf4c59bf564f47b87b22c44b..1def8ca9f58d317c721bb8cd75344d7d75388925 100644 (file)
@@ -576,8 +576,8 @@ intel_texsubimage_tiled_memcpy(struct gl_context * ctx,
        (texImage->TexFormat == MESA_FORMAT_A8 && format == GL_ALPHA)) {
       cpp = 1;
       mem_copy = memcpy;
-   } else if ((texImage->TexFormat == MESA_FORMAT_ARGB8888) ||
-              (texImage->TexFormat == MESA_FORMAT_XRGB8888)) {
+   } else if ((texImage->TexFormat == MESA_FORMAT_B8G8R8A8_UNORM) ||
+              (texImage->TexFormat == MESA_FORMAT_B8G8R8X8_UNORM)) {
       cpp = 4;
       if (format == GL_BGRA) {
          mem_copy = memcpy;
index 43651bf49500cd91e824d138be0bebaaef1688ae..72af5365c86efada624da9041d30ba2c8d3a29b3 100644 (file)
@@ -44,13 +44,13 @@ set_renderbuffer_format(struct gl_renderbuffer *rb, GLenum internalFormat)
        case GL_RGB:
        case GL_RGB8:
                rb->_BaseFormat  = GL_RGB;
-               rb->Format = MESA_FORMAT_XRGB8888;
+               rb->Format = MESA_FORMAT_B8G8R8X8_UNORM;
                s->cpp = 4;
                break;
        case GL_RGBA:
        case GL_RGBA8:
                rb->_BaseFormat  = GL_RGBA;
-               rb->Format = MESA_FORMAT_ARGB8888;
+               rb->Format = MESA_FORMAT_B8G8R8A8_UNORM;
                s->cpp = 4;
                break;
        case GL_RGB5:
@@ -272,8 +272,8 @@ static int
 validate_format_bpp(mesa_format format)
 {
        switch (format) {
-       case MESA_FORMAT_XRGB8888:
-       case MESA_FORMAT_ARGB8888:
+       case MESA_FORMAT_B8G8R8X8_UNORM:
+       case MESA_FORMAT_B8G8R8A8_UNORM:
        case MESA_FORMAT_Z24_S8:
                return 32;
        case MESA_FORMAT_RGB565:
index 7117f51fc0ed9f8ea3ab4a0ebb052f6d66bb4772..4ec4b675b31c04c2c0c8c1e42b8da52a708d27d9 100644 (file)
@@ -54,8 +54,8 @@ nouveau_get_configs(void)
 
        static const mesa_format formats[3] = {
                MESA_FORMAT_RGB565,
-               MESA_FORMAT_ARGB8888,
-               MESA_FORMAT_XRGB8888,
+               MESA_FORMAT_B8G8R8A8_UNORM,
+               MESA_FORMAT_B8G8R8X8_UNORM,
        };
 
        const GLenum back_buffer_modes[] = {
index dfa6d12907a2304b30bcfcc804cc7a5e5bc73bdc..1a637cc04950d1dc1d1cad7ca1e3c9db6ab0f902 100644 (file)
@@ -175,7 +175,7 @@ nouveau_choose_tex_format(struct gl_context *ctx, GLenum target,
        case GL_RGBA16:
        case GL_RGB10_A2:
        case GL_COMPRESSED_RGBA:
-               return MESA_FORMAT_ARGB8888;
+               return MESA_FORMAT_B8G8R8A8_UNORM;
        case GL_RGB5_A1:
                return MESA_FORMAT_ARGB1555;
 
@@ -185,7 +185,7 @@ nouveau_choose_tex_format(struct gl_context *ctx, GLenum target,
        case GL_RGB12:
        case GL_RGB16:
        case GL_COMPRESSED_RGB:
-               return MESA_FORMAT_XRGB8888;
+               return MESA_FORMAT_B8G8R8X8_UNORM;
        case 3:
        case GL_R3_G3_B2:
        case GL_RGB4:
@@ -201,7 +201,7 @@ nouveau_choose_tex_format(struct gl_context *ctx, GLenum target,
        case GL_LUMINANCE16_ALPHA16:
        case GL_LUMINANCE8_ALPHA8:
        case GL_COMPRESSED_LUMINANCE_ALPHA:
-               return MESA_FORMAT_ARGB8888;
+               return MESA_FORMAT_B8G8R8A8_UNORM;
 
        case 1:
        case GL_LUMINANCE:
@@ -589,9 +589,9 @@ get_texbuffer_format(struct gl_renderbuffer *rb, GLint format)
        if (s->cpp < 4)
                return s->format;
        else if (format == __DRI_TEXTURE_FORMAT_RGBA)
-               return MESA_FORMAT_ARGB8888;
+               return MESA_FORMAT_B8G8R8A8_UNORM;
        else
-               return MESA_FORMAT_XRGB8888;
+               return MESA_FORMAT_B8G8R8X8_UNORM;
 }
 
 void
index 6905c42c627dbc92f29b1dd98cdce29a4883d336..13dc0f936fbab08655c8cf31406d71b7ee863d78 100644 (file)
@@ -34,17 +34,17 @@ static inline unsigned
 pack_rgba_i(mesa_format f, uint8_t c[])
 {
        switch (f) {
-       case MESA_FORMAT_ARGB8888:
+       case MESA_FORMAT_B8G8R8A8_UNORM:
                return PACK_COLOR_8888(c[ACOMP], c[RCOMP], c[GCOMP], c[BCOMP]);
-       case MESA_FORMAT_ARGB8888_REV:
+       case MESA_FORMAT_A8R8G8B8_UNORM:
                return PACK_COLOR_8888(c[BCOMP], c[GCOMP], c[RCOMP], c[ACOMP]);
-       case MESA_FORMAT_XRGB8888:
+       case MESA_FORMAT_B8G8R8X8_UNORM:
                return PACK_COLOR_8888(0, c[RCOMP], c[GCOMP], c[BCOMP]);
-       case MESA_FORMAT_XRGB8888_REV:
+       case MESA_FORMAT_X8R8G8B8_UNORM:
                return PACK_COLOR_8888(c[BCOMP], c[GCOMP], c[RCOMP], 0);
-       case MESA_FORMAT_RGBA8888:
+       case MESA_FORMAT_A8B8G8R8_UNORM:
                return PACK_COLOR_8888(c[RCOMP], c[GCOMP], c[BCOMP], c[ACOMP]);
-       case MESA_FORMAT_RGBA8888_REV:
+       case MESA_FORMAT_R8G8B8A8_UNORM:
                return PACK_COLOR_8888(c[ACOMP], c[BCOMP], c[GCOMP], c[RCOMP]);
        case MESA_FORMAT_RGB565:
                return PACK_COLOR_565(c[RCOMP], c[GCOMP], c[BCOMP]);
index 6cd191e7a784c8e937aa01d2dc943cbeb8421427..21399532232302b9609f89bf9dd44577b2417bf7 100644 (file)
@@ -114,7 +114,7 @@ init_dummy_texture(struct gl_context *ctx)
 
        nouveau_surface_alloc(ctx, s, SWIZZLED,
                              NOUVEAU_BO_MAP | NOUVEAU_BO_VRAM,
-                             MESA_FORMAT_ARGB8888, 1, 1);
+                             MESA_FORMAT_B8G8R8A8_UNORM, 1, 1);
 
        nouveau_bo_map(s->bo, NOUVEAU_BO_WR, context_client(ctx));
        *(uint32_t *)s->bo->map = 0xffffffff;
index fcf9fdf59c68cf78831dc7b12099cca59aa4b121..d3253bae88e66d49b36c7aeb37dc88708ecf61f1 100644 (file)
@@ -35,9 +35,9 @@ static inline unsigned
 get_rt_format(mesa_format format)
 {
        switch (format) {
-       case MESA_FORMAT_XRGB8888:
+       case MESA_FORMAT_B8G8R8X8_UNORM:
                return NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_X8R8G8B8_X8R8G8B8;
-       case MESA_FORMAT_ARGB8888:
+       case MESA_FORMAT_B8G8R8A8_UNORM:
                return NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_A8R8G8B8;
        case MESA_FORMAT_RGB565:
                return NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_R5G6B5;
index d0245da8ab95a548d230dbb482266d9218e11b71..61e259f388a69eaba2986403f16a10dd783825fd 100644 (file)
@@ -294,6 +294,6 @@ nv04_emit_tex_env(struct gl_context *ctx, int emit)
        /* update calculated multitex state */
        nv04->alpha[i] = rc_a.hw;
        nv04->color[i] = rc_c.hw;
-       nv04->factor   = pack_rgba_f(MESA_FORMAT_ARGB8888,
+       nv04->factor   = pack_rgba_f(MESA_FORMAT_B8G8R8A8_UNORM,
                                     ctx->Texture.Unit[0].EnvColor);
 }
index ed21e540501c07117dfc3f4168a3771089c6aff9..41261195d814e99026b293f408f30210f65655ce 100644 (file)
@@ -222,6 +222,6 @@ nv04_emit_blend(struct gl_context *ctx, int emit)
        /* Fog. */
        if (ctx->Fog.Enabled) {
                nv04->blend |= NV04_TEXTURED_TRIANGLE_BLEND_FOG_ENABLE;
-               nv04->fog = pack_rgba_f(MESA_FORMAT_ARGB8888, ctx->Fog.Color);
+               nv04->fog = pack_rgba_f(MESA_FORMAT_B8G8R8A8_UNORM, ctx->Fog.Color);
        }
 }
index e4d695a34bea69fe6015bee8257f81b963a03d04..ae9548969fb36f28d53c2b7932f96356e021140a 100644 (file)
@@ -48,9 +48,9 @@ get_tex_format(struct gl_texture_image *ti)
                return NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_A4R4G4B4;
        case MESA_FORMAT_RGB565:
                return NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_R5G6B5;
-       case MESA_FORMAT_ARGB8888:
+       case MESA_FORMAT_B8G8R8A8_UNORM:
                return NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_A8R8G8B8;
-       case MESA_FORMAT_XRGB8888:
+       case MESA_FORMAT_B8G8R8X8_UNORM:
                return NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_X8R8G8B8;
        default:
                assert(0);
index 153cc9b32d8649ef6707b8ccbf679a2c242db19a..c83907170514b46ef8617c2591ab864962b1cb32 100644 (file)
@@ -57,11 +57,11 @@ swzsurf_format(mesa_format format)
        case MESA_FORMAT_Z16:
                return NV04_SWIZZLED_SURFACE_FORMAT_COLOR_R5G6B5;
 
-       case MESA_FORMAT_RGBA8888:
-       case MESA_FORMAT_RGBA8888_REV:
-       case MESA_FORMAT_XRGB8888:
-       case MESA_FORMAT_ARGB8888:
-       case MESA_FORMAT_ARGB8888_REV:
+       case MESA_FORMAT_A8B8G8R8_UNORM:
+       case MESA_FORMAT_R8G8B8A8_UNORM:
+       case MESA_FORMAT_B8G8R8X8_UNORM:
+       case MESA_FORMAT_B8G8R8A8_UNORM:
+       case MESA_FORMAT_A8R8G8B8_UNORM:
        case MESA_FORMAT_S8_Z24:
        case MESA_FORMAT_Z24_S8:
        case MESA_FORMAT_Z32:
@@ -96,11 +96,11 @@ surf2d_format(mesa_format format)
        case MESA_FORMAT_Z16:
                return NV04_CONTEXT_SURFACES_2D_FORMAT_R5G6B5;
 
-       case MESA_FORMAT_RGBA8888:
-       case MESA_FORMAT_RGBA8888_REV:
-       case MESA_FORMAT_XRGB8888:
-       case MESA_FORMAT_ARGB8888:
-       case MESA_FORMAT_ARGB8888_REV:
+       case MESA_FORMAT_A8B8G8R8_UNORM:
+       case MESA_FORMAT_R8G8B8A8_UNORM:
+       case MESA_FORMAT_B8G8R8X8_UNORM:
+       case MESA_FORMAT_B8G8R8A8_UNORM:
+       case MESA_FORMAT_A8R8G8B8_UNORM:
        case MESA_FORMAT_S8_Z24:
        case MESA_FORMAT_Z24_S8:
        case MESA_FORMAT_Z32:
@@ -135,11 +135,11 @@ rect_format(mesa_format format)
        case MESA_FORMAT_Z16:
                return NV04_GDI_RECTANGLE_TEXT_COLOR_FORMAT_A16R5G6B5;
 
-       case MESA_FORMAT_RGBA8888:
-       case MESA_FORMAT_RGBA8888_REV:
-       case MESA_FORMAT_XRGB8888:
-       case MESA_FORMAT_ARGB8888:
-       case MESA_FORMAT_ARGB8888_REV:
+       case MESA_FORMAT_A8B8G8R8_UNORM:
+       case MESA_FORMAT_R8G8B8A8_UNORM:
+       case MESA_FORMAT_B8G8R8X8_UNORM:
+       case MESA_FORMAT_B8G8R8A8_UNORM:
+       case MESA_FORMAT_A8R8G8B8_UNORM:
        case MESA_FORMAT_S8_Z24:
        case MESA_FORMAT_Z24_S8:
        case MESA_FORMAT_Z32:
@@ -174,11 +174,11 @@ sifm_format(mesa_format format)
        case MESA_FORMAT_Z16:
                return NV03_SCALED_IMAGE_FROM_MEMORY_COLOR_FORMAT_R5G6B5;
 
-       case MESA_FORMAT_RGBA8888:
-       case MESA_FORMAT_RGBA8888_REV:
-       case MESA_FORMAT_XRGB8888:
-       case MESA_FORMAT_ARGB8888:
-       case MESA_FORMAT_ARGB8888_REV:
+       case MESA_FORMAT_A8B8G8R8_UNORM:
+       case MESA_FORMAT_R8G8B8A8_UNORM:
+       case MESA_FORMAT_B8G8R8X8_UNORM:
+       case MESA_FORMAT_B8G8R8A8_UNORM:
+       case MESA_FORMAT_A8R8G8B8_UNORM:
        case MESA_FORMAT_S8_Z24:
        case MESA_FORMAT_Z24_S8:
        case MESA_FORMAT_Z32:
index 3fce2e3374318deda5820227af524deb872bb2f7..9badefa3db6aa35b17b39dbaadcb36d33bbdee28 100644 (file)
@@ -36,9 +36,9 @@ static inline unsigned
 get_rt_format(mesa_format format)
 {
        switch (format) {
-       case MESA_FORMAT_XRGB8888:
+       case MESA_FORMAT_B8G8R8X8_UNORM:
                return NV10_3D_RT_FORMAT_COLOR_X8R8G8B8;
-       case MESA_FORMAT_ARGB8888:
+       case MESA_FORMAT_B8G8R8A8_UNORM:
                return NV10_3D_RT_FORMAT_COLOR_A8R8G8B8;
        case MESA_FORMAT_RGB565:
                return NV10_3D_RT_FORMAT_COLOR_R5G6B5;
index b6ccf45242e6a2b15f68afbade14130775a3f34e..f71cb0d28a48424511ee6457356b09ce4fee8215 100644 (file)
@@ -185,7 +185,7 @@ get_input_arg(struct combiner_state *rc, int arg, int flags)
                                        get_input_mapping(rc, operand,
                                                          flags ^ INVERT);
 
-               } else if (format == MESA_FORMAT_XRGB8888) {
+               } else if (format == MESA_FORMAT_B8G8R8X8_UNORM) {
                        /* Sometimes emulated using ARGB8888. */
                        if (!is_color_operand(operand))
                                return RC_IN_SOURCE(ZERO) |
@@ -319,7 +319,7 @@ nv10_get_general_combiner(struct gl_context *ctx, int i,
                rc_a.in = rc_a.out = rc_c.in = rc_c.out = 0;
        }
 
-       *k = pack_rgba_f(MESA_FORMAT_ARGB8888,
+       *k = pack_rgba_f(MESA_FORMAT_B8G8R8A8_UNORM,
                         ctx->Texture.Unit[i].EnvColor);
        *a_in = rc_a.in;
        *a_out = rc_a.out;
index 3b76d66100d49739a5f86390568b8ead628610ac..49e908f949a59467cbc7340b9690f1740cf4c9ba 100644 (file)
@@ -90,10 +90,10 @@ static uint32_t
 get_tex_format_pot(struct gl_texture_image *ti)
 {
        switch (ti->TexFormat) {
-       case MESA_FORMAT_ARGB8888:
+       case MESA_FORMAT_B8G8R8A8_UNORM:
                return NV10_3D_TEX_FORMAT_FORMAT_A8R8G8B8;
 
-       case MESA_FORMAT_XRGB8888:
+       case MESA_FORMAT_B8G8R8X8_UNORM:
                return NV10_3D_TEX_FORMAT_FORMAT_X8R8G8B8;
 
        case MESA_FORMAT_ARGB1555:
@@ -137,8 +137,8 @@ get_tex_format_rect(struct gl_texture_image *ti)
        case MESA_FORMAT_RGB565:
                return NV10_3D_TEX_FORMAT_FORMAT_R5G6B5_RECT;
 
-       case MESA_FORMAT_ARGB8888:
-       case MESA_FORMAT_XRGB8888:
+       case MESA_FORMAT_B8G8R8A8_UNORM:
+       case MESA_FORMAT_B8G8R8X8_UNORM:
                return NV10_3D_TEX_FORMAT_FORMAT_A8R8G8B8_RECT;
 
        case MESA_FORMAT_A8:
index 06155fe011cbda03ff830d9c82c8844bd29b41bb..c0c7b26bbf70eabbf35c6b38fa5b26c8dc777964 100644 (file)
@@ -144,7 +144,7 @@ nv10_emit_fog(struct gl_context *ctx, int emit)
        PUSH_DATA (push, get_fog_mode(f->Mode));
        PUSH_DATA (push, get_fog_source(source, f->FogDistanceMode));
        PUSH_DATAb(push, f->Enabled);
-       PUSH_DATA (push, pack_rgba_f(MESA_FORMAT_RGBA8888_REV, f->Color));
+       PUSH_DATA (push, pack_rgba_f(MESA_FORMAT_R8G8B8A8_UNORM, f->Color));
 
        BEGIN_NV04(push, NV10_3D(FOG_COEFF(0)), 3);
        PUSH_DATAp(push, k, 3);
index 1c1f86297feaf0f3d0edcd1b610a12c361c68fcd..cf216a6995063b4b55ac4a3b8c12dd40cd917032 100644 (file)
@@ -36,9 +36,9 @@ static inline unsigned
 get_rt_format(mesa_format format)
 {
        switch (format) {
-       case MESA_FORMAT_XRGB8888:
+       case MESA_FORMAT_B8G8R8X8_UNORM:
                return NV20_3D_RT_FORMAT_COLOR_X8R8G8B8;
-       case MESA_FORMAT_ARGB8888:
+       case MESA_FORMAT_B8G8R8A8_UNORM:
                return NV20_3D_RT_FORMAT_COLOR_A8R8G8B8;
        case MESA_FORMAT_RGB565:
                return NV20_3D_RT_FORMAT_COLOR_R5G6B5;
index ffbc2dfe09c90b3d76a4f4bca0959b893999d714..7af721850e22c59db36eb32704c9ad5f69d05042 100644 (file)
@@ -87,7 +87,7 @@ static uint32_t
 get_tex_format_pot(struct gl_texture_image *ti)
 {
        switch (ti->TexFormat) {
-       case MESA_FORMAT_ARGB8888:
+       case MESA_FORMAT_B8G8R8A8_UNORM:
                return NV20_3D_TEX_FORMAT_FORMAT_A8R8G8B8;
 
        case MESA_FORMAT_ARGB1555:
@@ -96,7 +96,7 @@ get_tex_format_pot(struct gl_texture_image *ti)
        case MESA_FORMAT_ARGB4444:
                return NV20_3D_TEX_FORMAT_FORMAT_A4R4G4B4;
 
-       case MESA_FORMAT_XRGB8888:
+       case MESA_FORMAT_B8G8R8X8_UNORM:
                return NV20_3D_TEX_FORMAT_FORMAT_X8R8G8B8;
 
        case MESA_FORMAT_RGB565:
@@ -128,7 +128,7 @@ static uint32_t
 get_tex_format_rect(struct gl_texture_image *ti)
 {
        switch (ti->TexFormat) {
-       case MESA_FORMAT_ARGB8888:
+       case MESA_FORMAT_B8G8R8A8_UNORM:
                return NV20_3D_TEX_FORMAT_FORMAT_A8R8G8B8_RECT;
 
        case MESA_FORMAT_ARGB1555:
@@ -137,7 +137,7 @@ get_tex_format_rect(struct gl_texture_image *ti)
        case MESA_FORMAT_ARGB4444:
                return NV20_3D_TEX_FORMAT_FORMAT_A4R4G4B4_RECT;
 
-       case MESA_FORMAT_XRGB8888:
+       case MESA_FORMAT_B8G8R8X8_UNORM:
                return NV20_3D_TEX_FORMAT_FORMAT_R8G8B8_RECT;
 
        case MESA_FORMAT_RGB565:
index 1d3d83d47fc724a514de00ca7167eff743b417aa..f0acbed8560f5a7aa9aa6a5a990f704583a3fdc1 100644 (file)
@@ -166,7 +166,7 @@ nv20_emit_fog(struct gl_context *ctx, int emit)
                        get_fog_mode_signed(f->Mode)));
        PUSH_DATA (push, get_fog_source(source, f->FogDistanceMode));
        PUSH_DATAb(push, f->Enabled);
-       PUSH_DATA (push, pack_rgba_f(MESA_FORMAT_RGBA8888_REV, f->Color));
+       PUSH_DATA (push, pack_rgba_f(MESA_FORMAT_R8G8B8A8_UNORM, f->Color));
 
        BEGIN_NV04(push, NV20_3D(FOG_COEFF(0)), 3);
        PUSH_DATAp(push, k, 3);
index 825358a4fbe7d364d232cb8893a2512f5c0b9dfb..142a5175bfd82f8577c624979a17758d24f198c5 100644 (file)
@@ -42,8 +42,8 @@ unsigned r200_check_blit(mesa_format mesa_format, uint32_t dst_pitch)
 {
     /* XXX others?  BE/LE? */
     switch (mesa_format) {
-    case MESA_FORMAT_ARGB8888:
-    case MESA_FORMAT_XRGB8888:
+    case MESA_FORMAT_B8G8R8A8_UNORM:
+    case MESA_FORMAT_B8G8R8X8_UNORM:
     case MESA_FORMAT_RGB565:
     case MESA_FORMAT_ARGB4444:
     case MESA_FORMAT_ARGB1555:
@@ -51,8 +51,8 @@ unsigned r200_check_blit(mesa_format mesa_format, uint32_t dst_pitch)
     case MESA_FORMAT_L8:
     case MESA_FORMAT_I8:
     /* swizzled */
-    case MESA_FORMAT_RGBA8888:
-    case MESA_FORMAT_RGBA8888_REV:
+    case MESA_FORMAT_A8B8G8R8_UNORM:
+    case MESA_FORMAT_R8G8B8A8_UNORM:
            break;
     default:
            return 0;
@@ -114,16 +114,16 @@ static void inline emit_tx_setup(struct r200_context *r200,
 
     /* XXX others?  BE/LE? */
     switch (src_mesa_format) {
-    case MESA_FORMAT_ARGB8888:
+    case MESA_FORMAT_B8G8R8A8_UNORM:
            txformat |= R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP;
            break;
-    case MESA_FORMAT_RGBA8888:
+    case MESA_FORMAT_A8B8G8R8_UNORM:
            txformat |= R200_TXFORMAT_RGBA8888 | R200_TXFORMAT_ALPHA_IN_MAP;
            break;
-    case MESA_FORMAT_RGBA8888_REV:
+    case MESA_FORMAT_R8G8B8A8_UNORM:
            txformat |= R200_TXFORMAT_ABGR8888 | R200_TXFORMAT_ALPHA_IN_MAP;
            break;
-    case MESA_FORMAT_XRGB8888:
+    case MESA_FORMAT_B8G8R8X8_UNORM:
            txformat |= R200_TXFORMAT_ARGB8888;
            break;
     case MESA_FORMAT_RGB565:
@@ -155,8 +155,8 @@ static void inline emit_tx_setup(struct r200_context *r200,
        offset |= R200_TXO_MICRO_TILE;
 
     switch (dst_mesa_format) {
-    case MESA_FORMAT_ARGB8888:
-    case MESA_FORMAT_XRGB8888:
+    case MESA_FORMAT_B8G8R8A8_UNORM:
+    case MESA_FORMAT_B8G8R8X8_UNORM:
     case MESA_FORMAT_RGB565:
     case MESA_FORMAT_ARGB4444:
     case MESA_FORMAT_ARGB1555:
@@ -182,7 +182,7 @@ static void inline emit_tx_setup(struct r200_context *r200,
                                                   R200_TXA_OUTPUT_REG_R0));
            END_BATCH();
            break;
-    case MESA_FORMAT_RGBA8888:
+    case MESA_FORMAT_A8B8G8R8_UNORM:
            BEGIN_BATCH(10);
            OUT_BATCH_REGVAL(RADEON_PP_CNTL, (RADEON_TEX_0_ENABLE |
                                              RADEON_TEX_BLEND_0_ENABLE));
@@ -202,7 +202,7 @@ static void inline emit_tx_setup(struct r200_context *r200,
                                                   R200_TXA_OUTPUT_REG_R0));
            END_BATCH();
            break;
-    case MESA_FORMAT_RGBA8888_REV:
+    case MESA_FORMAT_R8G8B8A8_UNORM:
            BEGIN_BATCH(34);
            OUT_BATCH_REGVAL(RADEON_PP_CNTL, (RADEON_TEX_0_ENABLE |
                                              RADEON_TEX_BLEND_0_ENABLE |
@@ -308,10 +308,10 @@ static inline void emit_cb_setup(struct r200_context *r200,
 
     /* XXX others?  BE/LE? */
     switch (mesa_format) {
-    case MESA_FORMAT_ARGB8888:
-    case MESA_FORMAT_XRGB8888:
-    case MESA_FORMAT_RGBA8888:
-    case MESA_FORMAT_RGBA8888_REV:
+    case MESA_FORMAT_B8G8R8A8_UNORM:
+    case MESA_FORMAT_B8G8R8X8_UNORM:
+    case MESA_FORMAT_A8B8G8R8_UNORM:
+    case MESA_FORMAT_R8G8B8A8_UNORM:
            dst_format = RADEON_COLOR_FORMAT_ARGB8888;
            break;
     case MESA_FORMAT_RGB565:
index 12afb767bda64894e35107028df655e03c91646a..80dea79d23f035dcacfea324d3786ac0e731551a 100644 (file)
@@ -69,10 +69,10 @@ struct tx_table {
 
 static const struct tx_table tx_table_be[] =
 {
-   [ MESA_FORMAT_RGBA8888 ] = { R200_TXFORMAT_ABGR8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
-   [ MESA_FORMAT_RGBA8888_REV ] = { R200_TXFORMAT_RGBA8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
-   [ MESA_FORMAT_ARGB8888 ] = { R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
-   [ MESA_FORMAT_ARGB8888_REV ] = { R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
+   [ MESA_FORMAT_A8B8G8R8_UNORM ] = { R200_TXFORMAT_ABGR8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
+   [ MESA_FORMAT_R8G8B8A8_UNORM ] = { R200_TXFORMAT_RGBA8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
+   [ MESA_FORMAT_B8G8R8A8_UNORM ] = { R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
+   [ MESA_FORMAT_A8R8G8B8_UNORM ] = { R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
    [ MESA_FORMAT_RGB888 ] = { 0xffffffff, 0 },
    [ MESA_FORMAT_RGB565 ] = { R200_TXFORMAT_RGB565, 0 },
    [ MESA_FORMAT_RGB565_REV ] = { R200_TXFORMAT_RGB565, 0 },
@@ -97,10 +97,10 @@ static const struct tx_table tx_table_be[] =
 
 static const struct tx_table tx_table_le[] =
 {
-   [ MESA_FORMAT_RGBA8888 ] = { R200_TXFORMAT_RGBA8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
-   [ MESA_FORMAT_RGBA8888_REV ] = { R200_TXFORMAT_ABGR8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
-   [ MESA_FORMAT_ARGB8888 ] = { R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
-   [ MESA_FORMAT_ARGB8888_REV ] = { R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
+   [ MESA_FORMAT_A8B8G8R8_UNORM ] = { R200_TXFORMAT_RGBA8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
+   [ MESA_FORMAT_R8G8B8A8_UNORM ] = { R200_TXFORMAT_ABGR8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
+   [ MESA_FORMAT_B8G8R8A8_UNORM ] = { R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
+   [ MESA_FORMAT_A8R8G8B8_UNORM ] = { R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
    [ MESA_FORMAT_RGB888 ] = { R200_TXFORMAT_ARGB8888, 0 },
    [ MESA_FORMAT_RGB565 ] = { R200_TXFORMAT_RGB565, 0 },
    [ MESA_FORMAT_RGB565_REV ] = { R200_TXFORMAT_RGB565, 0 },
@@ -772,10 +772,10 @@ void r200SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint texture_format
                        t->pp_txformat = tx_table_le[MESA_FORMAT_RGB888].format;
                }
                else {
-                       texFormat = MESA_FORMAT_ARGB8888;
-                       t->pp_txformat = tx_table_le[MESA_FORMAT_ARGB8888].format;
+                       texFormat = MESA_FORMAT_B8G8R8A8_UNORM;
+                       t->pp_txformat = tx_table_le[MESA_FORMAT_B8G8R8A8_UNORM].format;
                }
-               t->pp_txfilter |= tx_table_le[MESA_FORMAT_ARGB8888].filter;
+               t->pp_txfilter |= tx_table_le[MESA_FORMAT_B8G8R8A8_UNORM].filter;
                break;
        case 3:
        default:
index e5d49ee6b004019cced1ecd46cda134dbe67d695..5e291672f686e2b1c725a21bfb9f2db076ffa799 100644 (file)
@@ -42,8 +42,8 @@ unsigned r100_check_blit(mesa_format mesa_format, uint32_t dst_pitch)
 {
     /* XXX others?  BE/LE? */
     switch (mesa_format) {
-    case MESA_FORMAT_ARGB8888:
-    case MESA_FORMAT_XRGB8888:
+    case MESA_FORMAT_B8G8R8A8_UNORM:
+    case MESA_FORMAT_B8G8R8X8_UNORM:
     case MESA_FORMAT_RGB565:
     case MESA_FORMAT_ARGB4444:
     case MESA_FORMAT_ARGB1555:
@@ -108,13 +108,13 @@ static void inline emit_tx_setup(struct r100_context *r100,
 
     /* XXX others?  BE/LE? */
     switch (mesa_format) {
-    case MESA_FORMAT_ARGB8888:
+    case MESA_FORMAT_B8G8R8A8_UNORM:
            txformat |= RADEON_TXFORMAT_ARGB8888 | RADEON_TXFORMAT_ALPHA_IN_MAP;
            break;
-    case MESA_FORMAT_RGBA8888:
+    case MESA_FORMAT_A8B8G8R8_UNORM:
             txformat |= RADEON_TXFORMAT_RGBA8888 | RADEON_TXFORMAT_ALPHA_IN_MAP;
             break;
-    case MESA_FORMAT_XRGB8888:
+    case MESA_FORMAT_B8G8R8X8_UNORM:
            txformat |= RADEON_TXFORMAT_ARGB8888;
            break;
     case MESA_FORMAT_RGB565:
@@ -186,8 +186,8 @@ static inline void emit_cb_setup(struct r100_context *r100,
 
     /* XXX others?  BE/LE? */
     switch (mesa_format) {
-    case MESA_FORMAT_ARGB8888:
-    case MESA_FORMAT_XRGB8888:
+    case MESA_FORMAT_B8G8R8A8_UNORM:
+    case MESA_FORMAT_B8G8R8X8_UNORM:
            dst_format = RADEON_COLOR_FORMAT_ARGB8888;
            break;
     case MESA_FORMAT_RGB565:
index e9bfc0df265c9ed7f07f4009b0f4ac602a3ca560..ee0f77827936b0c1d253bc999f00ae7bbd06b58b 100644 (file)
@@ -57,10 +57,10 @@ static mesa_format gl_format_and_type_to_mesa_format(GLenum format, GLenum type)
                 case GL_UNSIGNED_SHORT_5_5_5_1:
                     return MESA_FORMAT_RGBA5551;
                 case GL_UNSIGNED_INT_8_8_8_8:
-                    return MESA_FORMAT_RGBA8888;
+                    return MESA_FORMAT_A8B8G8R8_UNORM;
                 case GL_UNSIGNED_BYTE:
                 case GL_UNSIGNED_INT_8_8_8_8_REV:
-                    return MESA_FORMAT_RGBA8888_REV;
+                    return MESA_FORMAT_R8G8B8A8_UNORM;
             }
             break;
         case GL_BGRA:
@@ -74,10 +74,10 @@ static mesa_format gl_format_and_type_to_mesa_format(GLenum format, GLenum type)
                 case GL_UNSIGNED_SHORT_1_5_5_5_REV:
                     return MESA_FORMAT_ARGB1555;
                 case GL_UNSIGNED_INT_8_8_8_8:
-                    return MESA_FORMAT_ARGB8888_REV;
+                    return MESA_FORMAT_A8R8G8B8_UNORM;
                 case GL_UNSIGNED_BYTE:
                 case GL_UNSIGNED_INT_8_8_8_8_REV:
-                    return MESA_FORMAT_ARGB8888;
+                    return MESA_FORMAT_B8G8R8A8_UNORM;
 
             }
             break;
index d90bafa9818bbe6aafa672ee6ca9621ca6ae4a82..3dcdcba00d3842ed6c8913368e1fae1df1f793be 100644 (file)
@@ -219,12 +219,12 @@ radeon_create_image_from_name(__DRIscreen *screen,
       image->data_type = GL_UNSIGNED_BYTE;
       break;
    case __DRI_IMAGE_FORMAT_XRGB8888:
-      image->format = MESA_FORMAT_XRGB8888;
+      image->format = MESA_FORMAT_B8G8R8X8_UNORM;
       image->internal_format = GL_RGB;
       image->data_type = GL_UNSIGNED_BYTE;
       break;
    case __DRI_IMAGE_FORMAT_ARGB8888:
-      image->format = MESA_FORMAT_ARGB8888;
+      image->format = MESA_FORMAT_B8G8R8A8_UNORM;
       image->internal_format = GL_RGBA;
       image->data_type = GL_UNSIGNED_BYTE;
       break;
@@ -319,12 +319,12 @@ radeon_create_image(__DRIscreen *screen,
       image->data_type = GL_UNSIGNED_BYTE;
       break;
    case __DRI_IMAGE_FORMAT_XRGB8888:
-      image->format = MESA_FORMAT_XRGB8888;
+      image->format = MESA_FORMAT_B8G8R8X8_UNORM;
       image->internal_format = GL_RGB;
       image->data_type = GL_UNSIGNED_BYTE;
       break;
    case __DRI_IMAGE_FORMAT_ARGB8888:
-      image->format = MESA_FORMAT_ARGB8888;
+      image->format = MESA_FORMAT_B8G8R8A8_UNORM;
       image->internal_format = GL_RGBA;
       image->data_type = GL_UNSIGNED_BYTE;
       break;
@@ -613,9 +613,9 @@ radeonCreateBuffer( __DRIscreen *driScrnPriv,
     if (mesaVis->redBits == 5)
         rgbFormat = _mesa_little_endian() ? MESA_FORMAT_RGB565 : MESA_FORMAT_RGB565_REV;
     else if (mesaVis->alphaBits == 0)
-        rgbFormat = _mesa_little_endian() ? MESA_FORMAT_XRGB8888 : MESA_FORMAT_XRGB8888_REV;
+        rgbFormat = _mesa_little_endian() ? MESA_FORMAT_B8G8R8X8_UNORM : MESA_FORMAT_X8R8G8B8_UNORM;
     else
-        rgbFormat = _mesa_little_endian() ? MESA_FORMAT_ARGB8888 : MESA_FORMAT_ARGB8888_REV;
+        rgbFormat = _mesa_little_endian() ? MESA_FORMAT_B8G8R8A8_UNORM : MESA_FORMAT_A8R8G8B8_UNORM;
 
     /* front color renderbuffer */
     rfb->color_rb[0] = radeon_create_renderbuffer(rgbFormat, driDrawPriv);
@@ -710,8 +710,8 @@ __DRIconfig **radeonInitScreen2(__DRIscreen *psp)
 {
    static const mesa_format formats[3] = {
       MESA_FORMAT_RGB565,
-      MESA_FORMAT_XRGB8888,
-      MESA_FORMAT_ARGB8888
+      MESA_FORMAT_B8G8R8X8_UNORM,
+      MESA_FORMAT_B8G8R8A8_UNORM
    };
    /* GLX_SWAP_COPY_OML is only supported because the Intel driver doesn't
     * support pageflipping at all.
index fc723842c114669983a98e8d25cf4864cca41c7c..9e7ecca0f686257e6e05a2d5b14e36e2141ae18b 100644 (file)
@@ -112,8 +112,8 @@ do_copy_texsubimage(struct gl_context *ctx,
                    dst_mesaformat = MESA_FORMAT_RGB565;
                    break;
            case 4:
-                   src_mesaformat = MESA_FORMAT_ARGB8888;
-                   dst_mesaformat = MESA_FORMAT_ARGB8888;
+                   src_mesaformat = MESA_FORMAT_B8G8R8A8_UNORM;
+                   dst_mesaformat = MESA_FORMAT_B8G8R8A8_UNORM;
                    break;
            case 1:
                    src_mesaformat = MESA_FORMAT_A8;
index 5550a5aa1ec651f56493c5232d0626c94b4c2da9..51c36e9ee8441a99f26abe1f2f746bb08046dca8 100644 (file)
@@ -74,10 +74,10 @@ struct tx_table {
 static const struct tx_table tx_table[] =
 {
    [ MESA_FORMAT_NONE ] = { 0xffffffff, 0 },
-   [ MESA_FORMAT_RGBA8888 ] = { RADEON_TXFORMAT_RGBA8888 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
-   [ MESA_FORMAT_RGBA8888_REV ] = { RADEON_TXFORMAT_RGBA8888 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
-   [ MESA_FORMAT_ARGB8888 ] = { RADEON_TXFORMAT_ARGB8888 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
-   [ MESA_FORMAT_ARGB8888_REV ] = { RADEON_TXFORMAT_ARGB8888 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
+   [ MESA_FORMAT_A8B8G8R8_UNORM ] = { RADEON_TXFORMAT_RGBA8888 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
+   [ MESA_FORMAT_R8G8B8A8_UNORM ] = { RADEON_TXFORMAT_RGBA8888 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
+   [ MESA_FORMAT_B8G8R8A8_UNORM ] = { RADEON_TXFORMAT_ARGB8888 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
+   [ MESA_FORMAT_A8R8G8B8_UNORM ] = { RADEON_TXFORMAT_ARGB8888 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
    [ MESA_FORMAT_RGB888 ] = { RADEON_TXFORMAT_ARGB8888, 0 },
    [ MESA_FORMAT_RGB565 ] = { RADEON_TXFORMAT_RGB565, 0 },
    [ MESA_FORMAT_RGB565_REV ] = { RADEON_TXFORMAT_RGB565, 0 },
@@ -647,10 +647,10 @@ void radeonSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint texture_form
                        texFormat = MESA_FORMAT_RGB888;
                }
                else {
-                       t->pp_txformat = tx_table[MESA_FORMAT_ARGB8888].format;
-                       texFormat = MESA_FORMAT_ARGB8888;
+                       t->pp_txformat = tx_table[MESA_FORMAT_B8G8R8A8_UNORM].format;
+                       texFormat = MESA_FORMAT_B8G8R8A8_UNORM;
                }
-               t->pp_txfilter |= tx_table[MESA_FORMAT_ARGB8888].filter;
+               t->pp_txfilter |= tx_table[MESA_FORMAT_B8G8R8A8_UNORM].filter;
                break;
        case 3:
        default:
index 8455b826270abe1347b1188c5f87a88fa60bb0ac..15ab677ce39d79b04615be32e762d3b05e7fac2f 100644 (file)
@@ -231,12 +231,12 @@ static mesa_format radeonChoose8888TexFormat(radeonContextPtr rmesa,
            (srcFormat == GL_RGBA && srcType == GL_UNSIGNED_BYTE && !littleEndian) ||
            (srcFormat == GL_ABGR_EXT && srcType == GL_UNSIGNED_INT_8_8_8_8_REV) ||
            (srcFormat == GL_ABGR_EXT && srcType == GL_UNSIGNED_BYTE && littleEndian)) {
-               return MESA_FORMAT_RGBA8888;
+               return MESA_FORMAT_A8B8G8R8_UNORM;
        } else if ((srcFormat == GL_RGBA && srcType == GL_UNSIGNED_INT_8_8_8_8_REV) ||
                   (srcFormat == GL_RGBA && srcType == GL_UNSIGNED_BYTE && littleEndian) ||
                   (srcFormat == GL_ABGR_EXT && srcType == GL_UNSIGNED_INT_8_8_8_8) ||
                   (srcFormat == GL_ABGR_EXT && srcType == GL_UNSIGNED_BYTE && !littleEndian)) {
-               return MESA_FORMAT_RGBA8888_REV;
+               return MESA_FORMAT_R8G8B8A8_UNORM;
        } else
                return _radeon_texformat_argb8888;
 #endif
@@ -592,16 +592,16 @@ static void
 radeonInitTextureFormats(void)
 {
    if (_mesa_little_endian()) {
-      _radeon_texformat_rgba8888       = MESA_FORMAT_RGBA8888;
-      _radeon_texformat_argb8888       = MESA_FORMAT_ARGB8888;
+      _radeon_texformat_rgba8888       = MESA_FORMAT_A8B8G8R8_UNORM;
+      _radeon_texformat_argb8888       = MESA_FORMAT_B8G8R8A8_UNORM;
       _radeon_texformat_rgb565         = MESA_FORMAT_RGB565;
       _radeon_texformat_argb4444       = MESA_FORMAT_ARGB4444;
       _radeon_texformat_argb1555       = MESA_FORMAT_ARGB1555;
       _radeon_texformat_al88           = MESA_FORMAT_AL88;
    }
    else {
-      _radeon_texformat_rgba8888       = MESA_FORMAT_RGBA8888_REV;
-      _radeon_texformat_argb8888       = MESA_FORMAT_ARGB8888_REV;
+      _radeon_texformat_rgba8888       = MESA_FORMAT_R8G8B8A8_UNORM;
+      _radeon_texformat_argb8888       = MESA_FORMAT_A8R8G8B8_UNORM;
       _radeon_texformat_rgb565         = MESA_FORMAT_RGB565_REV;
       _radeon_texformat_argb4444       = MESA_FORMAT_ARGB4444_REV;
       _radeon_texformat_argb1555       = MESA_FORMAT_ARGB1555_REV;
index ddb810f7032f0f92c3728cd7df83d2eb8df0598d..47f07ae9fe7b35dad7b90018b1d4168bc7ba9b18 100644 (file)
@@ -92,9 +92,9 @@ static void swrastSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
     sPriv->swrast_loader->getDrawableInfo(dPriv, &x, &y, &w, &h, dPriv->loaderPrivate);
 
     if (texture_format == __DRI_TEXTURE_FORMAT_RGB)
-       texFormat = MESA_FORMAT_XRGB8888;
+       texFormat = MESA_FORMAT_B8G8R8X8_UNORM;
     else
-       texFormat = MESA_FORMAT_ARGB8888;
+       texFormat = MESA_FORMAT_B8G8R8A8_UNORM;
 
     _mesa_init_teximage_fields(&dri_ctx->Base, texImage,
                               w, h, 1, 0, internalFormat, texFormat);
@@ -169,10 +169,10 @@ swrastFillInModes(__DRIscreen *psp,
        format = MESA_FORMAT_RGB565;
        break;
     case 24:
-        format = MESA_FORMAT_XRGB8888;
+        format = MESA_FORMAT_B8G8R8X8_UNORM;
        break;
     case 32:
-       format = MESA_FORMAT_ARGB8888;
+       format = MESA_FORMAT_B8G8R8A8_UNORM;
        break;
     default:
        fprintf(stderr, "[%s:%u] bad depth %d\n", __func__, __LINE__,
@@ -345,13 +345,13 @@ swrast_new_renderbuffer(const struct gl_config *visual, __DRIdrawable *dPriv,
 
     switch (pixel_format) {
     case PF_A8R8G8B8:
-       rb->Format = MESA_FORMAT_ARGB8888;
+       rb->Format = MESA_FORMAT_B8G8R8A8_UNORM;
        rb->InternalFormat = GL_RGBA;
        rb->_BaseFormat = GL_RGBA;
        xrb->bpp = 32;
        break;
     case PF_X8R8G8B8:
-       rb->Format = MESA_FORMAT_ARGB8888; /* XXX */
+       rb->Format = MESA_FORMAT_B8G8R8A8_UNORM; /* XXX */
        rb->InternalFormat = GL_RGB;
        rb->_BaseFormat = GL_RGB;
        xrb->bpp = 32;
@@ -634,7 +634,7 @@ static mesa_format swrastChooseTextureFormat(struct gl_context * ctx,
                                           GLenum type)
 {
     if (internalFormat == GL_RGB)
-       return MESA_FORMAT_XRGB8888;
+       return MESA_FORMAT_B8G8R8X8_UNORM;
     return _mesa_choose_tex_format(ctx, target, internalFormat, format, type);
 }
 
index df697e4a3842645e082e3e53b16c283dbadf7d63..095ca1f9d46799929090ad15532b026e54814501 100644 (file)
@@ -593,11 +593,11 @@ MesaSoftwareRast::_SetupRenderBuffer(struct gl_renderbuffer* rb,
        switch (colorSpace) {
                case B_RGBA32:
                        rb->_BaseFormat = GL_RGBA;
-                       rb->Format = MESA_FORMAT_ARGB8888;
+                       rb->Format = MESA_FORMAT_B8G8R8A8_UNORM;
                        break;
                case B_RGB32:
                        rb->_BaseFormat = GL_RGB;
-                       rb->Format = MESA_FORMAT_XRGB8888;
+                       rb->Format = MESA_FORMAT_B8G8R8X8_UNORM;
                        break;
                case B_RGB24:
                        rb->_BaseFormat = GL_RGB;
index e168fec9ad01bc4d243c22c96089643ab8459ec8..9b1e96cfc32c916a5a68434d1bd6f42ed5b00eb9 100644 (file)
@@ -449,9 +449,9 @@ osmesa_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
    if (osmesa->format == OSMESA_RGBA) {
       if (osmesa->DataType == GL_UNSIGNED_BYTE) {
          if (_mesa_little_endian())
-            rb->Format = MESA_FORMAT_RGBA8888_REV;
+            rb->Format = MESA_FORMAT_R8G8B8A8_UNORM;
          else
-            rb->Format = MESA_FORMAT_RGBA8888;
+            rb->Format = MESA_FORMAT_A8B8G8R8_UNORM;
       }
       else if (osmesa->DataType == GL_UNSIGNED_SHORT) {
          rb->Format = MESA_FORMAT_RGBA_16;
@@ -463,9 +463,9 @@ osmesa_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
    else if (osmesa->format == OSMESA_BGRA) {
       if (osmesa->DataType == GL_UNSIGNED_BYTE) {
          if (_mesa_little_endian())
-            rb->Format = MESA_FORMAT_ARGB8888;
+            rb->Format = MESA_FORMAT_B8G8R8A8_UNORM;
          else
-            rb->Format = MESA_FORMAT_ARGB8888_REV;
+            rb->Format = MESA_FORMAT_A8R8G8B8_UNORM;
       }
       else if (osmesa->DataType == GL_UNSIGNED_SHORT) {
          _mesa_warning(ctx, "Unsupported OSMesa format BGRA/GLushort");
@@ -479,9 +479,9 @@ osmesa_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
    else if (osmesa->format == OSMESA_ARGB) {
       if (osmesa->DataType == GL_UNSIGNED_BYTE) {
          if (_mesa_little_endian())
-            rb->Format = MESA_FORMAT_ARGB8888_REV;
+            rb->Format = MESA_FORMAT_A8R8G8B8_UNORM;
          else
-            rb->Format = MESA_FORMAT_ARGB8888;
+            rb->Format = MESA_FORMAT_B8G8R8A8_UNORM;
       }
       else if (osmesa->DataType == GL_UNSIGNED_SHORT) {
          _mesa_warning(ctx, "Unsupported OSMesa format ARGB/GLushort");
index 3af5be49e00bbdeed42d22533195e74b13fe7381..b9beb48526d5db3d09dc42ef301e6c00421c27a8 100644 (file)
@@ -343,20 +343,20 @@ xmesa_new_renderbuffer(struct gl_context *ctx, GLuint name,
          /* This will really only happen for pixmaps.  We'll access the
           * pixmap via a temporary XImage which will be 32bpp.
           */
-         xrb->Base.Base.Format = MESA_FORMAT_XRGB8888;
+         xrb->Base.Base.Format = MESA_FORMAT_B8G8R8X8_UNORM;
          break;
       case PF_8A8R8G8B:
-         xrb->Base.Base.Format = MESA_FORMAT_ARGB8888;
+         xrb->Base.Base.Format = MESA_FORMAT_B8G8R8A8_UNORM;
          break;
       case PF_8A8B8G8R:
-         xrb->Base.Base.Format = MESA_FORMAT_RGBA8888_REV;
+         xrb->Base.Base.Format = MESA_FORMAT_R8G8B8A8_UNORM;
          break;
       case PF_5R6G5B:
          xrb->Base.Base.Format = MESA_FORMAT_RGB565;
          break;
       default:
          _mesa_warning(ctx, "Bad pixel format in xmesa_new_renderbuffer");
-         xrb->Base.Base.Format = MESA_FORMAT_ARGB8888;
+         xrb->Base.Base.Format = MESA_FORMAT_B8G8R8A8_UNORM;
          break;
       }
 
index 99b214789904242d88c62e5b01aad7aa4b283fe5..0b7031347490a5c7b8fe5044fe7fadda1f784689 100644 (file)
@@ -628,8 +628,8 @@ _mesa_print_texture(struct gl_context *ctx, struct gl_texture_image *img)
          case MESA_FORMAT_BGR888:
             c = 3;
             break;
-         case MESA_FORMAT_RGBA8888:
-         case MESA_FORMAT_ARGB8888:
+         case MESA_FORMAT_A8B8G8R8_UNORM:
+         case MESA_FORMAT_B8G8R8A8_UNORM:
             c = 4;
             break;
          default:
index bb784828830c7b5d90f31162841e61f2f729b345..dfe4a06bd7718a8125b5f894b2b8e6d382922504 100644 (file)
@@ -92,7 +92,7 @@ linear_ubyte_to_srgb_ubyte(GLubyte cl)
 
 
 /*
- * MESA_FORMAT_RGBA8888
+ * MESA_FORMAT_A8B8G8R8_UNORM
  */
 
 static void
@@ -136,7 +136,7 @@ pack_row_float_RGBA8888(GLuint n, const GLfloat src[][4], void *dst)
 
 
 /*
- * MESA_FORMAT_RGBA8888_REV
+ * MESA_FORMAT_R8G8B8A8_UNORM
  */
 
 static void
@@ -179,7 +179,7 @@ pack_row_float_RGBA8888_REV(GLuint n, const GLfloat src[][4], void *dst)
 
 
 /*
- * MESA_FORMAT_ARGB8888
+ * MESA_FORMAT_B8G8R8A8_UNORM
  */
 
 static void
@@ -222,7 +222,7 @@ pack_row_float_ARGB8888(GLuint n, const GLfloat src[][4], void *dst)
 
 
 /*
- * MESA_FORMAT_ARGB8888_REV
+ * MESA_FORMAT_A8R8G8B8_UNORM
  */
 
 static void
@@ -265,7 +265,7 @@ pack_row_float_ARGB8888_REV(GLuint n, const GLfloat src[][4], void *dst)
 
 
 /*
- * MESA_FORMAT_XRGB8888
+ * MESA_FORMAT_B8G8R8X8_UNORM
  */
 
 static void
@@ -307,7 +307,7 @@ pack_row_float_XRGB8888(GLuint n, const GLfloat src[][4], void *dst)
 
 
 /*
- * MESA_FORMAT_XRGB8888_REV
+ * MESA_FORMAT_X8R8G8B8_UNORM
  */
 
 static void
@@ -1889,14 +1889,14 @@ _mesa_get_pack_ubyte_rgba_function(mesa_format format)
 
       table[MESA_FORMAT_NONE] = NULL;
 
-      table[MESA_FORMAT_RGBA8888] = pack_ubyte_RGBA8888;
-      table[MESA_FORMAT_RGBA8888_REV] = pack_ubyte_RGBA8888_REV;
-      table[MESA_FORMAT_ARGB8888] = pack_ubyte_ARGB8888;
-      table[MESA_FORMAT_ARGB8888_REV] = pack_ubyte_ARGB8888_REV;
-      table[MESA_FORMAT_RGBX8888] = pack_ubyte_RGBA8888; /* reused */
-      table[MESA_FORMAT_RGBX8888_REV] = pack_ubyte_RGBA8888_REV; /* reused */
-      table[MESA_FORMAT_XRGB8888] = pack_ubyte_XRGB8888;
-      table[MESA_FORMAT_XRGB8888_REV] = pack_ubyte_XRGB8888_REV;
+      table[MESA_FORMAT_A8B8G8R8_UNORM] = pack_ubyte_RGBA8888;
+      table[MESA_FORMAT_R8G8B8A8_UNORM] = pack_ubyte_RGBA8888_REV;
+      table[MESA_FORMAT_B8G8R8A8_UNORM] = pack_ubyte_ARGB8888;
+      table[MESA_FORMAT_A8R8G8B8_UNORM] = pack_ubyte_ARGB8888_REV;
+      table[MESA_FORMAT_X8B8G8R8_UNORM] = pack_ubyte_RGBA8888; /* reused */
+      table[MESA_FORMAT_R8G8B8X8_UNORM] = pack_ubyte_RGBA8888_REV; /* reused */
+      table[MESA_FORMAT_B8G8R8X8_UNORM] = pack_ubyte_XRGB8888;
+      table[MESA_FORMAT_X8R8G8B8_UNORM] = pack_ubyte_XRGB8888_REV;
       table[MESA_FORMAT_RGB888] = pack_ubyte_RGB888;
       table[MESA_FORMAT_BGR888] = pack_ubyte_BGR888;
       table[MESA_FORMAT_RGB565] = pack_ubyte_RGB565;
@@ -2052,14 +2052,14 @@ _mesa_get_pack_float_rgba_function(mesa_format format)
 
       table[MESA_FORMAT_NONE] = NULL;
 
-      table[MESA_FORMAT_RGBA8888] = pack_float_RGBA8888;
-      table[MESA_FORMAT_RGBA8888_REV] = pack_float_RGBA8888_REV;
-      table[MESA_FORMAT_ARGB8888] = pack_float_ARGB8888;
-      table[MESA_FORMAT_ARGB8888_REV] = pack_float_ARGB8888_REV;
-      table[MESA_FORMAT_RGBX8888] = pack_float_RGBA8888; /* reused */
-      table[MESA_FORMAT_RGBX8888_REV] = pack_float_RGBA8888_REV; /* reused */
-      table[MESA_FORMAT_XRGB8888] = pack_float_XRGB8888;
-      table[MESA_FORMAT_XRGB8888_REV] = pack_float_XRGB8888_REV;
+      table[MESA_FORMAT_A8B8G8R8_UNORM] = pack_float_RGBA8888;
+      table[MESA_FORMAT_R8G8B8A8_UNORM] = pack_float_RGBA8888_REV;
+      table[MESA_FORMAT_B8G8R8A8_UNORM] = pack_float_ARGB8888;
+      table[MESA_FORMAT_A8R8G8B8_UNORM] = pack_float_ARGB8888_REV;
+      table[MESA_FORMAT_X8B8G8R8_UNORM] = pack_float_RGBA8888; /* reused */
+      table[MESA_FORMAT_R8G8B8X8_UNORM] = pack_float_RGBA8888_REV; /* reused */
+      table[MESA_FORMAT_B8G8R8X8_UNORM] = pack_float_XRGB8888;
+      table[MESA_FORMAT_X8R8G8B8_UNORM] = pack_float_XRGB8888_REV;
       table[MESA_FORMAT_RGB888] = pack_float_RGB888;
       table[MESA_FORMAT_BGR888] = pack_float_BGR888;
       table[MESA_FORMAT_RGB565] = pack_float_RGB565;
@@ -2213,14 +2213,14 @@ get_pack_float_rgba_row_function(mesa_format format)
        */
       memset(table, 0, sizeof(table));
 
-      table[MESA_FORMAT_RGBA8888] = pack_row_float_RGBA8888;
-      table[MESA_FORMAT_RGBA8888_REV] = pack_row_float_RGBA8888_REV;
-      table[MESA_FORMAT_ARGB8888] = pack_row_float_ARGB8888;
-      table[MESA_FORMAT_ARGB8888_REV] = pack_row_float_ARGB8888_REV;
-      table[MESA_FORMAT_RGBX8888] = pack_row_float_RGBA8888; /* reused */
-      table[MESA_FORMAT_RGBX8888_REV] = pack_row_float_RGBA8888_REV; /* reused */
-      table[MESA_FORMAT_XRGB8888] = pack_row_float_XRGB8888;
-      table[MESA_FORMAT_XRGB8888_REV] = pack_row_float_XRGB8888_REV;
+      table[MESA_FORMAT_A8B8G8R8_UNORM] = pack_row_float_RGBA8888;
+      table[MESA_FORMAT_R8G8B8A8_UNORM] = pack_row_float_RGBA8888_REV;
+      table[MESA_FORMAT_B8G8R8A8_UNORM] = pack_row_float_ARGB8888;
+      table[MESA_FORMAT_A8R8G8B8_UNORM] = pack_row_float_ARGB8888_REV;
+      table[MESA_FORMAT_X8B8G8R8_UNORM] = pack_row_float_RGBA8888; /* reused */
+      table[MESA_FORMAT_R8G8B8X8_UNORM] = pack_row_float_RGBA8888_REV; /* reused */
+      table[MESA_FORMAT_B8G8R8X8_UNORM] = pack_row_float_XRGB8888;
+      table[MESA_FORMAT_X8R8G8B8_UNORM] = pack_row_float_XRGB8888_REV;
       table[MESA_FORMAT_RGB888] = pack_row_float_RGB888;
       table[MESA_FORMAT_BGR888] = pack_row_float_BGR888;
       table[MESA_FORMAT_RGB565] = pack_row_float_RGB565;
@@ -2246,14 +2246,14 @@ get_pack_ubyte_rgba_row_function(mesa_format format)
        */
       memset(table, 0, sizeof(table));
 
-      table[MESA_FORMAT_RGBA8888] = pack_row_ubyte_RGBA8888;
-      table[MESA_FORMAT_RGBA8888_REV] = pack_row_ubyte_RGBA8888_REV;
-      table[MESA_FORMAT_ARGB8888] = pack_row_ubyte_ARGB8888;
-      table[MESA_FORMAT_ARGB8888_REV] = pack_row_ubyte_ARGB8888_REV;
-      table[MESA_FORMAT_RGBX8888] = pack_row_ubyte_RGBA8888; /* reused */
-      table[MESA_FORMAT_RGBX8888_REV] = pack_row_ubyte_RGBA8888_REV; /* reused */
-      table[MESA_FORMAT_XRGB8888] = pack_row_ubyte_XRGB8888;
-      table[MESA_FORMAT_XRGB8888_REV] = pack_row_ubyte_XRGB8888_REV;
+      table[MESA_FORMAT_A8B8G8R8_UNORM] = pack_row_ubyte_RGBA8888;
+      table[MESA_FORMAT_R8G8B8A8_UNORM] = pack_row_ubyte_RGBA8888_REV;
+      table[MESA_FORMAT_B8G8R8A8_UNORM] = pack_row_ubyte_ARGB8888;
+      table[MESA_FORMAT_A8R8G8B8_UNORM] = pack_row_ubyte_ARGB8888_REV;
+      table[MESA_FORMAT_X8B8G8R8_UNORM] = pack_row_ubyte_RGBA8888; /* reused */
+      table[MESA_FORMAT_R8G8B8X8_UNORM] = pack_row_ubyte_RGBA8888_REV; /* reused */
+      table[MESA_FORMAT_B8G8R8X8_UNORM] = pack_row_ubyte_XRGB8888;
+      table[MESA_FORMAT_X8R8G8B8_UNORM] = pack_row_ubyte_XRGB8888_REV;
       table[MESA_FORMAT_RGB888] = pack_row_ubyte_RGB888;
       table[MESA_FORMAT_BGR888] = pack_row_ubyte_BGR888;
       table[MESA_FORMAT_RGB565] = pack_row_ubyte_RGB565;
index 96c71107defd1b860beb21db4b4361bd053ff381..be5ef9e28c462a0b24c01abf5ba4f9163f75f8af 100644 (file)
@@ -2319,14 +2319,14 @@ get_unpack_rgba_function(mesa_format format)
    if (!initialized) {
       table[MESA_FORMAT_NONE] = NULL;
 
-      table[MESA_FORMAT_RGBA8888] = unpack_RGBA8888;
-      table[MESA_FORMAT_RGBA8888_REV] = unpack_RGBA8888_REV;
-      table[MESA_FORMAT_ARGB8888] = unpack_ARGB8888;
-      table[MESA_FORMAT_ARGB8888_REV] = unpack_ARGB8888_REV;
-      table[MESA_FORMAT_RGBX8888] = unpack_RGBX8888;
-      table[MESA_FORMAT_RGBX8888_REV] = unpack_RGBX8888_REV;
-      table[MESA_FORMAT_XRGB8888] = unpack_XRGB8888;
-      table[MESA_FORMAT_XRGB8888_REV] = unpack_XRGB8888_REV;
+      table[MESA_FORMAT_A8B8G8R8_UNORM] = unpack_RGBA8888;
+      table[MESA_FORMAT_R8G8B8A8_UNORM] = unpack_RGBA8888_REV;
+      table[MESA_FORMAT_B8G8R8A8_UNORM] = unpack_ARGB8888;
+      table[MESA_FORMAT_A8R8G8B8_UNORM] = unpack_ARGB8888_REV;
+      table[MESA_FORMAT_X8B8G8R8_UNORM] = unpack_RGBX8888;
+      table[MESA_FORMAT_R8G8B8X8_UNORM] = unpack_RGBX8888_REV;
+      table[MESA_FORMAT_B8G8R8X8_UNORM] = unpack_XRGB8888;
+      table[MESA_FORMAT_X8R8G8B8_UNORM] = unpack_XRGB8888_REV;
       table[MESA_FORMAT_RGB888] = unpack_RGB888;
       table[MESA_FORMAT_BGR888] = unpack_BGR888;
       table[MESA_FORMAT_RGB565] = unpack_RGB565;
@@ -2917,28 +2917,28 @@ _mesa_unpack_ubyte_rgba_row(mesa_format format, GLuint n,
                             const void *src, GLubyte dst[][4])
 {
    switch (format) {
-   case MESA_FORMAT_RGBA8888:
+   case MESA_FORMAT_A8B8G8R8_UNORM:
       unpack_ubyte_RGBA8888(src, dst, n);
       break;
-   case MESA_FORMAT_RGBA8888_REV:
+   case MESA_FORMAT_R8G8B8A8_UNORM:
       unpack_ubyte_RGBA8888_REV(src, dst, n);
       break;
-   case MESA_FORMAT_ARGB8888:
+   case MESA_FORMAT_B8G8R8A8_UNORM:
       unpack_ubyte_ARGB8888(src, dst, n);
       break;
-   case MESA_FORMAT_ARGB8888_REV:
+   case MESA_FORMAT_A8R8G8B8_UNORM:
       unpack_ubyte_ARGB8888_REV(src, dst, n);
       break;
-   case MESA_FORMAT_RGBX8888:
+   case MESA_FORMAT_X8B8G8R8_UNORM:
       unpack_ubyte_RGBX8888(src, dst, n);
       break;
-   case MESA_FORMAT_RGBX8888_REV:
+   case MESA_FORMAT_R8G8B8X8_UNORM:
       unpack_ubyte_RGBX8888_REV(src, dst, n);
       break;
-   case MESA_FORMAT_XRGB8888:
+   case MESA_FORMAT_B8G8R8X8_UNORM:
       unpack_ubyte_XRGB8888(src, dst, n);
       break;
-   case MESA_FORMAT_XRGB8888_REV:
+   case MESA_FORMAT_X8R8G8B8_UNORM:
       unpack_ubyte_XRGB8888_REV(src, dst, n);
       break;
    case MESA_FORMAT_RGB888:
@@ -3666,11 +3666,11 @@ _mesa_unpack_uint_rgba_row(mesa_format format, GLuint n,
       unpack_int_rgba_RGBA_INT8(src, dst, n);
       break;
 
-   case MESA_FORMAT_ARGB8888:
+   case MESA_FORMAT_B8G8R8A8_UNORM:
       unpack_int_rgba_ARGB8888(src, dst, n);
       break;
 
-   case MESA_FORMAT_XRGB8888:
+   case MESA_FORMAT_B8G8R8X8_UNORM:
       unpack_int_rgba_XRGB8888(src, dst, n);
       break;
 
index 81f922619161082aab3da6e0a2c98b2dc7cc0e59..a1e573051f12e37c99fba13e7e8e88147483ae4a 100644 (file)
@@ -88,8 +88,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
       0, 0, 0                      /* BlockWidth/Height,Bytes */
    },
    {
-      MESA_FORMAT_RGBA8888,        /* Name */
-      "MESA_FORMAT_RGBA8888",      /* StrName */
+      MESA_FORMAT_A8B8G8R8_UNORM,        /* Name */
+      "MESA_FORMAT_A8B8G8R8_UNORM",      /* StrName */
       GL_RGBA,                     /* BaseFormat */
       GL_UNSIGNED_NORMALIZED,      /* DataType */
       8, 8, 8, 8,                  /* Red/Green/Blue/AlphaBits */
@@ -97,8 +97,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
       1, 1, 4                      /* BlockWidth/Height,Bytes */
    },
    {
-      MESA_FORMAT_RGBA8888_REV,    /* Name */
-      "MESA_FORMAT_RGBA8888_REV",  /* StrName */
+      MESA_FORMAT_R8G8B8A8_UNORM,    /* Name */
+      "MESA_FORMAT_R8G8B8A8_UNORM",  /* StrName */
       GL_RGBA,                     /* BaseFormat */
       GL_UNSIGNED_NORMALIZED,      /* DataType */
       8, 8, 8, 8,                  /* Red/Green/Blue/AlphaBits */
@@ -106,8 +106,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
       1, 1, 4                      /* BlockWidth/Height,Bytes */
    },
    {
-      MESA_FORMAT_ARGB8888,        /* Name */
-      "MESA_FORMAT_ARGB8888",      /* StrName */
+      MESA_FORMAT_B8G8R8A8_UNORM,        /* Name */
+      "MESA_FORMAT_B8G8R8A8_UNORM",      /* StrName */
       GL_RGBA,                     /* BaseFormat */
       GL_UNSIGNED_NORMALIZED,      /* DataType */
       8, 8, 8, 8,                  /* Red/Green/Blue/AlphaBits */
@@ -115,8 +115,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
       1, 1, 4                      /* BlockWidth/Height,Bytes */
    },
    {
-      MESA_FORMAT_ARGB8888_REV,    /* Name */
-      "MESA_FORMAT_ARGB8888_REV",  /* StrName */
+      MESA_FORMAT_A8R8G8B8_UNORM,    /* Name */
+      "MESA_FORMAT_A8R8G8B8_UNORM",  /* StrName */
       GL_RGBA,                     /* BaseFormat */
       GL_UNSIGNED_NORMALIZED,      /* DataType */
       8, 8, 8, 8,                  /* Red/Green/Blue/AlphaBits */
@@ -124,8 +124,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
       1, 1, 4                      /* BlockWidth/Height,Bytes */
    },
    {
-      MESA_FORMAT_RGBX8888,        /* Name */
-      "MESA_FORMAT_RGBX8888",      /* StrName */
+      MESA_FORMAT_X8B8G8R8_UNORM,        /* Name */
+      "MESA_FORMAT_X8B8G8R8_UNORM",      /* StrName */
       GL_RGB,                      /* BaseFormat */
       GL_UNSIGNED_NORMALIZED,      /* DataType */
       8, 8, 8, 0,                  /* Red/Green/Blue/AlphaBits */
@@ -133,8 +133,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
       1, 1, 4                      /* BlockWidth/Height,Bytes */
    },
    {
-      MESA_FORMAT_RGBX8888_REV,    /* Name */
-      "MESA_FORMAT_RGBX8888_REV",  /* StrName */
+      MESA_FORMAT_R8G8B8X8_UNORM,    /* Name */
+      "MESA_FORMAT_R8G8B8X8_UNORM",  /* StrName */
       GL_RGB,                      /* BaseFormat */
       GL_UNSIGNED_NORMALIZED,      /* DataType */
       8, 8, 8, 0,                  /* Red/Green/Blue/AlphaBits */
@@ -142,8 +142,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
       1, 1, 4                      /* BlockWidth/Height,Bytes */
    },
    {
-      MESA_FORMAT_XRGB8888,        /* Name */
-      "MESA_FORMAT_XRGB8888",      /* StrName */
+      MESA_FORMAT_B8G8R8X8_UNORM,        /* Name */
+      "MESA_FORMAT_B8G8R8X8_UNORM",      /* StrName */
       GL_RGB,                      /* BaseFormat */
       GL_UNSIGNED_NORMALIZED,      /* DataType */
       8, 8, 8, 0,                  /* Red/Green/Blue/AlphaBits */
@@ -151,8 +151,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
       1, 1, 4                      /* BlockWidth/Height,Bytes */
    },
    {
-      MESA_FORMAT_XRGB8888_REV,    /* Name */
-      "MESA_FORMAT_XRGB8888_REV",  /* StrName */
+      MESA_FORMAT_X8R8G8B8_UNORM,    /* Name */
+      "MESA_FORMAT_X8R8G8B8_UNORM",  /* StrName */
       GL_RGB,                      /* BaseFormat */
       GL_UNSIGNED_NORMALIZED,      /* DataType */
       8, 8, 8, 0,                  /* Red/Green/Blue/AlphaBits */
@@ -2054,10 +2054,10 @@ _mesa_get_srgb_format_linear(mesa_format format)
       format = MESA_FORMAT_RGB888;
       break;
    case MESA_FORMAT_SRGBA8:
-      format = MESA_FORMAT_RGBA8888;
+      format = MESA_FORMAT_A8B8G8R8_UNORM;
       break;
    case MESA_FORMAT_SARGB8:
-      format = MESA_FORMAT_ARGB8888;
+      format = MESA_FORMAT_B8G8R8A8_UNORM;
       break;
    case MESA_FORMAT_SL8:
       format = MESA_FORMAT_L8;
@@ -2078,7 +2078,7 @@ _mesa_get_srgb_format_linear(mesa_format format)
       format = MESA_FORMAT_RGBA_DXT5;
       break;
    case MESA_FORMAT_XBGR8888_SRGB:
-      format = MESA_FORMAT_RGBX8888_REV;
+      format = MESA_FORMAT_R8G8B8X8_UNORM;
       break;
    case MESA_FORMAT_ETC2_SRGB8:
       format = MESA_FORMAT_ETC2_RGB8;
@@ -2107,19 +2107,19 @@ _mesa_get_uncompressed_format(mesa_format format)
    case MESA_FORMAT_RGB_FXT1:
       return MESA_FORMAT_RGB888;
    case MESA_FORMAT_RGBA_FXT1:
-      return MESA_FORMAT_RGBA8888;
+      return MESA_FORMAT_A8B8G8R8_UNORM;
    case MESA_FORMAT_RGB_DXT1:
    case MESA_FORMAT_SRGB_DXT1:
       return MESA_FORMAT_RGB888;
    case MESA_FORMAT_RGBA_DXT1:
    case MESA_FORMAT_SRGBA_DXT1:
-      return MESA_FORMAT_RGBA8888;
+      return MESA_FORMAT_A8B8G8R8_UNORM;
    case MESA_FORMAT_RGBA_DXT3:
    case MESA_FORMAT_SRGBA_DXT3:
-      return MESA_FORMAT_RGBA8888;
+      return MESA_FORMAT_A8B8G8R8_UNORM;
    case MESA_FORMAT_RGBA_DXT5:
    case MESA_FORMAT_SRGBA_DXT5:
-      return MESA_FORMAT_RGBA8888;
+      return MESA_FORMAT_A8B8G8R8_UNORM;
    case MESA_FORMAT_RED_RGTC1:
       return MESA_FORMAT_R8;
    case MESA_FORMAT_SIGNED_RED_RGTC1:
@@ -2144,7 +2144,7 @@ _mesa_get_uncompressed_format(mesa_format format)
    case MESA_FORMAT_ETC2_SRGB8_ALPHA8_EAC:
    case MESA_FORMAT_ETC2_RGB8_PUNCHTHROUGH_ALPHA1:
    case MESA_FORMAT_ETC2_SRGB8_PUNCHTHROUGH_ALPHA1:
-      return MESA_FORMAT_RGBA8888;
+      return MESA_FORMAT_A8B8G8R8_UNORM;
    case MESA_FORMAT_ETC2_R11_EAC:
    case MESA_FORMAT_ETC2_SIGNED_R11_EAC:
       return MESA_FORMAT_R16;
@@ -2372,14 +2372,14 @@ _mesa_format_to_type_and_comps(mesa_format format,
                                GLenum *datatype, GLuint *comps)
 {
    switch (format) {
-   case MESA_FORMAT_RGBA8888:
-   case MESA_FORMAT_RGBA8888_REV:
-   case MESA_FORMAT_ARGB8888:
-   case MESA_FORMAT_ARGB8888_REV:
-   case MESA_FORMAT_RGBX8888:
-   case MESA_FORMAT_RGBX8888_REV:
-   case MESA_FORMAT_XRGB8888:
-   case MESA_FORMAT_XRGB8888_REV:
+   case MESA_FORMAT_A8B8G8R8_UNORM:
+   case MESA_FORMAT_R8G8B8A8_UNORM:
+   case MESA_FORMAT_B8G8R8A8_UNORM:
+   case MESA_FORMAT_A8R8G8B8_UNORM:
+   case MESA_FORMAT_X8B8G8R8_UNORM:
+   case MESA_FORMAT_R8G8B8X8_UNORM:
+   case MESA_FORMAT_B8G8R8X8_UNORM:
+   case MESA_FORMAT_X8R8G8B8_UNORM:
       *datatype = GL_UNSIGNED_BYTE;
       *comps = 4;
       return;
@@ -2942,7 +2942,7 @@ _mesa_format_matches_format_and_type(mesa_format mesa_format,
    case MESA_FORMAT_COUNT:
       return GL_FALSE;
 
-   case MESA_FORMAT_RGBA8888:
+   case MESA_FORMAT_A8B8G8R8_UNORM:
    case MESA_FORMAT_SRGBA8:
       if (format == GL_RGBA && type == GL_UNSIGNED_INT_8_8_8_8 && !swapBytes)
          return GL_TRUE;
@@ -2966,7 +2966,7 @@ _mesa_format_matches_format_and_type(mesa_format mesa_format,
 
       return GL_FALSE;
 
-   case MESA_FORMAT_RGBA8888_REV:
+   case MESA_FORMAT_R8G8B8A8_UNORM:
       if (format == GL_RGBA && type == GL_UNSIGNED_INT_8_8_8_8_REV &&
           !swapBytes)
          return GL_TRUE;
@@ -2990,7 +2990,7 @@ _mesa_format_matches_format_and_type(mesa_format mesa_format,
 
       return GL_FALSE;
 
-   case MESA_FORMAT_ARGB8888:
+   case MESA_FORMAT_B8G8R8A8_UNORM:
    case MESA_FORMAT_SARGB8:
       if (format == GL_BGRA && type == GL_UNSIGNED_INT_8_8_8_8_REV &&
           !swapBytes)
@@ -3004,7 +3004,7 @@ _mesa_format_matches_format_and_type(mesa_format mesa_format,
 
       return GL_FALSE;
 
-   case MESA_FORMAT_ARGB8888_REV:
+   case MESA_FORMAT_A8R8G8B8_UNORM:
       if (format == GL_BGRA && type == GL_UNSIGNED_INT_8_8_8_8 && !swapBytes)
          return GL_TRUE;
 
@@ -3017,12 +3017,12 @@ _mesa_format_matches_format_and_type(mesa_format mesa_format,
 
       return GL_FALSE;
 
-   case MESA_FORMAT_RGBX8888:
-   case MESA_FORMAT_RGBX8888_REV:
+   case MESA_FORMAT_X8B8G8R8_UNORM:
+   case MESA_FORMAT_R8G8B8X8_UNORM:
       return GL_FALSE;
 
-   case MESA_FORMAT_XRGB8888:
-   case MESA_FORMAT_XRGB8888_REV:
+   case MESA_FORMAT_B8G8R8X8_UNORM:
+   case MESA_FORMAT_X8R8G8B8_UNORM:
       return GL_FALSE;
 
    case MESA_FORMAT_RGB888:
index 68f15be14713b764605d425ae76832442a5edeca..1e8ffb451b3d7a4cb8f41964e8a7729f1535a425 100644 (file)
@@ -65,16 +65,16 @@ typedef enum
     * \name Basic hardware formats
     */
    /*@{*/
-                               /* msb <------ TEXEL BITS -----------> lsb */
-                               /* ---- ---- ---- ---- ---- ---- ---- ---- */
-   MESA_FORMAT_RGBA8888,       /* RRRR RRRR GGGG GGGG BBBB BBBB AAAA AAAA */
-   MESA_FORMAT_RGBA8888_REV,   /* AAAA AAAA BBBB BBBB GGGG GGGG RRRR RRRR */
-   MESA_FORMAT_ARGB8888,       /* AAAA AAAA RRRR RRRR GGGG GGGG BBBB BBBB */
-   MESA_FORMAT_ARGB8888_REV,   /* BBBB BBBB GGGG GGGG RRRR RRRR AAAA AAAA */
-   MESA_FORMAT_RGBX8888,       /* RRRR RRRR GGGG GGGG BBBB BBBB XXXX XXXX */
-   MESA_FORMAT_RGBX8888_REV,   /* xxxx xxxx BBBB BBBB GGGG GGGG RRRR RRRR */
-   MESA_FORMAT_XRGB8888,       /* xxxx xxxx RRRR RRRR GGGG GGGG BBBB BBBB */
-   MESA_FORMAT_XRGB8888_REV,   /* BBBB BBBB GGGG GGGG RRRR RRRR xxxx xxxx */
+                                 /* msb <------ TEXEL BITS -----------> lsb */
+                                 /* ---- ---- ---- ---- ---- ---- ---- ---- */
+   MESA_FORMAT_A8B8G8R8_UNORM,   /* AAAA AAAA BBBB BBBB GGGG GGGG RRRR RRRR */
+   MESA_FORMAT_R8G8B8A8_UNORM,   /* RRRR RRRR GGGG GGGG BBBB BBBB AAAA AAAA */
+   MESA_FORMAT_B8G8R8A8_UNORM,   /* BBBB BBBB GGGG GGGG RRRR RRRR AAAA AAAA */
+   MESA_FORMAT_A8R8G8B8_UNORM,   /* AAAA AAAA RRRR RRRR GGGG GGGG BBBB BBBB */
+   MESA_FORMAT_X8B8G8R8_UNORM,   /* xxxx xxxx BBBB BBBB GGGG GGGG RRRR RRRR */
+   MESA_FORMAT_R8G8B8X8_UNORM,   /* RRRR RRRR GGGG GGGG BBBB BBBB xxxx xxxx */
+   MESA_FORMAT_B8G8R8X8_UNORM,   /* BBBB BBBB GGGG GGGG RRRR RRRR xxxx xxxx */
+   MESA_FORMAT_X8R8G8B8_UNORM,   /* xxxx xxxx RRRR RRRR GGGG GGGG BBBB BBBB */
    MESA_FORMAT_RGB888,         /*           RRRR RRRR GGGG GGGG BBBB BBBB */
    MESA_FORMAT_BGR888,         /*           BBBB BBBB GGGG GGGG RRRR RRRR */
    MESA_FORMAT_RGB565,         /*                     RRRR RGGG GGGB BBBB */
index 473699737356fe5728b85b0aa180a604ca0d16ed..b5fc4ee0d8a50f5c6203c892ba02689ad889e783 100644 (file)
@@ -840,7 +840,7 @@ _mesa_get_color_read_format(struct gl_context *ctx)
       const GLenum format = ctx->ReadBuffer->_ColorReadBuffer->Format;
       const GLenum data_type = _mesa_get_format_datatype(format);
 
-      if (format == MESA_FORMAT_ARGB8888)
+      if (format == MESA_FORMAT_B8G8R8A8_UNORM)
          return GL_BGRA;
       else if (format == MESA_FORMAT_RGB565)
          return GL_BGR;
index 63cf0202bbd535829b4d0eb44d3aed051486b10f..fcf849b9808bb3b2480251e02d9cb7b85f46e00d 100644 (file)
@@ -424,13 +424,13 @@ read_rgba_pixels_swizzle(struct gl_context *ctx,
    GLboolean swizzle_rb = GL_FALSE, copy_xrgb = GL_FALSE;
 
    /* XXX we could check for other swizzle/special cases here as needed */
-   if (rb->Format == MESA_FORMAT_RGBA8888_REV &&
+   if (rb->Format == MESA_FORMAT_R8G8B8A8_UNORM &&
        format == GL_BGRA &&
        type == GL_UNSIGNED_INT_8_8_8_8_REV &&
        !ctx->Pack.SwapBytes) {
       swizzle_rb = GL_TRUE;
    }
-   else if (rb->Format == MESA_FORMAT_XRGB8888 &&
+   else if (rb->Format == MESA_FORMAT_B8G8R8X8_UNORM &&
        format == GL_BGRA &&
        type == GL_UNSIGNED_INT_8_8_8_8_REV &&
        !ctx->Pack.SwapBytes) {
index cfb5ad47754f0690b262a10f6d073101727b488d..3468672d8eb900200f6e0d0ac33926ab5c1c6332 100644 (file)
  * results.
  */
 #ifdef MESA_BIG_ENDIAN
-# define MESA_FORMAT_RGBA_8 MESA_FORMAT_RGBA8888
+# define MESA_FORMAT_RGBA_8 MESA_FORMAT_A8B8G8R8_UNORM
 # define MESA_FORMAT_RG_16 MESA_FORMAT_RG1616
 # define MESA_FORMAT_RG_8 MESA_FORMAT_RG88
 # define MESA_FORMAT_SIGNED_RGBA_8 MESA_FORMAT_SIGNED_RGBA8888
 # define MESA_FORMAT_SIGNED_RG_16 MESA_FORMAT_SIGNED_RG1616
 # define MESA_FORMAT_SIGNED_RG_8 MESA_FORMAT_SIGNED_RG88
 #else
-# define MESA_FORMAT_RGBA_8 MESA_FORMAT_RGBA8888_REV
+# define MESA_FORMAT_RGBA_8 MESA_FORMAT_R8G8B8A8_UNORM
 # define MESA_FORMAT_RG_16 MESA_FORMAT_GR1616
 # define MESA_FORMAT_RG_8 MESA_FORMAT_GR88
 # define MESA_FORMAT_SIGNED_RGBA_8 MESA_FORMAT_SIGNED_RGBA8888_REV
index 0a993ede89b364fa85457f5f68d43d39cca70e1b..93a6b6d742a716af133d9df9a03a83d44480a9de 100644 (file)
@@ -76,13 +76,13 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
       } else if (type == GL_UNSIGNED_INT_2_10_10_10_REV) {
          RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB2101010);
       }
-      RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888);
-      RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
+      RETURN_IF_SUPPORTED(MESA_FORMAT_A8B8G8R8_UNORM);
+      RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_UNORM);
       break;
 
    case GL_RGBA8:
-      RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888);
-      RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
+      RETURN_IF_SUPPORTED(MESA_FORMAT_A8B8G8R8_UNORM);
+      RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_UNORM);
       break;
    case GL_RGB5_A1:
       RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB1555);
@@ -98,14 +98,14 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
    /* deep RGBA formats */
    case GL_RGB10_A2:
       RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB2101010);
-      RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
+      RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_UNORM);
       break;
    case GL_RGBA12:
    case GL_RGBA16:
       RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_16);
       RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_16);
-      RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888);
-      RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
+      RETURN_IF_SUPPORTED(MESA_FORMAT_A8B8G8R8_UNORM);
+      RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_UNORM);
       break;
 
    /* shallow RGB formats */
@@ -117,16 +117,16 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
       /* fallthrough */
    case GL_RGB8:
       RETURN_IF_SUPPORTED(MESA_FORMAT_RGB888);
-      RETURN_IF_SUPPORTED(MESA_FORMAT_XRGB8888);
-      RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
+      RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8X8_UNORM);
+      RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_UNORM);
       break;
    case GL_R3_G3_B2:
       RETURN_IF_SUPPORTED(MESA_FORMAT_RGB332);
       RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565);
       RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565_REV);
       RETURN_IF_SUPPORTED(MESA_FORMAT_RGB888);
-      RETURN_IF_SUPPORTED(MESA_FORMAT_XRGB8888);
-      RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
+      RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8X8_UNORM);
+      RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_UNORM);
       break;
    case GL_RGB4:
       RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565_REV); /* just to test another format */
@@ -142,8 +142,8 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
    case GL_RGB16:
       RETURN_IF_SUPPORTED(MESA_FORMAT_XBGR16161616_UNORM);
       RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_16);
-      RETURN_IF_SUPPORTED(MESA_FORMAT_XRGB8888);
-      RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
+      RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8X8_UNORM);
+      RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_UNORM);
       break;
 
    /* Alpha formats */
@@ -244,8 +244,8 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
          RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FXT1);
       }
       RETURN_IF_SUPPORTED(MESA_FORMAT_RGB888);
-      RETURN_IF_SUPPORTED(MESA_FORMAT_XRGB8888);
-      RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
+      RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8X8_UNORM);
+      RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_UNORM);
       break;
    case GL_COMPRESSED_RGBA_ARB:
       /* We don't use texture compression for 1D and 1D array textures. */
@@ -254,8 +254,8 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
             RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_DXT3); /* Not rgba_dxt1, see spec */
          RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FXT1);
       }
-      RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888);
-      RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
+      RETURN_IF_SUPPORTED(MESA_FORMAT_A8B8G8R8_UNORM);
+      RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_UNORM);
       break;
 
    case GL_RGB565:
@@ -809,7 +809,7 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
       break;
 
    case GL_BGRA:
-      RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
+      RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_UNORM);
       break;
    }
 
index c3c66bcbd36e06800db46c4f01ccf4e2b38b63f5..023aef4e6ebc6c896c5e95c3cdd19c4ab4de4869 100644 (file)
@@ -4114,7 +4114,7 @@ get_texbuffer_format(const struct gl_context *ctx, GLenum internalFormat)
 
    switch (internalFormat) {
    case GL_RGBA8:
-      return MESA_FORMAT_RGBA8888_REV;
+      return MESA_FORMAT_R8G8B8A8_UNORM;
    case GL_RGBA16:
       return MESA_FORMAT_RGBA_16;
    case GL_RGBA16F_ARB:
index 42f86b77dbaafa3d06178fdb72e67afb3285e547..258b66e829decff26a15db638f4b92becd6082a0 100644 (file)
@@ -1190,17 +1190,17 @@ _mesa_texstore_rgb565(TEXSTORE_PARAMS)
 
 
 /**
- * Store a texture in MESA_FORMAT_RGBA8888 or MESA_FORMAT_RGBA8888_REV.
+ * Store a texture in MESA_FORMAT_A8B8G8R8_UNORM or MESA_FORMAT_R8G8B8A8_UNORM.
  */
 static GLboolean
 _mesa_texstore_rgba8888(TEXSTORE_PARAMS)
 {
    const GLboolean littleEndian = _mesa_little_endian();
 
-   ASSERT(dstFormat == MESA_FORMAT_RGBA8888 ||
-          dstFormat == MESA_FORMAT_RGBA8888_REV ||
-          dstFormat == MESA_FORMAT_RGBX8888 ||
-          dstFormat == MESA_FORMAT_RGBX8888_REV);
+   ASSERT(dstFormat == MESA_FORMAT_A8B8G8R8_UNORM ||
+          dstFormat == MESA_FORMAT_R8G8B8A8_UNORM ||
+          dstFormat == MESA_FORMAT_X8B8G8R8_UNORM ||
+          dstFormat == MESA_FORMAT_R8G8B8X8_UNORM);
    ASSERT(_mesa_get_format_bytes(dstFormat) == 4);
 
    if (!ctx->_ImageTransferState &&
@@ -1214,10 +1214,10 @@ _mesa_texstore_rgba8888(TEXSTORE_PARAMS)
 
       /* dstmap - how to swizzle from RGBA to dst format:
        */
-      if ((littleEndian && (dstFormat == MESA_FORMAT_RGBA8888 ||
-                            dstFormat == MESA_FORMAT_RGBX8888)) ||
-         (!littleEndian && (dstFormat == MESA_FORMAT_RGBA8888_REV ||
-                            dstFormat == MESA_FORMAT_RGBX8888_REV))) {
+      if ((littleEndian && (dstFormat == MESA_FORMAT_A8B8G8R8_UNORM ||
+                            dstFormat == MESA_FORMAT_X8B8G8R8_UNORM)) ||
+         (!littleEndian && (dstFormat == MESA_FORMAT_R8G8B8A8_UNORM ||
+                            dstFormat == MESA_FORMAT_R8G8B8X8_UNORM))) {
         dstmap[3] = 0;
         dstmap[2] = 1;
         dstmap[1] = 2;
@@ -1254,16 +1254,16 @@ _mesa_texstore_argb8888(TEXSTORE_PARAMS)
 {
    const GLboolean littleEndian = _mesa_little_endian();
 
-   ASSERT(dstFormat == MESA_FORMAT_ARGB8888 ||
-          dstFormat == MESA_FORMAT_ARGB8888_REV ||
-          dstFormat == MESA_FORMAT_XRGB8888 ||
-          dstFormat == MESA_FORMAT_XRGB8888_REV );
+   ASSERT(dstFormat == MESA_FORMAT_B8G8R8A8_UNORM ||
+          dstFormat == MESA_FORMAT_A8R8G8B8_UNORM ||
+          dstFormat == MESA_FORMAT_B8G8R8X8_UNORM ||
+          dstFormat == MESA_FORMAT_X8R8G8B8_UNORM );
    ASSERT(_mesa_get_format_bytes(dstFormat) == 4);
 
    if (!ctx->_ImageTransferState &&
        !srcPacking->SwapBytes &&
-       (dstFormat == MESA_FORMAT_ARGB8888 ||
-        dstFormat == MESA_FORMAT_XRGB8888) &&
+       (dstFormat == MESA_FORMAT_B8G8R8A8_UNORM ||
+        dstFormat == MESA_FORMAT_B8G8R8X8_UNORM) &&
        srcFormat == GL_RGB &&
        (baseInternalFormat == GL_RGBA ||
         baseInternalFormat == GL_RGB) &&
@@ -1290,7 +1290,7 @@ _mesa_texstore_argb8888(TEXSTORE_PARAMS)
    }
    else if (!ctx->_ImageTransferState &&
             !srcPacking->SwapBytes &&
-            dstFormat == MESA_FORMAT_ARGB8888 &&
+            dstFormat == MESA_FORMAT_B8G8R8A8_UNORM &&
             srcFormat == GL_LUMINANCE_ALPHA &&
             baseInternalFormat == GL_RGBA &&
             srcType == GL_UNSIGNED_BYTE) {
@@ -1316,7 +1316,7 @@ _mesa_texstore_argb8888(TEXSTORE_PARAMS)
    }
    else if (!ctx->_ImageTransferState &&
             !srcPacking->SwapBytes &&
-           dstFormat == MESA_FORMAT_ARGB8888 &&
+           dstFormat == MESA_FORMAT_B8G8R8A8_UNORM &&
             srcFormat == GL_RGBA &&
            baseInternalFormat == GL_RGBA &&
             srcType == GL_UNSIGNED_BYTE) {
@@ -1358,20 +1358,20 @@ _mesa_texstore_argb8888(TEXSTORE_PARAMS)
 
       /* dstmap - how to swizzle from RGBA to dst format:
        */
-      if ((littleEndian && dstFormat == MESA_FORMAT_ARGB8888) ||
-          (littleEndian && dstFormat == MESA_FORMAT_XRGB8888) ||
-         (!littleEndian && dstFormat == MESA_FORMAT_ARGB8888_REV) ||
-         (!littleEndian && dstFormat == MESA_FORMAT_XRGB8888_REV)) {
+      if ((littleEndian && dstFormat == MESA_FORMAT_B8G8R8A8_UNORM) ||
+          (littleEndian && dstFormat == MESA_FORMAT_B8G8R8X8_UNORM) ||
+         (!littleEndian && dstFormat == MESA_FORMAT_A8R8G8B8_UNORM) ||
+         (!littleEndian && dstFormat == MESA_FORMAT_X8R8G8B8_UNORM)) {
         dstmap[3] = 3;         /* alpha */
         dstmap[2] = 0;         /* red */
         dstmap[1] = 1;         /* green */
         dstmap[0] = 2;         /* blue */
       }
       else {
-        assert((littleEndian && dstFormat == MESA_FORMAT_ARGB8888_REV) ||
-               (!littleEndian && dstFormat == MESA_FORMAT_ARGB8888) ||
-               (littleEndian && dstFormat == MESA_FORMAT_XRGB8888_REV) ||
-               (!littleEndian && dstFormat == MESA_FORMAT_XRGB8888));
+        assert((littleEndian && dstFormat == MESA_FORMAT_A8R8G8B8_UNORM) ||
+               (!littleEndian && dstFormat == MESA_FORMAT_B8G8R8A8_UNORM) ||
+               (littleEndian && dstFormat == MESA_FORMAT_X8R8G8B8_UNORM) ||
+               (!littleEndian && dstFormat == MESA_FORMAT_B8G8R8X8_UNORM));
         dstmap[3] = 2;
         dstmap[2] = 1;
         dstmap[1] = 0;
@@ -3264,10 +3264,10 @@ _mesa_texstore_srgba8(TEXSTORE_PARAMS)
 
    /* reuse normal rgba texstore code */
    if (dstFormat == MESA_FORMAT_SRGBA8) {
-      newDstFormat = MESA_FORMAT_RGBA8888;
+      newDstFormat = MESA_FORMAT_A8B8G8R8_UNORM;
    }
    else if (dstFormat == MESA_FORMAT_XBGR8888_SRGB) {
-      newDstFormat = MESA_FORMAT_RGBX8888_REV;
+      newDstFormat = MESA_FORMAT_R8G8B8X8_UNORM;
    }
    else {
       ASSERT(0);
@@ -3293,7 +3293,7 @@ _mesa_texstore_sargb8(TEXSTORE_PARAMS)
    ASSERT(dstFormat == MESA_FORMAT_SARGB8);
 
    /* reuse normal rgba texstore code */
-   newDstFormat = MESA_FORMAT_ARGB8888;
+   newDstFormat = MESA_FORMAT_B8G8R8A8_UNORM;
 
    k = _mesa_texstore_argb8888(ctx, dims, baseInternalFormat,
                                newDstFormat,
@@ -3660,14 +3660,14 @@ _mesa_get_texstore_func(mesa_format format)
    if (!initialized) {
       table[MESA_FORMAT_NONE] = _mesa_texstore_null;
 
-      table[MESA_FORMAT_RGBA8888] = _mesa_texstore_rgba8888;
-      table[MESA_FORMAT_RGBA8888_REV] = _mesa_texstore_rgba8888;
-      table[MESA_FORMAT_ARGB8888] = _mesa_texstore_argb8888;
-      table[MESA_FORMAT_ARGB8888_REV] = _mesa_texstore_argb8888;
-      table[MESA_FORMAT_RGBX8888] = _mesa_texstore_rgba8888;
-      table[MESA_FORMAT_RGBX8888_REV] = _mesa_texstore_rgba8888;
-      table[MESA_FORMAT_XRGB8888] = _mesa_texstore_argb8888;
-      table[MESA_FORMAT_XRGB8888_REV] = _mesa_texstore_argb8888;
+      table[MESA_FORMAT_A8B8G8R8_UNORM] = _mesa_texstore_rgba8888;
+      table[MESA_FORMAT_R8G8B8A8_UNORM] = _mesa_texstore_rgba8888;
+      table[MESA_FORMAT_B8G8R8A8_UNORM] = _mesa_texstore_argb8888;
+      table[MESA_FORMAT_A8R8G8B8_UNORM] = _mesa_texstore_argb8888;
+      table[MESA_FORMAT_X8B8G8R8_UNORM] = _mesa_texstore_rgba8888;
+      table[MESA_FORMAT_R8G8B8X8_UNORM] = _mesa_texstore_rgba8888;
+      table[MESA_FORMAT_B8G8R8X8_UNORM] = _mesa_texstore_argb8888;
+      table[MESA_FORMAT_X8R8G8B8_UNORM] = _mesa_texstore_argb8888;
       table[MESA_FORMAT_RGB888] = _mesa_texstore_rgb888;
       table[MESA_FORMAT_BGR888] = _mesa_texstore_bgr888;
       table[MESA_FORMAT_RGB565] = _mesa_texstore_rgb565;
index bd4b96d0d2023adad9955c240dc9deb855e367e1..059a103db8dab3c521e4cedb3c68d394bba3d667 100644 (file)
@@ -57,21 +57,21 @@ enum pipe_format
 st_mesa_format_to_pipe_format(mesa_format mesaFormat)
 {
    switch (mesaFormat) {
-   case MESA_FORMAT_RGBA8888:
+   case MESA_FORMAT_A8B8G8R8_UNORM:
       return PIPE_FORMAT_ABGR8888_UNORM;
-   case MESA_FORMAT_RGBA8888_REV:
+   case MESA_FORMAT_R8G8B8A8_UNORM:
       return PIPE_FORMAT_RGBA8888_UNORM;
-   case MESA_FORMAT_ARGB8888:
+   case MESA_FORMAT_B8G8R8A8_UNORM:
       return PIPE_FORMAT_BGRA8888_UNORM;
-   case MESA_FORMAT_ARGB8888_REV:
+   case MESA_FORMAT_A8R8G8B8_UNORM:
       return PIPE_FORMAT_ARGB8888_UNORM;
-   case MESA_FORMAT_RGBX8888:
+   case MESA_FORMAT_X8B8G8R8_UNORM:
       return PIPE_FORMAT_XBGR8888_UNORM;
-   case MESA_FORMAT_RGBX8888_REV:
+   case MESA_FORMAT_R8G8B8X8_UNORM:
       return PIPE_FORMAT_RGBX8888_UNORM;
-   case MESA_FORMAT_XRGB8888:
+   case MESA_FORMAT_B8G8R8X8_UNORM:
       return PIPE_FORMAT_BGRX8888_UNORM;
-   case MESA_FORMAT_XRGB8888_REV:
+   case MESA_FORMAT_X8R8G8B8_UNORM:
       return PIPE_FORMAT_XRGB8888_UNORM;
    case MESA_FORMAT_ARGB1555:
       return PIPE_FORMAT_B5G5R5A1_UNORM;
@@ -407,21 +407,21 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
 {
    switch (format) {
    case PIPE_FORMAT_ABGR8888_UNORM:
-      return MESA_FORMAT_RGBA8888;
+      return MESA_FORMAT_A8B8G8R8_UNORM;
    case PIPE_FORMAT_RGBA8888_UNORM:
-      return MESA_FORMAT_RGBA8888_REV;
+      return MESA_FORMAT_R8G8B8A8_UNORM;
    case PIPE_FORMAT_BGRA8888_UNORM:
-      return MESA_FORMAT_ARGB8888;
+      return MESA_FORMAT_B8G8R8A8_UNORM;
    case PIPE_FORMAT_ARGB8888_UNORM:
-      return MESA_FORMAT_ARGB8888_REV;
+      return MESA_FORMAT_A8R8G8B8_UNORM;
    case PIPE_FORMAT_XBGR8888_UNORM:
-      return MESA_FORMAT_RGBX8888;
+      return MESA_FORMAT_X8B8G8R8_UNORM;
    case PIPE_FORMAT_RGBX8888_UNORM:
-      return MESA_FORMAT_RGBX8888_REV;
+      return MESA_FORMAT_R8G8B8X8_UNORM;
    case PIPE_FORMAT_BGRX8888_UNORM:
-      return MESA_FORMAT_XRGB8888;
+      return MESA_FORMAT_B8G8R8X8_UNORM;
    case PIPE_FORMAT_XRGB8888_UNORM:
-      return MESA_FORMAT_XRGB8888_REV;
+      return MESA_FORMAT_X8R8G8B8_UNORM;
    case PIPE_FORMAT_B5G5R5A1_UNORM:
       return MESA_FORMAT_ARGB1555;
    case PIPE_FORMAT_B4G4R4A4_UNORM:
index 1786de1a397a605567e437228f1b216b5e5605fc..ce15f02e35b76939305994a0a12cc5b834ab9d56 100644 (file)
@@ -223,8 +223,8 @@ fast_draw_rgba_pixels(struct gl_context *ctx, GLint x, GLint y,
 
    if (format == GL_RGB &&
        type == GL_UNSIGNED_BYTE &&
-       (rb->Format == MESA_FORMAT_XRGB8888 ||
-        rb->Format == MESA_FORMAT_ARGB8888)) {
+       (rb->Format == MESA_FORMAT_B8G8R8X8_UNORM ||
+        rb->Format == MESA_FORMAT_B8G8R8A8_UNORM)) {
       fast_draw_rgb_ubyte_pixels(ctx, rb, x, y, width, height,
                                  &unpack, pixels);
       return GL_TRUE;
@@ -232,8 +232,8 @@ fast_draw_rgba_pixels(struct gl_context *ctx, GLint x, GLint y,
 
    if (format == GL_RGBA &&
        type == GL_UNSIGNED_BYTE &&
-       (rb->Format == MESA_FORMAT_XRGB8888 ||
-        rb->Format == MESA_FORMAT_ARGB8888)) {
+       (rb->Format == MESA_FORMAT_B8G8R8X8_UNORM ||
+        rb->Format == MESA_FORMAT_B8G8R8A8_UNORM)) {
       fast_draw_rgba_ubyte_pixels(ctx, rb, x, y, width, height,
                                   &unpack, pixels);
       return GL_TRUE;
index a19d02ac0cdfe3115e37609f9dd2d38ff93be351..28c1eb07be952872a4003b59b32a2dda09141817 100644 (file)
@@ -81,9 +81,9 @@ soft_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
    case GL_RGBA12:
 #endif
       if (_mesa_little_endian())
-         rb->Format = MESA_FORMAT_RGBA8888_REV;
+         rb->Format = MESA_FORMAT_R8G8B8A8_UNORM;
       else
-         rb->Format = MESA_FORMAT_RGBA8888;
+         rb->Format = MESA_FORMAT_A8B8G8R8_UNORM;
       break;
    case GL_RGBA16:
    case GL_RGBA16_SNORM:
index 7f9d3860ec524683c27375ee9ebfaafb5c1ac0db..7a5ff447c348b85066e2ccc08900dfa1bf0683a2 100644 (file)
@@ -149,49 +149,49 @@ texfetch_funcs[] =
    },
 
    {
-      MESA_FORMAT_RGBA8888,
+      MESA_FORMAT_A8B8G8R8_UNORM,
       fetch_texel_1d_f_rgba8888,
       fetch_texel_2d_f_rgba8888,
       fetch_texel_3d_f_rgba8888
    },
    {
-      MESA_FORMAT_RGBA8888_REV,
+      MESA_FORMAT_R8G8B8A8_UNORM,
       fetch_texel_1d_f_rgba8888_rev,
       fetch_texel_2d_f_rgba8888_rev,
       fetch_texel_3d_f_rgba8888_rev
    },
    {
-      MESA_FORMAT_ARGB8888,
+      MESA_FORMAT_B8G8R8A8_UNORM,
       fetch_texel_1d_f_argb8888,
       fetch_texel_2d_f_argb8888,
       fetch_texel_3d_f_argb8888
    },
    {
-      MESA_FORMAT_ARGB8888_REV,
+      MESA_FORMAT_A8R8G8B8_UNORM,
       fetch_texel_1d_f_argb8888_rev,
       fetch_texel_2d_f_argb8888_rev,
       fetch_texel_3d_f_argb8888_rev
    },
    {
-      MESA_FORMAT_RGBX8888,
+      MESA_FORMAT_X8B8G8R8_UNORM,
       fetch_texel_1d_f_rgbx8888,
       fetch_texel_2d_f_rgbx8888,
       fetch_texel_3d_f_rgbx8888
    },
    {
-      MESA_FORMAT_RGBX8888_REV,
+      MESA_FORMAT_R8G8B8X8_UNORM,
       fetch_texel_1d_f_rgbx8888_rev,
       fetch_texel_2d_f_rgbx8888_rev,
       fetch_texel_3d_f_rgbx8888_rev
    },
    {
-      MESA_FORMAT_XRGB8888,
+      MESA_FORMAT_B8G8R8X8_UNORM,
       fetch_texel_1d_f_xrgb8888,
       fetch_texel_2d_f_xrgb8888,
       fetch_texel_3d_f_xrgb8888
    },
    {
-      MESA_FORMAT_XRGB8888_REV,
+      MESA_FORMAT_X8R8G8B8_UNORM,
       fetch_texel_1d_f_xrgb8888_rev,
       fetch_texel_2d_f_xrgb8888_rev,
       fetch_texel_3d_f_xrgb8888_rev
index e2521b50c225c44cb6b259d6d5eb5b9e86d1aa79..c5171ecd1ee33ead532321ce9373c1fb507dfa5a 100644 (file)
@@ -388,7 +388,7 @@ static void FETCH(f_rg_f16)( const struct swrast_texture_image *texImage,
  * Begin Hardware formats
  */
 
-/* MESA_FORMAT_RGBA8888 ******************************************************/
+/* MESA_FORMAT_A8B8G8R8_UNORM ******************************************************/
 
 /* Fetch texel from 1D, 2D or 3D rgba8888 texture, return 4 GLfloats */
 static void FETCH(f_rgba8888)( const struct swrast_texture_image *texImage,
@@ -422,7 +422,7 @@ static void FETCH(f_rgba8888_rev)( const struct swrast_texture_image *texImage,
 
 
 
-/* MESA_FORMAT_ARGB8888 ******************************************************/
+/* MESA_FORMAT_B8G8R8A8_UNORM ******************************************************/
 
 /* Fetch texel from 1D, 2D or 3D argb8888 texture, return 4 GLchans */
 static void FETCH(f_argb8888)( const struct swrast_texture_image *texImage,
@@ -438,7 +438,7 @@ static void FETCH(f_argb8888)( const struct swrast_texture_image *texImage,
 
 
 
-/* MESA_FORMAT_ARGB8888_REV **************************************************/
+/* MESA_FORMAT_A8R8G8B8_UNORM **************************************************/
 
 /* Fetch texel from 1D, 2D or 3D argb8888_rev texture, return 4 GLfloats */
 static void FETCH(f_argb8888_rev)( const struct swrast_texture_image *texImage,
@@ -454,7 +454,7 @@ static void FETCH(f_argb8888_rev)( const struct swrast_texture_image *texImage,
 
 
 
-/* MESA_FORMAT_RGBX8888 ******************************************************/
+/* MESA_FORMAT_X8B8G8R8_UNORM ******************************************************/
 
 /* Fetch texel from 1D, 2D or 3D rgbx8888 texture, return 4 GLfloats */
 static void FETCH(f_rgbx8888)( const struct swrast_texture_image *texImage,
@@ -486,7 +486,7 @@ static void FETCH(f_rgbx8888_rev)( const struct swrast_texture_image *texImage,
 
 
 
-/* MESA_FORMAT_XRGB8888 ******************************************************/
+/* MESA_FORMAT_B8G8R8X8_UNORM ******************************************************/
 
 /* Fetch texel from 1D, 2D or 3D xrgb8888 texture, return 4 GLchans */
 static void FETCH(f_xrgb8888)( const struct swrast_texture_image *texImage,
@@ -502,7 +502,7 @@ static void FETCH(f_xrgb8888)( const struct swrast_texture_image *texImage,
 
 
 
-/* MESA_FORMAT_XRGB8888_REV **************************************************/
+/* MESA_FORMAT_X8R8G8B8_UNORM **************************************************/
 
 /* Fetch texel from 1D, 2D or 3D xrgb8888_rev texture, return 4 GLfloats */
 static void FETCH(f_xrgb8888_rev)( const struct swrast_texture_image *texImage,
index 312b9ce9bf7cdbe64aa3576e49e90ba7fdda6a89..6e87fc910e4741b20d0502df05b03480efefcbe0 100644 (file)
@@ -1473,7 +1473,7 @@ opt_sample_rgba_2d(struct gl_context *ctx,
    ASSERT(samp->WrapS==GL_REPEAT);
    ASSERT(samp->WrapT==GL_REPEAT);
    ASSERT(img->Border==0);
-   ASSERT(img->TexFormat == MESA_FORMAT_RGBA8888);
+   ASSERT(img->TexFormat == MESA_FORMAT_A8B8G8R8_UNORM);
    ASSERT(swImg->_IsPowerOfTwo);
    (void) swImg;
 
@@ -1525,7 +1525,7 @@ sample_lambda_2d(struct gl_context *ctx,
                opt_sample_rgb_2d(ctx, samp, tObj, m, texcoords + minStart,
                                  NULL, rgba + minStart);
                break;
-            case MESA_FORMAT_RGBA8888:
+            case MESA_FORMAT_A8B8G8R8_UNORM:
               opt_sample_rgba_2d(ctx, samp, tObj, m, texcoords + minStart,
                                   NULL, rgba + minStart);
                break;
@@ -1582,7 +1582,7 @@ sample_lambda_2d(struct gl_context *ctx,
                opt_sample_rgb_2d(ctx, samp, tObj, m, texcoords + magStart,
                                  NULL, rgba + magStart);
                break;
-            case MESA_FORMAT_RGBA8888:
+            case MESA_FORMAT_A8B8G8R8_UNORM:
               opt_sample_rgba_2d(ctx, samp, tObj, m, texcoords + magStart,
                                   NULL, rgba + magStart);
                break;
@@ -3762,7 +3762,7 @@ _swrast_choose_texture_sample_func( struct gl_context *ctx,
                 img->Border == 0) {
                if (img->TexFormat == MESA_FORMAT_RGB888)
                   func = &opt_sample_rgb_2d;
-               else if (img->TexFormat == MESA_FORMAT_RGBA8888)
+               else if (img->TexFormat == MESA_FORMAT_A8B8G8R8_UNORM)
                   func = &opt_sample_rgba_2d;
             }
 
index 69c812f97f83cafad253afd34022c3342f7ad4c3..b694bbe61881263180d8b02c4b061957081c560c 100644 (file)
@@ -437,7 +437,7 @@ affine_span(struct gl_context *ctx, SWspan *span,
             return;
          }
          break;
-      case MESA_FORMAT_RGBA8888:
+      case MESA_FORMAT_A8B8G8R8_UNORM:
          switch(info->envmode) {
          case GL_MODULATE:
             SPAN_NEAREST(NEAREST_RGBA;MODULATE,4);
@@ -486,7 +486,7 @@ affine_span(struct gl_context *ctx, SWspan *span,
             return;
          }
          break;
-      case MESA_FORMAT_RGBA8888:
+      case MESA_FORMAT_A8B8G8R8_UNORM:
          switch (info->envmode) {
          case GL_MODULATE:
             SPAN_LINEAR(LINEAR_RGBA;MODULATE,4);
@@ -575,7 +575,7 @@ affine_span(struct gl_context *ctx, SWspan *span,
    case MESA_FORMAT_RGB888:                                            \
       info.tbytesline = texImg->Width * 3;                             \
       break;                                                           \
-   case MESA_FORMAT_RGBA8888:                                          \
+   case MESA_FORMAT_A8B8G8R8_UNORM:                                            \
       info.tbytesline = texImg->Width * 4;                             \
       break;                                                           \
    default:                                                            \
@@ -709,7 +709,7 @@ fast_persp_span(struct gl_context *ctx, SWspan *span,
             return;
          }
          break;
-      case MESA_FORMAT_RGBA8888:
+      case MESA_FORMAT_A8B8G8R8_UNORM:
          switch(info->envmode) {
          case GL_MODULATE:
             SPAN_NEAREST(NEAREST_RGBA;MODULATE,4);
@@ -756,7 +756,7 @@ fast_persp_span(struct gl_context *ctx, SWspan *span,
             return;
          }
          break;
-      case MESA_FORMAT_RGBA8888:
+      case MESA_FORMAT_A8B8G8R8_UNORM:
          switch (info->envmode) {
          case GL_MODULATE:
             SPAN_LINEAR(LINEAR_RGBA;MODULATE,4);
@@ -841,7 +841,7 @@ fast_persp_span(struct gl_context *ctx, SWspan *span,
    case MESA_FORMAT_RGB888:                                            \
       info.tbytesline = texImg->Width * 3;                             \
       break;                                                           \
-   case MESA_FORMAT_RGBA8888:                                          \
+   case MESA_FORMAT_A8B8G8R8_UNORM:                                            \
       info.tbytesline = texImg->Width * 4;                             \
       break;                                                           \
    default:                                                            \
@@ -1080,7 +1080,7 @@ _swrast_choose_triangle( struct gl_context *ctx )
              && texImg->Border == 0
              && (_mesa_format_row_stride(format, texImg->Width) ==
                  swImg->RowStride)
-             && (format == MESA_FORMAT_RGB888 || format == MESA_FORMAT_RGBA8888)
+             && (format == MESA_FORMAT_RGB888 || format == MESA_FORMAT_A8B8G8R8_UNORM)
              && minFilter == magFilter
              && ctx->Light.Model.ColorControl == GL_SINGLE_COLOR
              && !swrast->_FogEnabled
@@ -1107,7 +1107,7 @@ _swrast_choose_triangle( struct gl_context *ctx )
 #if CHAN_BITS != 8
                   USE(general_triangle);
 #else
-                  if (format == MESA_FORMAT_RGBA8888 && !_mesa_little_endian()) {
+                  if (format == MESA_FORMAT_A8B8G8R8_UNORM && !_mesa_little_endian()) {
                      /* We only handle RGBA8888 correctly on little endian
                       * in the optimized code above.
                       */