summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/debug.c4
-rw-r--r--src/mesa/main/format_pack.c76
-rw-r--r--src/mesa/main/format_unpack.c36
-rw-r--r--src/mesa/main/formats.c80
-rw-r--r--src/mesa/main/formats.h20
-rw-r--r--src/mesa/main/framebuffer.c2
-rw-r--r--src/mesa/main/readpix.c4
-rw-r--r--src/mesa/main/shaderimage.c4
-rw-r--r--src/mesa/main/texformat.c36
-rw-r--r--src/mesa/main/teximage.c2
-rw-r--r--src/mesa/main/texstore.c72
11 files changed, 168 insertions, 168 deletions
diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c
index 99b21478990..0b703134749 100644
--- a/src/mesa/main/debug.c
+++ b/src/mesa/main/debug.c
@@ -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:
diff --git a/src/mesa/main/format_pack.c b/src/mesa/main/format_pack.c
index bb784828830..dfe4a06bd77 100644
--- a/src/mesa/main/format_pack.c
+++ b/src/mesa/main/format_pack.c
@@ -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;
diff --git a/src/mesa/main/format_unpack.c b/src/mesa/main/format_unpack.c
index 96c71107def..be5ef9e28c4 100644
--- a/src/mesa/main/format_unpack.c
+++ b/src/mesa/main/format_unpack.c
@@ -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;
diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c
index 81f92261916..a1e573051f1 100644
--- a/src/mesa/main/formats.c
+++ b/src/mesa/main/formats.c
@@ -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:
diff --git a/src/mesa/main/formats.h b/src/mesa/main/formats.h
index 68f15be1471..1e8ffb451b3 100644
--- a/src/mesa/main/formats.h
+++ b/src/mesa/main/formats.h
@@ -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 */
diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
index 47369973735..b5fc4ee0d8a 100644
--- a/src/mesa/main/framebuffer.c
+++ b/src/mesa/main/framebuffer.c
@@ -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;
diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c
index 63cf0202bbd..fcf849b9808 100644
--- a/src/mesa/main/readpix.c
+++ b/src/mesa/main/readpix.c
@@ -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) {
diff --git a/src/mesa/main/shaderimage.c b/src/mesa/main/shaderimage.c
index cfb5ad47754..3468672d8eb 100644
--- a/src/mesa/main/shaderimage.c
+++ b/src/mesa/main/shaderimage.c
@@ -42,14 +42,14 @@
* 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
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c
index 0a993ede89b..93a6b6d742a 100644
--- a/src/mesa/main/texformat.c
+++ b/src/mesa/main/texformat.c
@@ -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;
}
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index c3c66bcbd36..023aef4e6eb 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -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:
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index 42f86b77dba..258b66e829d 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -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;