summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2011-11-30 20:35:02 -0700
committerBrian Paul <brianp@vmware.com>2011-12-02 07:22:39 -0700
commit0a3c895f341ae458b09dcdc9cbd674600366a925 (patch)
tree10bc6be40cbc50f70af760d78e65f92a502996ee
parent0be753a14333b1298649da1d889fe1fc7d3e9f43 (diff)
mesa: rename MESA_FORMAT_RG88 to MESA_FORMAT_GR88
To better reflect the component ordering and be consistent with other format names.
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_surface_state.c2
-rw-r--r--src/mesa/drivers/dri/intel/intel_span.c2
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_format.c2
-rw-r--r--src/mesa/main/format_unpack.c4
-rw-r--r--src/mesa/main/formats.c10
-rw-r--r--src/mesa/main/formats.h2
-rw-r--r--src/mesa/main/renderbuffer.c4
-rw-r--r--src/mesa/main/texformat.c4
-rw-r--r--src/mesa/main/texstore.c10
-rw-r--r--src/mesa/state_tracker/st_format.c4
-rw-r--r--src/mesa/swrast/s_texfetch.c10
-rw-r--r--src/mesa/swrast/s_texfetch_tmp.h6
12 files changed, 30 insertions, 30 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
index 0f6abe2e54..378e083fdd 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -315,7 +315,7 @@ brw_format_for_mesa_format(gl_format mesa_format)
[MESA_FORMAT_YCBCR_REV] = BRW_SURFACEFORMAT_YCRCB_NORMAL,
[MESA_FORMAT_YCBCR] = BRW_SURFACEFORMAT_YCRCB_SWAPUVY,
[MESA_FORMAT_R8] = BRW_SURFACEFORMAT_R8_UNORM,
- [MESA_FORMAT_RG88] = BRW_SURFACEFORMAT_R8G8_UNORM,
+ [MESA_FORMAT_GR88] = BRW_SURFACEFORMAT_R8G8_UNORM,
[MESA_FORMAT_RG88_REV] = 0,
[MESA_FORMAT_R16] = BRW_SURFACEFORMAT_R16_UNORM,
[MESA_FORMAT_RG1616] = BRW_SURFACEFORMAT_R16G16_UNORM,
diff --git a/src/mesa/drivers/dri/intel/intel_span.c b/src/mesa/drivers/dri/intel/intel_span.c
index 042bc30da7..d203617488 100644
--- a/src/mesa/drivers/dri/intel/intel_span.c
+++ b/src/mesa/drivers/dri/intel/intel_span.c
@@ -420,7 +420,7 @@ static span_init_func intel_span_init_funcs[MESA_FORMAT_COUNT] =
[MESA_FORMAT_S8_Z24] = _mesa_set_renderbuffer_accessors,
[MESA_FORMAT_S8] = _mesa_set_renderbuffer_accessors,
[MESA_FORMAT_R8] = _mesa_set_renderbuffer_accessors,
- [MESA_FORMAT_RG88] = _mesa_set_renderbuffer_accessors,
+ [MESA_FORMAT_GR88] = _mesa_set_renderbuffer_accessors,
[MESA_FORMAT_R16] = _mesa_set_renderbuffer_accessors,
[MESA_FORMAT_RG1616] = _mesa_set_renderbuffer_accessors,
[MESA_FORMAT_RGBA_FLOAT32] = _mesa_set_renderbuffer_accessors,
diff --git a/src/mesa/drivers/dri/intel/intel_tex_format.c b/src/mesa/drivers/dri/intel/intel_tex_format.c
index a9f4981ab7..898846fd23 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_format.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_format.c
@@ -14,7 +14,7 @@ intel_mesa_format_to_rb_datatype(gl_format format)
case MESA_FORMAT_XRGB8888:
case MESA_FORMAT_SARGB8:
case MESA_FORMAT_R8:
- case MESA_FORMAT_RG88:
+ case MESA_FORMAT_GR88:
case MESA_FORMAT_A8:
case MESA_FORMAT_I8:
case MESA_FORMAT_L8:
diff --git a/src/mesa/main/format_unpack.c b/src/mesa/main/format_unpack.c
index 079f71b13e..47bc06fc6a 100644
--- a/src/mesa/main/format_unpack.c
+++ b/src/mesa/main/format_unpack.c
@@ -504,7 +504,7 @@ unpack_R8(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_RG88(const void *src, GLfloat dst[][4], GLuint n)
+unpack_GR88(const void *src, GLfloat dst[][4], GLuint n)
{
const GLushort *s = ((const GLushort *) src);
GLuint i;
@@ -1466,7 +1466,7 @@ get_unpack_rgba_function(gl_format format)
table[MESA_FORMAT_YCBCR] = unpack_YCBCR;
table[MESA_FORMAT_YCBCR_REV] = unpack_YCBCR_REV;
table[MESA_FORMAT_R8] = unpack_R8;
- table[MESA_FORMAT_RG88] = unpack_RG88;
+ table[MESA_FORMAT_GR88] = unpack_GR88;
table[MESA_FORMAT_RG88_REV] = unpack_RG88_REV;
table[MESA_FORMAT_R16] = unpack_R16;
table[MESA_FORMAT_RG1616] = unpack_RG1616;
diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c
index 4b163d1628..0d4af7c169 100644
--- a/src/mesa/main/formats.c
+++ b/src/mesa/main/formats.c
@@ -375,8 +375,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 1
},
{
- MESA_FORMAT_RG88,
- "MESA_FORMAT_RG88",
+ MESA_FORMAT_GR88,
+ "MESA_FORMAT_GR88",
GL_RG,
GL_UNSIGNED_NORMALIZED,
8, 8, 0, 0,
@@ -1789,7 +1789,7 @@ _mesa_get_uncompressed_format(gl_format format)
case MESA_FORMAT_SIGNED_RED_RGTC1:
return MESA_FORMAT_SIGNED_R8;
case MESA_FORMAT_RG_RGTC2:
- return MESA_FORMAT_RG88;
+ return MESA_FORMAT_GR88;
case MESA_FORMAT_SIGNED_RG_RGTC2:
return MESA_FORMAT_SIGNED_RG88_REV;
case MESA_FORMAT_L_LATC1:
@@ -2076,7 +2076,7 @@ _mesa_format_to_type_and_comps(gl_format format,
case MESA_FORMAT_AL88:
case MESA_FORMAT_AL88_REV:
- case MESA_FORMAT_RG88:
+ case MESA_FORMAT_GR88:
case MESA_FORMAT_RG88_REV:
*datatype = GL_UNSIGNED_BYTE;
*comps = 2;
@@ -2611,7 +2611,7 @@ _mesa_format_matches_format_and_type(gl_format gl_format,
case MESA_FORMAT_R8:
return format == GL_RED && type == GL_UNSIGNED_BYTE;
- case MESA_FORMAT_RG88:
+ case MESA_FORMAT_GR88:
return format == GL_RG && type == GL_UNSIGNED_BYTE && littleEndian;
case MESA_FORMAT_RG88_REV:
return GL_FALSE;
diff --git a/src/mesa/main/formats.h b/src/mesa/main/formats.h
index fc2bb9ac5d..2744d1e43f 100644
--- a/src/mesa/main/formats.h
+++ b/src/mesa/main/formats.h
@@ -91,7 +91,7 @@ typedef enum
MESA_FORMAT_YCBCR, /* YYYY YYYY UorV UorV */
MESA_FORMAT_YCBCR_REV, /* UorV UorV YYYY YYYY */
MESA_FORMAT_R8, /* RRRR RRRR */
- MESA_FORMAT_RG88, /* GGGG GGGG RRRR RRRR */
+ MESA_FORMAT_GR88, /* GGGG GGGG RRRR RRRR */
MESA_FORMAT_RG88_REV, /* RRRR RRRR GGGG GGGG */
MESA_FORMAT_R16, /* RRRR RRRR RRRR RRRR */
MESA_FORMAT_RG1616, /* GGGG GGGG GGGG GGGG RRRR RRRR RRRR RRRR */
diff --git a/src/mesa/main/renderbuffer.c b/src/mesa/main/renderbuffer.c
index c9a16a9892..24060e695d 100644
--- a/src/mesa/main/renderbuffer.c
+++ b/src/mesa/main/renderbuffer.c
@@ -1015,7 +1015,7 @@ get_values_r8(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
}
/**********************************************************************
- * Functions for MESA_FORMAT_RG88.
+ * Functions for MESA_FORMAT_GR88.
*/
static void
get_row_rg88(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
@@ -1422,7 +1422,7 @@ _mesa_set_renderbuffer_accessors(struct gl_renderbuffer *rb)
rb->PutMonoValues = put_mono_values_generic;
break;
- case MESA_FORMAT_RG88:
+ case MESA_FORMAT_GR88:
rb->DataType = GL_UNSIGNED_BYTE;
rb->GetValues = get_values_rg88;
rb->GetRow = get_row_rg88;
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c
index 868913873e..c776b41609 100644
--- a/src/mesa/main/texformat.c
+++ b/src/mesa/main/texformat.c
@@ -763,12 +763,12 @@ _mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat,
case GL_RG:
case GL_RG8:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RG88);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_GR88);
break;
case GL_COMPRESSED_RG:
RETURN_IF_SUPPORTED(MESA_FORMAT_RG_RGTC2);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RG88);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_GR88);
break;
case GL_RG16:
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index 1e1c749679..5f62cf864b 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -2142,7 +2142,7 @@ _mesa_texstore_unorm88(TEXSTORE_PARAMS)
ASSERT(dstFormat == MESA_FORMAT_AL88 ||
dstFormat == MESA_FORMAT_AL88_REV ||
- dstFormat == MESA_FORMAT_RG88 ||
+ dstFormat == MESA_FORMAT_GR88 ||
dstFormat == MESA_FORMAT_RG88_REV);
ASSERT(texelBytes == 2);
@@ -2151,7 +2151,7 @@ _mesa_texstore_unorm88(TEXSTORE_PARAMS)
((dstFormat == MESA_FORMAT_AL88 &&
baseInternalFormat == GL_LUMINANCE_ALPHA &&
srcFormat == GL_LUMINANCE_ALPHA) ||
- (dstFormat == MESA_FORMAT_RG88 &&
+ (dstFormat == MESA_FORMAT_GR88 &&
baseInternalFormat == srcFormat)) &&
srcType == GL_UNSIGNED_BYTE &&
littleEndian) {
@@ -2183,7 +2183,7 @@ _mesa_texstore_unorm88(TEXSTORE_PARAMS)
}
}
else {
- if ((littleEndian && dstFormat == MESA_FORMAT_RG88) ||
+ if ((littleEndian && dstFormat == MESA_FORMAT_GR88) ||
(!littleEndian && dstFormat == MESA_FORMAT_RG88_REV)) {
dstmap[0] = 0;
dstmap[1] = 1;
@@ -2225,7 +2225,7 @@ _mesa_texstore_unorm88(TEXSTORE_PARAMS)
for (row = 0; row < srcHeight; row++) {
GLushort *dstUS = (GLushort *) dstRow;
if (dstFormat == MESA_FORMAT_AL88 ||
- dstFormat == MESA_FORMAT_RG88) {
+ dstFormat == MESA_FORMAT_GR88) {
for (col = 0; col < srcWidth; col++) {
/* src[0] is luminance (or R), src[1] is alpha (or G) */
dstUS[col] = PACK_COLOR_88( src[1],
@@ -4375,7 +4375,7 @@ _mesa_get_texstore_func(gl_format format)
table[MESA_FORMAT_YCBCR] = _mesa_texstore_ycbcr;
table[MESA_FORMAT_YCBCR_REV] = _mesa_texstore_ycbcr;
table[MESA_FORMAT_R8] = _mesa_texstore_unorm8;
- table[MESA_FORMAT_RG88] = _mesa_texstore_unorm88;
+ table[MESA_FORMAT_GR88] = _mesa_texstore_unorm88;
table[MESA_FORMAT_RG88_REV] = _mesa_texstore_unorm88;
table[MESA_FORMAT_R16] = _mesa_texstore_unorm16;
table[MESA_FORMAT_RG1616] = _mesa_texstore_unorm1616;
diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c
index 4b34acfc4f..5f9ae91298 100644
--- a/src/mesa/state_tracker/st_format.c
+++ b/src/mesa/state_tracker/st_format.c
@@ -287,7 +287,7 @@ st_mesa_format_to_pipe_format(gl_format mesaFormat)
return PIPE_FORMAT_R8_UNORM;
case MESA_FORMAT_R16:
return PIPE_FORMAT_R16_UNORM;
- case MESA_FORMAT_RG88:
+ case MESA_FORMAT_GR88:
return PIPE_FORMAT_R8G8_UNORM;
case MESA_FORMAT_RG1616:
return PIPE_FORMAT_R16G16_UNORM;
@@ -619,7 +619,7 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
case PIPE_FORMAT_R16_UNORM:
return MESA_FORMAT_R16;
case PIPE_FORMAT_R8G8_UNORM:
- return MESA_FORMAT_RG88;
+ return MESA_FORMAT_GR88;
case PIPE_FORMAT_R16G16_UNORM:
return MESA_FORMAT_RG1616;
diff --git a/src/mesa/swrast/s_texfetch.c b/src/mesa/swrast/s_texfetch.c
index 158752d736..6a80a4fd52 100644
--- a/src/mesa/swrast/s_texfetch.c
+++ b/src/mesa/swrast/s_texfetch.c
@@ -362,11 +362,11 @@ texfetch_funcs[MESA_FORMAT_COUNT] =
store_texel_r8,
},
{
- MESA_FORMAT_RG88,
- fetch_texel_1d_f_rg88,
- fetch_texel_2d_f_rg88,
- fetch_texel_3d_f_rg88,
- store_texel_rg88,
+ MESA_FORMAT_GR88,
+ fetch_texel_1d_f_gr88,
+ fetch_texel_2d_f_gr88,
+ fetch_texel_3d_f_gr88,
+ store_texel_gr88,
},
{
MESA_FORMAT_RG88_REV,
diff --git a/src/mesa/swrast/s_texfetch_tmp.h b/src/mesa/swrast/s_texfetch_tmp.h
index 88711b03e4..5a7c650880 100644
--- a/src/mesa/swrast/s_texfetch_tmp.h
+++ b/src/mesa/swrast/s_texfetch_tmp.h
@@ -1007,10 +1007,10 @@ static void store_texel_argb2101010(struct swrast_texture_image *texImage,
#endif
-/* MESA_FORMAT_RG88 **********************************************************/
+/* MESA_FORMAT_GR88 **********************************************************/
/* Fetch texel from 1D, 2D or 3D rg88 texture, return 4 GLchans */
-static void FETCH(f_rg88)( const struct swrast_texture_image *texImage,
+static void FETCH(f_gr88)( 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);
@@ -1021,7 +1021,7 @@ static void FETCH(f_rg88)( const struct swrast_texture_image *texImage,
}
#if DIM == 3
-static void store_texel_rg88(struct swrast_texture_image *texImage,
+static void store_texel_gr88(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLchan *rgba = (const GLchan *) texel;