mesa: rename MESA_FORMAT_RG88_REV to MESA_FORMAT_RG88
authorBrian Paul <brianp@vmware.com>
Thu, 1 Dec 2011 03:35:02 +0000 (20:35 -0700)
committerBrian Paul <brianp@vmware.com>
Fri, 2 Dec 2011 14:22:39 +0000 (07:22 -0700)
R is in the high byte, G in the low byte.

src/mesa/drivers/dri/i965/brw_wm_surface_state.c
src/mesa/main/format_unpack.c
src/mesa/main/formats.c
src/mesa/main/formats.h
src/mesa/main/texstore.c
src/mesa/swrast/s_texfetch.c
src/mesa/swrast/s_texfetch_tmp.h

index 378e083fdd15089aa310010f8c33d92e479c3ae8..f9b0b714a80d57639e65e1f6bb4cc7eed31c3d79 100644 (file)
@@ -316,7 +316,7 @@ brw_format_for_mesa_format(gl_format mesa_format)
       [MESA_FORMAT_YCBCR] = BRW_SURFACEFORMAT_YCRCB_SWAPUVY,
       [MESA_FORMAT_R8] = BRW_SURFACEFORMAT_R8_UNORM,
       [MESA_FORMAT_GR88] = BRW_SURFACEFORMAT_R8G8_UNORM,
-      [MESA_FORMAT_RG88_REV] = 0,
+      [MESA_FORMAT_RG88] = 0,
       [MESA_FORMAT_R16] = BRW_SURFACEFORMAT_R16_UNORM,
       [MESA_FORMAT_RG1616] = BRW_SURFACEFORMAT_R16G16_UNORM,
       [MESA_FORMAT_RG1616_REV] = 0,
index 47bc06fc6a2eb93fdd4cfa496621fe519cc4f94d..565a8d05989afab6099d345bf4c8ad37303b4f2b 100644 (file)
@@ -517,7 +517,7 @@ unpack_GR88(const void *src, GLfloat dst[][4], GLuint n)
 }
 
 static void
-unpack_RG88_REV(const void *src, GLfloat dst[][4], GLuint n)
+unpack_RG88(const void *src, GLfloat dst[][4], GLuint n)
 {
    const GLushort *s = ((const GLushort *) src);
    GLuint i;
@@ -1467,7 +1467,7 @@ get_unpack_rgba_function(gl_format format)
       table[MESA_FORMAT_YCBCR_REV] = unpack_YCBCR_REV;
       table[MESA_FORMAT_R8] = unpack_R8;
       table[MESA_FORMAT_GR88] = unpack_GR88;
-      table[MESA_FORMAT_RG88_REV] = unpack_RG88_REV;
+      table[MESA_FORMAT_RG88] = unpack_RG88;
       table[MESA_FORMAT_R16] = unpack_R16;
       table[MESA_FORMAT_RG1616] = unpack_RG1616;
       table[MESA_FORMAT_RG1616_REV] = unpack_RG1616_REV;
index 0d4af7c169c41138b86de82f63062744730a96b9..595da773ba5848fe07807477fc062b8072731795 100644 (file)
@@ -384,8 +384,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
       1, 1, 2
    },
    {
-      MESA_FORMAT_RG88_REV,
-      "MESA_FORMAT_RG88_REV",
+      MESA_FORMAT_RG88,
+      "MESA_FORMAT_RG88",
       GL_RG,
       GL_UNSIGNED_NORMALIZED,
       8, 8, 0, 0,
@@ -2077,7 +2077,7 @@ _mesa_format_to_type_and_comps(gl_format format,
    case MESA_FORMAT_AL88:
    case MESA_FORMAT_AL88_REV:
    case MESA_FORMAT_GR88:
-   case MESA_FORMAT_RG88_REV:
+   case MESA_FORMAT_RG88:
       *datatype = GL_UNSIGNED_BYTE;
       *comps = 2;
       return;
@@ -2613,7 +2613,7 @@ _mesa_format_matches_format_and_type(gl_format gl_format,
       return format == GL_RED && type == GL_UNSIGNED_BYTE;
    case MESA_FORMAT_GR88:
       return format == GL_RG && type == GL_UNSIGNED_BYTE && littleEndian;
-   case MESA_FORMAT_RG88_REV:
+   case MESA_FORMAT_RG88:
       return GL_FALSE;
 
    case MESA_FORMAT_R16:
index 2744d1e43fcae83e9673ea14b74c73130976f276..3960f028e4aecc5bd9d3bcc799b7cd37005c02bc 100644 (file)
@@ -92,7 +92,7 @@ typedef enum
    MESA_FORMAT_YCBCR_REV,      /*                     UorV UorV YYYY YYYY */
    MESA_FORMAT_R8,             /*                               RRRR RRRR */
    MESA_FORMAT_GR88,           /*                     GGGG GGGG RRRR RRRR */
-   MESA_FORMAT_RG88_REV,       /*                     RRRR RRRR GGGG GGGG */
+   MESA_FORMAT_RG88,           /*                     RRRR RRRR GGGG GGGG */
    MESA_FORMAT_R16,            /*                     RRRR RRRR RRRR RRRR */
    MESA_FORMAT_RG1616,         /* GGGG GGGG GGGG GGGG RRRR RRRR RRRR RRRR */
    MESA_FORMAT_RG1616_REV,     /* RRRR RRRR RRRR RRRR GGGG GGGG GGGG GGGG */
index 5f62cf864beb41c73b60f37887e5ac8e6c74328c..a2a49ce0c718e68e310243e7ec0221264a87e517 100644 (file)
@@ -2143,7 +2143,7 @@ _mesa_texstore_unorm88(TEXSTORE_PARAMS)
    ASSERT(dstFormat == MESA_FORMAT_AL88 ||
           dstFormat == MESA_FORMAT_AL88_REV ||
           dstFormat == MESA_FORMAT_GR88 ||
-          dstFormat == MESA_FORMAT_RG88_REV);
+          dstFormat == MESA_FORMAT_RG88);
    ASSERT(texelBytes == 2);
 
    if (!ctx->_ImageTransferState &&
@@ -2184,7 +2184,7 @@ _mesa_texstore_unorm88(TEXSTORE_PARAMS)
       }
       else {
         if ((littleEndian && dstFormat == MESA_FORMAT_GR88) ||
-            (!littleEndian && dstFormat == MESA_FORMAT_RG88_REV)) {
+            (!littleEndian && dstFormat == MESA_FORMAT_RG88)) {
            dstmap[0] = 0;
            dstmap[1] = 1;
         }
@@ -4376,7 +4376,7 @@ _mesa_get_texstore_func(gl_format format)
       table[MESA_FORMAT_YCBCR_REV] = _mesa_texstore_ycbcr;
       table[MESA_FORMAT_R8] = _mesa_texstore_unorm8;
       table[MESA_FORMAT_GR88] = _mesa_texstore_unorm88;
-      table[MESA_FORMAT_RG88_REV] = _mesa_texstore_unorm88;
+      table[MESA_FORMAT_RG88] = _mesa_texstore_unorm88;
       table[MESA_FORMAT_R16] = _mesa_texstore_unorm16;
       table[MESA_FORMAT_RG1616] = _mesa_texstore_unorm1616;
       table[MESA_FORMAT_RG1616_REV] = _mesa_texstore_unorm1616;
index 6a80a4fd522495aa90553c35d5a9dda3024287c1..7cb6e68b1c790c12c4484b945fb732b388d954d8 100644 (file)
@@ -369,11 +369,11 @@ texfetch_funcs[MESA_FORMAT_COUNT] =
       store_texel_gr88,
    },
    {
-      MESA_FORMAT_RG88_REV,
-      fetch_texel_1d_f_rg88_rev,
-      fetch_texel_2d_f_rg88_rev,
-      fetch_texel_3d_f_rg88_rev,
-      store_texel_rg88_rev,
+      MESA_FORMAT_RG88,
+      fetch_texel_1d_f_rg88,
+      fetch_texel_2d_f_rg88,
+      fetch_texel_3d_f_rg88,
+      store_texel_rg88,
    },
    {
       MESA_FORMAT_R16,
index 5a7c65088049539eeed56459f021a293b7a8c4de..e9512b561a9ef8237642e60ecb2216d372bbeaec 100644 (file)
@@ -1033,10 +1033,10 @@ static void store_texel_gr88(struct swrast_texture_image *texImage,
 #endif
 
 
-/* MESA_FORMAT_RG88_REV ******************************************************/
+/* MESA_FORMAT_RG88 ******************************************************/
 
 /* Fetch texel from 1D, 2D or 3D rg88_rev texture, return 4 GLchans */
-static void FETCH(f_rg88_rev)( const struct swrast_texture_image *texImage,
+static void FETCH(f_rg88)( const struct swrast_texture_image *texImage,
                            GLint i, GLint j, GLint k, GLfloat *texel )
 {
    const GLushort s = *TEXEL_ADDR(GLushort, texImage, i, j, k, 1);
@@ -1047,7 +1047,7 @@ static void FETCH(f_rg88_rev)( const struct swrast_texture_image *texImage,
 }
 
 #if DIM == 3
-static void store_texel_rg88_rev(struct swrast_texture_image *texImage,
+static void store_texel_rg88(struct swrast_texture_image *texImage,
                              GLint i, GLint j, GLint k, const void *texel)
 {
    const GLubyte *rgba = (const GLubyte *) texel;