summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2013-01-24 21:06:50 +0100
committerMarek Olšák <[email protected]>2013-02-06 14:51:31 +0100
commitebe86b80825404cec057fb7e7519864754e9481c (patch)
treed46ea2770e5d0d1276771e04167f932ed5a82c7c /src/mesa/main
parentcf37aef4143d4a0a679830318217251d027bb193 (diff)
mesa: fixup inconsistent naming of RG16 formats
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/format_pack.c16
-rw-r--r--src/mesa/main/format_unpack.c6
-rw-r--r--src/mesa/main/formats.c16
-rw-r--r--src/mesa/main/formats.h4
-rw-r--r--src/mesa/main/texformat.c2
-rw-r--r--src/mesa/main/teximage.c2
-rw-r--r--src/mesa/main/texstore.c10
7 files changed, 28 insertions, 28 deletions
diff --git a/src/mesa/main/format_pack.c b/src/mesa/main/format_pack.c
index 051fb40b90e..330919f55d2 100644
--- a/src/mesa/main/format_pack.c
+++ b/src/mesa/main/format_pack.c
@@ -934,10 +934,10 @@ pack_float_R16(const GLfloat src[4], void *dst)
}
-/* MESA_FORMAT_RG1616 */
+/* MESA_FORMAT_GR1616 */
static void
-pack_ubyte_RG1616(const GLubyte src[4], void *dst)
+pack_ubyte_GR1616(const GLubyte src[4], void *dst)
{
GLuint *d = ((GLuint *) dst);
GLushort r = UBYTE_TO_USHORT(src[RCOMP]);
@@ -946,7 +946,7 @@ pack_ubyte_RG1616(const GLubyte src[4], void *dst)
}
static void
-pack_float_RG1616(const GLfloat src[4], void *dst)
+pack_float_GR1616(const GLfloat src[4], void *dst)
{
GLuint *d = ((GLuint *) dst);
GLushort r, g;
@@ -956,10 +956,10 @@ pack_float_RG1616(const GLfloat src[4], void *dst)
}
-/* MESA_FORMAT_RG1616_REV */
+/* MESA_FORMAT_RG1616 */
static void
-pack_ubyte_RG1616_REV(const GLubyte src[4], void *dst)
+pack_ubyte_RG1616(const GLubyte src[4], void *dst)
{
GLuint *d = ((GLuint *) dst);
GLushort r = UBYTE_TO_USHORT(src[RCOMP]);
@@ -969,7 +969,7 @@ pack_ubyte_RG1616_REV(const GLubyte src[4], void *dst)
static void
-pack_float_RG1616_REV(const GLfloat src[4], void *dst)
+pack_float_RG1616(const GLfloat src[4], void *dst)
{
GLuint *d = ((GLuint *) dst);
GLushort r, g;
@@ -1719,8 +1719,8 @@ _mesa_get_pack_ubyte_rgba_function(gl_format format)
table[MESA_FORMAT_GR88] = pack_ubyte_GR88;
table[MESA_FORMAT_RG88] = pack_ubyte_RG88;
table[MESA_FORMAT_R16] = pack_ubyte_R16;
+ table[MESA_FORMAT_GR1616] = pack_ubyte_GR1616;
table[MESA_FORMAT_RG1616] = pack_ubyte_RG1616;
- table[MESA_FORMAT_RG1616_REV] = pack_ubyte_RG1616_REV;
table[MESA_FORMAT_ARGB2101010] = pack_ubyte_ARGB2101010;
table[MESA_FORMAT_ABGR2101010_UINT] = pack_ubyte_ABGR2101010_UINT;
@@ -1865,8 +1865,8 @@ _mesa_get_pack_float_rgba_function(gl_format format)
table[MESA_FORMAT_GR88] = pack_float_GR88;
table[MESA_FORMAT_RG88] = pack_float_RG88;
table[MESA_FORMAT_R16] = pack_float_R16;
+ table[MESA_FORMAT_GR1616] = pack_float_GR1616;
table[MESA_FORMAT_RG1616] = pack_float_RG1616;
- table[MESA_FORMAT_RG1616_REV] = pack_float_RG1616_REV;
table[MESA_FORMAT_ARGB2101010] = pack_float_ARGB2101010;
table[MESA_FORMAT_ABGR2101010_UINT] = pack_float_ABGR2101010_UINT;
diff --git a/src/mesa/main/format_unpack.c b/src/mesa/main/format_unpack.c
index 92ce86908eb..cccb2b4cb19 100644
--- a/src/mesa/main/format_unpack.c
+++ b/src/mesa/main/format_unpack.c
@@ -570,7 +570,7 @@ unpack_R16(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_RG1616(const void *src, GLfloat dst[][4], GLuint n)
+unpack_GR1616(const void *src, GLfloat dst[][4], GLuint n)
{
const GLuint *s = ((const GLuint *) src);
GLuint i;
@@ -583,7 +583,7 @@ unpack_RG1616(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_RG1616_REV(const void *src, GLfloat dst[][4], GLuint n)
+unpack_RG1616(const void *src, GLfloat dst[][4], GLuint n)
{
const GLuint *s = ((const GLuint *) src);
GLuint i;
@@ -1572,8 +1572,8 @@ get_unpack_rgba_function(gl_format format)
table[MESA_FORMAT_GR88] = unpack_GR88;
table[MESA_FORMAT_RG88] = unpack_RG88;
table[MESA_FORMAT_R16] = unpack_R16;
+ table[MESA_FORMAT_GR1616] = unpack_GR1616;
table[MESA_FORMAT_RG1616] = unpack_RG1616;
- table[MESA_FORMAT_RG1616_REV] = unpack_RG1616_REV;
table[MESA_FORMAT_ARGB2101010] = unpack_ARGB2101010;
table[MESA_FORMAT_ABGR2101010_UINT] = unpack_ABGR2101010_UINT;
table[MESA_FORMAT_Z24_S8] = unpack_Z24_S8;
diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c
index 1c9e63377d4..1f400644436 100644
--- a/src/mesa/main/formats.c
+++ b/src/mesa/main/formats.c
@@ -404,8 +404,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 2
},
{
- MESA_FORMAT_RG1616,
- "MESA_FORMAT_RG1616",
+ MESA_FORMAT_GR1616,
+ "MESA_FORMAT_GR1616",
GL_RG,
GL_UNSIGNED_NORMALIZED,
16, 16, 0, 0,
@@ -413,8 +413,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4
},
{
- MESA_FORMAT_RG1616_REV,
- "MESA_FORMAT_RG1616_REV",
+ MESA_FORMAT_RG1616,
+ "MESA_FORMAT_RG1616",
GL_RG,
GL_UNSIGNED_NORMALIZED,
16, 16, 0, 0,
@@ -1953,7 +1953,7 @@ _mesa_get_uncompressed_format(gl_format format)
return MESA_FORMAT_R16;
case MESA_FORMAT_ETC2_RG11_EAC:
case MESA_FORMAT_ETC2_SIGNED_RG11_EAC:
- return MESA_FORMAT_RG1616;
+ return MESA_FORMAT_GR1616;
default:
#ifdef DEBUG
assert(!_mesa_is_format_compressed(format));
@@ -2234,8 +2234,8 @@ _mesa_format_to_type_and_comps(gl_format format,
case MESA_FORMAT_AL1616:
case MESA_FORMAT_AL1616_REV:
+ case MESA_FORMAT_GR1616:
case MESA_FORMAT_RG1616:
- case MESA_FORMAT_RG1616_REV:
*datatype = GL_UNSIGNED_SHORT;
*comps = 2;
return;
@@ -2839,10 +2839,10 @@ _mesa_format_matches_format_and_type(gl_format gl_format,
case MESA_FORMAT_R16:
return format == GL_RED && type == GL_UNSIGNED_SHORT && littleEndian &&
!swapBytes;
- case MESA_FORMAT_RG1616:
+ case MESA_FORMAT_GR1616:
return format == GL_RG && type == GL_UNSIGNED_SHORT && littleEndian &&
!swapBytes;
- case MESA_FORMAT_RG1616_REV:
+ case MESA_FORMAT_RG1616:
return GL_FALSE;
case MESA_FORMAT_ARGB2101010:
diff --git a/src/mesa/main/formats.h b/src/mesa/main/formats.h
index 050fce96c30..be140a750a0 100644
--- a/src/mesa/main/formats.h
+++ b/src/mesa/main/formats.h
@@ -102,8 +102,8 @@ typedef enum
MESA_FORMAT_GR88, /* GGGG GGGG RRRR RRRR */
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 */
+ MESA_FORMAT_GR1616, /* GGGG GGGG GGGG GGGG RRRR RRRR RRRR RRRR */
+ MESA_FORMAT_RG1616, /* RRRR RRRR RRRR RRRR GGGG GGGG GGGG GGGG */
MESA_FORMAT_ARGB2101010, /* AARR RRRR RRRR GGGG GGGG GGBB BBBB BBBB */
MESA_FORMAT_Z24_S8, /* ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ SSSS SSSS */
MESA_FORMAT_S8_Z24, /* SSSS SSSS ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ */
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c
index 75b1021d44a..6f22a4f5f12 100644
--- a/src/mesa/main/texformat.c
+++ b/src/mesa/main/texformat.c
@@ -812,7 +812,7 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
break;
case GL_RG16:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RG1616);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_GR1616);
break;
default:
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index ff3c92c5ef1..9283ece8a77 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -3917,7 +3917,7 @@ get_texbuffer_format(const struct gl_context *ctx, GLenum internalFormat)
case GL_RG8:
return MESA_FORMAT_GR88;
case GL_RG16:
- return MESA_FORMAT_RG1616;
+ return MESA_FORMAT_GR1616;
case GL_RG16F:
return MESA_FORMAT_RG_FLOAT16;
case GL_RG32F:
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index a5c7712e095..471c41aa875 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -1915,8 +1915,8 @@ _mesa_texstore_unorm1616(TEXSTORE_PARAMS)
ASSERT(dstFormat == MESA_FORMAT_AL1616 ||
dstFormat == MESA_FORMAT_AL1616_REV ||
- dstFormat == MESA_FORMAT_RG1616 ||
- dstFormat == MESA_FORMAT_RG1616_REV);
+ dstFormat == MESA_FORMAT_GR1616 ||
+ dstFormat == MESA_FORMAT_RG1616);
ASSERT(_mesa_get_format_bytes(dstFormat) == 4);
if (!ctx->_ImageTransferState &&
@@ -1924,7 +1924,7 @@ _mesa_texstore_unorm1616(TEXSTORE_PARAMS)
((dstFormat == MESA_FORMAT_AL1616 &&
baseInternalFormat == GL_LUMINANCE_ALPHA &&
srcFormat == GL_LUMINANCE_ALPHA) ||
- (dstFormat == MESA_FORMAT_RG1616 &&
+ (dstFormat == MESA_FORMAT_GR1616 &&
baseInternalFormat == srcFormat)) &&
srcType == GL_UNSIGNED_SHORT &&
littleEndian) {
@@ -1953,7 +1953,7 @@ _mesa_texstore_unorm1616(TEXSTORE_PARAMS)
for (row = 0; row < srcHeight; row++) {
GLuint *dstUI = (GLuint *) dstRow;
if (dstFormat == MESA_FORMAT_AL1616 ||
- dstFormat == MESA_FORMAT_RG1616) {
+ dstFormat == MESA_FORMAT_GR1616) {
for (col = 0; col < srcWidth; col++) {
GLushort l, a;
@@ -4051,8 +4051,8 @@ _mesa_get_texstore_func(gl_format format)
table[MESA_FORMAT_GR88] = _mesa_texstore_unorm88;
table[MESA_FORMAT_RG88] = _mesa_texstore_unorm88;
table[MESA_FORMAT_R16] = _mesa_texstore_unorm16;
+ table[MESA_FORMAT_GR1616] = _mesa_texstore_unorm1616;
table[MESA_FORMAT_RG1616] = _mesa_texstore_unorm1616;
- table[MESA_FORMAT_RG1616_REV] = _mesa_texstore_unorm1616;
table[MESA_FORMAT_ARGB2101010] = _mesa_texstore_argb2101010;
table[MESA_FORMAT_Z24_S8] = _mesa_texstore_z24_s8;
table[MESA_FORMAT_S8_Z24] = _mesa_texstore_s8_z24;