summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorMark Mueller <[email protected]>2014-01-26 15:12:56 -0800
committerMark Mueller <[email protected]>2014-01-27 14:31:55 -0800
commiteeed49f5f290793870c60b5b635b977a732a1eb4 (patch)
tree731287bc0b7a0d77e589c64d4a8276baff7ac5ad /src/mesa/main
parent50a01d2acafb2a937e62b24258e2e777c0cd1489 (diff)
mesa: Change many Type P MESA_FORMATs to meet naming spec
Conversion of Type P formats as follows (w/related comment fixes): s/MESA_FORMAT_RGB565\b/MESA_FORMAT_B5G6R5_UNORM/g s/MESA_FORMAT_RGB565_REV\b/MESA_FORMAT_R5G6B5_UNORM/g s/MESA_FORMAT_ARGB4444\b/MESA_FORMAT_B4G4R4A4_UNORM/g s/MESA_FORMAT_ARGB4444_REV\b/MESA_FORMAT_A4R4G4B4_UNORM/g s/MESA_FORMAT_RGBA5551\b/MESA_FORMAT_A1B5G5R5_UNORM/g s/MESA_FORMAT_XBGR8888_SNORM\b/MESA_FORMAT_R8G8B8X8_SNORM/g s/MESA_FORMAT_XBGR8888_SRGB\b/MESA_FORMAT_R8G8B8X8_SRGB/g s/MESA_FORMAT_ARGB1555\b/MESA_FORMAT_B5G5R5A1_UNORM/g s/MESA_FORMAT_ARGB1555_REV\b/MESA_FORMAT_A1R5G5B5_UNORM/g s/MESA_FORMAT_AL44\b/MESA_FORMAT_L4A4_UNORM/g s/MESA_FORMAT_RGB332\b/MESA_FORMAT_B2G3R3_UNORM/g s/MESA_FORMAT_ARGB2101010\b/MESA_FORMAT_B10G10R10A2_UNORM/g s/MESA_FORMAT_Z24_S8\b/MESA_FORMAT_S8_UINT_Z24_UNORM/g s/MESA_FORMAT_S8_Z24\b/MESA_FORMAT_Z24_UNORM_S8_UINT/g s/MESA_FORMAT_X8_Z24\b/MESA_FORMAT_Z24_UNORM_X8_UINT/g s/MESA_FORMAT_Z24_X8\b/MESA_FORMAT_X8Z24_UNORM/g s/MESA_FORMAT_RGB9_E5_FLOAT\b/MESA_FORMAT_R9G9B9E5_FLOAT/g s/MESA_FORMAT_R11_G11_B10_FLOAT\b/MESA_FORMAT_R11G11B10_FLOAT/g s/MESA_FORMAT_Z32_FLOAT_X24S8\b/MESA_FORMAT_Z32_FLOAT_S8X24_UINT/g s/MESA_FORMAT_ABGR2101010_UINT\b/MESA_FORMAT_R10G10B10A2_UINT/g s/MESA_FORMAT_XRGB4444_UNORM\b/MESA_FORMAT_B4G4R4X4_UNORM/g s/MESA_FORMAT_XRGB1555_UNORM\b/MESA_FORMAT_B5G5R5X1_UNORM/g s/MESA_FORMAT_XRGB2101010_UNORM\b/MESA_FORMAT_B10G10R10X2_UNORM/g s/MESA_FORMAT_AL88\b/MESA_FORMAT_L8A8_UNORM/g s/MESA_FORMAT_AL88_REV\b/MESA_FORMAT_A8L8_UNORM/g s/MESA_FORMAT_AL1616\b/MESA_FORMAT_L16A16_UNORM/g s/MESA_FORMAT_AL1616_REV\b/MESA_FORMAT_A16L16_UNORM/g s/MESA_FORMAT_RG88\b/MESA_FORMAT_G8R8_UNORM/g s/MESA_FORMAT_GR88\b/MESA_FORMAT_R8G8_UNORM/g s/MESA_FORMAT_GR1616\b/MESA_FORMAT_R16G16_UNORM/g s/MESA_FORMAT_RG1616\b/MESA_FORMAT_G16R16_UNORM/g s/MESA_FORMAT_SRGBA8\b/MESA_FORMAT_A8B8G8R8_SRGB/g s/MESA_FORMAT_SARGB8\b/MESA_FORMAT_B8G8R8A8_SRGB/g s/MESA_FORMAT_SLA8\b/MESA_FORMAT_L8A8_SRGB/g Conflicts: src/mesa/drivers/dri/i965/brw_surface_formats.c src/mesa/main/format_pack.c src/mesa/main/format_unpack.c src/mesa/main/formats.c src/mesa/main/texformat.c src/mesa/main/texstore.c
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/debug.c4
-rw-r--r--src/mesa/main/fbobject.c6
-rw-r--r--src/mesa/main/format_pack.c267
-rw-r--r--src/mesa/main/format_unpack.c138
-rw-r--r--src/mesa/main/formats.c314
-rw-r--r--src/mesa/main/formats.h82
-rw-r--r--src/mesa/main/framebuffer.c4
-rw-r--r--src/mesa/main/readpix.c4
-rw-r--r--src/mesa/main/shaderimage.c20
-rw-r--r--src/mesa/main/texcompress_etc.c6
-rw-r--r--src/mesa/main/texformat.c102
-rw-r--r--src/mesa/main/teximage.c8
-rw-r--r--src/mesa/main/texparam.c2
-rw-r--r--src/mesa/main/texstore.c156
14 files changed, 556 insertions, 557 deletions
diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c
index 3a483e46d1f..a5b40b4b560 100644
--- a/src/mesa/main/debug.c
+++ b/src/mesa/main/debug.c
@@ -620,8 +620,8 @@ _mesa_print_texture(struct gl_context *ctx, struct gl_texture_image *img)
case MESA_FORMAT_I_UNORM8:
c = 1;
break;
- case MESA_FORMAT_AL88:
- case MESA_FORMAT_AL88_REV:
+ case MESA_FORMAT_L8A8_UNORM:
+ case MESA_FORMAT_A8L8_UNORM:
c = 2;
break;
case MESA_FORMAT_BGR_UNORM8:
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 90ea870ca84..f63ed8cd3db 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -538,7 +538,7 @@ _mesa_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb)
default:
switch (rb->Format) {
/* XXX This list is likely incomplete. */
- case MESA_FORMAT_RGB9_E5_FLOAT:
+ case MESA_FORMAT_R9G9B9E5_FLOAT:
fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED;
return;
default:;
@@ -668,7 +668,7 @@ is_format_color_renderable(const struct gl_context *ctx, mesa_format format, GLe
break;
}
- if (format == MESA_FORMAT_ARGB2101010 && internalFormat != GL_RGB10_A2) {
+ if (format == MESA_FORMAT_B10G10R10A2_UNORM && internalFormat != GL_RGB10_A2) {
return GL_FALSE;
}
@@ -2903,7 +2903,7 @@ _mesa_GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment,
/* special cases */
*params = GL_INDEX;
}
- else if (format == MESA_FORMAT_Z32_FLOAT_X24S8) {
+ else if (format == MESA_FORMAT_Z32_FLOAT_S8X24_UINT) {
/* depends on the attachment parameter */
if (attachment == GL_STENCIL_ATTACHMENT) {
*params = GL_INDEX;
diff --git a/src/mesa/main/format_pack.c b/src/mesa/main/format_pack.c
index 0da0f854d61..281efc089b4 100644
--- a/src/mesa/main/format_pack.c
+++ b/src/mesa/main/format_pack.c
@@ -43,7 +43,7 @@
#include "../../gallium/auxiliary/util/u_format_r11g11b10f.h"
-/** Helper struct for MESA_FORMAT_Z32_FLOAT_X24S8 */
+/** Helper struct for MESA_FORMAT_Z32_FLOAT_S8X24_UINT */
struct z32f_x24s8
{
float z;
@@ -447,7 +447,7 @@ pack_row_float_BGR888(GLuint n, const GLfloat src[][4], void *dst)
/*
- * MESA_FORMAT_RGB565
+ * MESA_FORMAT_B5G6R5_UNORM
*/
static void
@@ -491,7 +491,7 @@ pack_row_float_RGB565(GLuint n, const GLfloat src[][4], void *dst)
/*
- * MESA_FORMAT_RGB565_REV
+ * MESA_FORMAT_R5G6B5_UNORM
*/
static void
@@ -536,7 +536,7 @@ pack_row_float_RGB565_REV(GLuint n, const GLfloat src[][4], void *dst)
/*
- * MESA_FORMAT_ARGB4444
+ * MESA_FORMAT_B4G4R4A4_UNORM
*/
static void
@@ -558,7 +558,7 @@ pack_float_ARGB4444(const GLfloat src[4], void *dst)
/*
- * MESA_FORMAT_ARGB4444_REV
+ * MESA_FORMAT_A4R4G4B4_UNORM
*/
static void
@@ -580,7 +580,7 @@ pack_float_ARGB4444_REV(const GLfloat src[4], void *dst)
/*
- * MESA_FORMAT_RGBA5551
+ * MESA_FORMAT_A1B5G5R5_UNORM
*/
static void
@@ -602,7 +602,7 @@ pack_float_RGBA5551(const GLfloat src[4], void *dst)
/*
- * MESA_FORMAT_ARGB1555
+ * MESA_FORMAT_B5G5R5A1_UNORM
*/
static void
@@ -621,7 +621,7 @@ pack_float_ARGB1555(const GLfloat src[4], void *dst)
}
-/* MESA_FORMAT_ARGB1555_REV */
+/* MESA_FORMAT_A1R5G5B5_UNORM */
static void
pack_ubyte_ARGB1555_REV(const GLubyte src[4], void *dst)
@@ -640,7 +640,7 @@ pack_float_ARGB1555_REV(const GLfloat src[4], void *dst)
}
-/* MESA_FORMAT_AL44 */
+/* MESA_FORMAT_L4A4_UNORM */
static void
pack_ubyte_AL44(const GLubyte src[4], void *dst)
@@ -659,7 +659,7 @@ pack_float_AL44(const GLfloat src[4], void *dst)
}
-/* MESA_FORMAT_AL88 */
+/* MESA_FORMAT_L8A8_UNORM */
static void
pack_ubyte_AL88(const GLubyte src[4], void *dst)
@@ -678,7 +678,7 @@ pack_float_AL88(const GLfloat src[4], void *dst)
}
-/* MESA_FORMAT_AL88_REV */
+/* MESA_FORMAT_A8L8_UNORM */
static void
pack_ubyte_AL88_REV(const GLubyte src[4], void *dst)
@@ -697,7 +697,7 @@ pack_float_AL88_REV(const GLfloat src[4], void *dst)
}
-/* MESA_FORMAT_AL1616 */
+/* MESA_FORMAT_L16A16_UNORM */
static void
pack_ubyte_AL1616(const GLubyte src[4], void *dst)
@@ -719,7 +719,7 @@ pack_float_AL1616(const GLfloat src[4], void *dst)
}
-/* MESA_FORMAT_AL1616_REV */
+/* MESA_FORMAT_A16L16_UNORM */
static void
pack_ubyte_AL1616_REV(const GLubyte src[4], void *dst)
@@ -741,7 +741,7 @@ pack_float_AL1616_REV(const GLfloat src[4], void *dst)
}
-/* MESA_FORMAT_RGB332 */
+/* MESA_FORMAT_B2G3R3_UNORM */
static void
pack_ubyte_RGB332(const GLubyte src[4], void *dst)
@@ -878,7 +878,7 @@ pack_float_R8(const GLfloat src[4], void *dst)
}
-/* MESA_FORMAT_GR88 */
+/* MESA_FORMAT_R8G8_UNORM */
static void
pack_ubyte_GR88(const GLubyte src[4], void *dst)
@@ -898,7 +898,7 @@ pack_float_GR88(const GLfloat src[4], void *dst)
}
-/* MESA_FORMAT_RG88 */
+/* MESA_FORMAT_G8R8_UNORM */
static void
pack_ubyte_RG88(const GLubyte src[4], void *dst)
@@ -935,7 +935,7 @@ pack_float_R16(const GLfloat src[4], void *dst)
}
-/* MESA_FORMAT_GR1616 */
+/* MESA_FORMAT_R16G16_UNORM */
static void
pack_ubyte_GR1616(const GLubyte src[4], void *dst)
@@ -957,7 +957,7 @@ pack_float_GR1616(const GLfloat src[4], void *dst)
}
-/* MESA_FORMAT_RG1616 */
+/* MESA_FORMAT_G16R16_UNORM */
static void
pack_ubyte_RG1616(const GLubyte src[4], void *dst)
@@ -980,7 +980,7 @@ pack_float_RG1616(const GLfloat src[4], void *dst)
}
-/* MESA_FORMAT_ARGB2101010 */
+/* MESA_FORMAT_B10G10R10A2_UNORM */
static void
pack_ubyte_ARGB2101010(const GLubyte src[4], void *dst)
@@ -1006,7 +1006,7 @@ pack_float_ARGB2101010(const GLfloat src[4], void *dst)
}
-/* MESA_FORMAT_ABGR2101010_UINT */
+/* MESA_FORMAT_R10G10B10A2_UINT */
static void
pack_ubyte_ABGR2101010_UINT(const GLubyte src[4], void *dst)
@@ -1053,7 +1053,7 @@ pack_float_SRGB8(const GLfloat src[4], void *dst)
}
-/* MESA_FORMAT_SRGBA8 */
+/* MESA_FORMAT_A8B8G8R8_SRGB */
static void
pack_ubyte_SRGBA8(const GLubyte src[4], void *dst)
@@ -1078,7 +1078,7 @@ pack_float_SRGBA8(const GLfloat src[4], void *dst)
}
-/* MESA_FORMAT_SARGB8 */
+/* MESA_FORMAT_B8G8R8A8_SRGB */
static void
pack_ubyte_SARGB8(const GLubyte src[4], void *dst)
@@ -1121,7 +1121,7 @@ pack_float_SL8(const GLfloat src[4], void *dst)
}
-/* MESA_FORMAT_SLA8 */
+/* MESA_FORMAT_L8A8_SRGB */
static void
pack_ubyte_SLA8(const GLubyte src[4], void *dst)
@@ -1624,7 +1624,7 @@ pack_float_SIGNED_AL1616(const GLfloat src[4], void *dst)
/*
- * MESA_FORMAT_RGB9_E5_FLOAT;
+ * MESA_FORMAT_R9G9B9E5_FLOAT;
*/
static void
@@ -1648,7 +1648,7 @@ pack_ubyte_RGB9_E5_FLOAT(const GLubyte src[4], void *dst)
/*
- * MESA_FORMAT_R11_G11_B10_FLOAT;
+ * MESA_FORMAT_R11G11B10_FLOAT;
*/
static void
@@ -1671,7 +1671,7 @@ pack_float_R11_G11_B10_FLOAT(const GLfloat src[4], void *dst)
/*
- * MESA_FORMAT_XRGB4444_UNORM
+ * MESA_FORMAT_B4G4R4X4_UNORM
*/
static void
@@ -1691,7 +1691,7 @@ pack_float_XRGB4444_UNORM(const GLfloat src[4], void *dst)
/*
- * MESA_FORMAT_XRGB1555_UNORM
+ * MESA_FORMAT_B5G5R5X1_UNORM
*/
static void
@@ -1711,7 +1711,7 @@ pack_float_XRGB1555_UNORM(const GLfloat src[4], void *dst)
/*
- * MESA_FORMAT_XBGR8888_SNORM
+ * MESA_FORMAT_R8G8B8X8_SNORM
*/
static void
@@ -1726,7 +1726,7 @@ pack_float_XBGR8888_SNORM(const GLfloat src[4], void *dst)
/*
- * MESA_FORMAT_XBGR8888_SRGB
+ * MESA_FORMAT_R8G8B8X8_SRGB
*/
static void
@@ -1740,7 +1740,7 @@ pack_float_XBGR8888_SRGB(const GLfloat src[4], void *dst)
}
-/* MESA_FORMAT_XRGB2101010_UNORM */
+/* MESA_FORMAT_B10G10R10X2_UNORM */
static void
pack_ubyte_XRGB2101010_UNORM(const GLubyte src[4], void *dst)
@@ -1824,7 +1824,7 @@ pack_float_XBGR32323232_FLOAT(const GLfloat src[4], void *dst)
d[3] = 1.0;
}
-/* MESA_FORMAT_ABGR2101010 */
+/* MESA_FORMAT_R10G10B10A2_UNORM */
static void
pack_ubyte_ABGR2101010(const GLubyte src[4], void *dst)
@@ -1899,19 +1899,19 @@ _mesa_get_pack_ubyte_rgba_function(mesa_format format)
table[MESA_FORMAT_X8R8G8B8_UNORM] = pack_ubyte_XRGB8888_REV;
table[MESA_FORMAT_BGR_UNORM8] = pack_ubyte_RGB888;
table[MESA_FORMAT_RGB_UNORM8] = pack_ubyte_BGR888;
- table[MESA_FORMAT_RGB565] = pack_ubyte_RGB565;
- table[MESA_FORMAT_RGB565_REV] = pack_ubyte_RGB565_REV;
- table[MESA_FORMAT_ARGB4444] = pack_ubyte_ARGB4444;
- table[MESA_FORMAT_ARGB4444_REV] = pack_ubyte_ARGB4444_REV;
- table[MESA_FORMAT_RGBA5551] = pack_ubyte_RGBA5551;
- table[MESA_FORMAT_ARGB1555] = pack_ubyte_ARGB1555;
- table[MESA_FORMAT_ARGB1555_REV] = pack_ubyte_ARGB1555_REV;
- table[MESA_FORMAT_AL44] = pack_ubyte_AL44;
- table[MESA_FORMAT_AL88] = pack_ubyte_AL88;
- table[MESA_FORMAT_AL88_REV] = pack_ubyte_AL88_REV;
- table[MESA_FORMAT_AL1616] = pack_ubyte_AL1616;
- table[MESA_FORMAT_AL1616_REV] = pack_ubyte_AL1616_REV;
- table[MESA_FORMAT_RGB332] = pack_ubyte_RGB332;
+ table[MESA_FORMAT_B5G6R5_UNORM] = pack_ubyte_RGB565;
+ table[MESA_FORMAT_R5G6B5_UNORM] = pack_ubyte_RGB565_REV;
+ table[MESA_FORMAT_B4G4R4A4_UNORM] = pack_ubyte_ARGB4444;
+ table[MESA_FORMAT_A4R4G4B4_UNORM] = pack_ubyte_ARGB4444_REV;
+ table[MESA_FORMAT_A1B5G5R5_UNORM] = pack_ubyte_RGBA5551;
+ table[MESA_FORMAT_B5G5R5A1_UNORM] = pack_ubyte_ARGB1555;
+ table[MESA_FORMAT_A1R5G5B5_UNORM] = pack_ubyte_ARGB1555_REV;
+ table[MESA_FORMAT_L4A4_UNORM] = pack_ubyte_AL44;
+ table[MESA_FORMAT_L8A8_UNORM] = pack_ubyte_AL88;
+ table[MESA_FORMAT_A8L8_UNORM] = pack_ubyte_AL88_REV;
+ table[MESA_FORMAT_L16A16_UNORM] = pack_ubyte_AL1616;
+ table[MESA_FORMAT_A16L16_UNORM] = pack_ubyte_AL1616_REV;
+ table[MESA_FORMAT_B2G3R3_UNORM] = pack_ubyte_RGB332;
table[MESA_FORMAT_A_UNORM8] = pack_ubyte_A8;
table[MESA_FORMAT_A_UNORM16] = pack_ubyte_A16;
table[MESA_FORMAT_L_UNORM8] = pack_ubyte_L8;
@@ -1921,30 +1921,29 @@ _mesa_get_pack_ubyte_rgba_function(mesa_format format)
table[MESA_FORMAT_YCBCR] = pack_ubyte_YCBCR;
table[MESA_FORMAT_YCBCR_REV] = pack_ubyte_YCBCR_REV;
table[MESA_FORMAT_R_UNORM8] = pack_ubyte_R8;
- table[MESA_FORMAT_GR88] = pack_ubyte_GR88;
- table[MESA_FORMAT_RG88] = pack_ubyte_RG88;
+ table[MESA_FORMAT_R8G8_UNORM] = pack_ubyte_GR88;
+ table[MESA_FORMAT_G8R8_UNORM] = pack_ubyte_RG88;
table[MESA_FORMAT_R_UNORM16] = pack_ubyte_R16;
- table[MESA_FORMAT_GR1616] = pack_ubyte_GR1616;
- table[MESA_FORMAT_RG1616] = pack_ubyte_RG1616;
- table[MESA_FORMAT_ARGB2101010] = pack_ubyte_ARGB2101010;
- table[MESA_FORMAT_ABGR2101010_UINT] = pack_ubyte_ABGR2101010_UINT;
+ table[MESA_FORMAT_R16G16_UNORM] = pack_ubyte_GR1616;
+ table[MESA_FORMAT_G16R16_UNORM] = pack_ubyte_RG1616;
+ table[MESA_FORMAT_B10G10R10A2_UNORM] = pack_ubyte_ARGB2101010;
+ table[MESA_FORMAT_R10G10B10A2_UINT] = pack_ubyte_ABGR2101010_UINT;
/* should never convert RGBA to these formats */
- table[MESA_FORMAT_Z24_S8] = NULL;
- table[MESA_FORMAT_S8_Z24] = NULL;
+ table[MESA_FORMAT_S8_UINT_Z24_UNORM] = NULL;
+ table[MESA_FORMAT_Z24_UNORM_X8_UINT] = NULL;
table[MESA_FORMAT_Z_UNORM16] = NULL;
- table[MESA_FORMAT_X8_Z24] = NULL;
- table[MESA_FORMAT_Z24_X8] = NULL;
+ table[MESA_FORMAT_Z24_UNORM_S8_UINT] = NULL;
+ table[MESA_FORMAT_X8Z24_UNORM] = NULL;
table[MESA_FORMAT_Z_UNORM32] = NULL;
table[MESA_FORMAT_S_UINT8] = NULL;
/* sRGB */
table[MESA_FORMAT_BGR_SRGB8] = pack_ubyte_SRGB8;
- table[MESA_FORMAT_SRGBA8] = pack_ubyte_SRGBA8;
- table[MESA_FORMAT_SARGB8] = pack_ubyte_SARGB8;
+ table[MESA_FORMAT_A8B8G8R8_SRGB] = pack_ubyte_SRGBA8;
+ table[MESA_FORMAT_B8G8R8A8_SRGB] = pack_ubyte_SARGB8;
table[MESA_FORMAT_L_SRGB8] = pack_ubyte_SL8;
- table[MESA_FORMAT_SLA8] = pack_ubyte_SLA8;
-
+ table[MESA_FORMAT_L8A8_SRGB] = pack_ubyte_SLA8;
/* n/a */
table[MESA_FORMAT_SRGB_DXT1] = NULL; /* pack_ubyte_SRGB_DXT1; */
table[MESA_FORMAT_SRGBA_DXT1] = NULL; /* pack_ubyte_SRGBA_DXT1; */
@@ -2009,16 +2008,16 @@ _mesa_get_pack_ubyte_rgba_function(mesa_format format)
table[MESA_FORMAT_RGBA_UNORM16] = pack_ubyte_RGBA_16;
- table[MESA_FORMAT_RGB9_E5_FLOAT] = pack_ubyte_RGB9_E5_FLOAT;
- table[MESA_FORMAT_R11_G11_B10_FLOAT] = pack_ubyte_R11_G11_B10_FLOAT;
+ table[MESA_FORMAT_R9G9B9E5_FLOAT] = pack_ubyte_RGB9_E5_FLOAT;
+ table[MESA_FORMAT_R11G11B10_FLOAT] = pack_ubyte_R11_G11_B10_FLOAT;
- table[MESA_FORMAT_XRGB4444_UNORM] = pack_ubyte_XRGB4444_UNORM;
- table[MESA_FORMAT_XRGB1555_UNORM] = pack_ubyte_XRGB1555_UNORM;
- table[MESA_FORMAT_XBGR8888_SNORM] = NULL;
- table[MESA_FORMAT_XBGR8888_SRGB] = NULL;
+ table[MESA_FORMAT_B4G4R4X4_UNORM] = pack_ubyte_XRGB4444_UNORM;
+ table[MESA_FORMAT_B5G5R5X1_UNORM] = pack_ubyte_XRGB1555_UNORM;
+ table[MESA_FORMAT_R8G8B8X8_SNORM] = NULL;
+ table[MESA_FORMAT_R8G8B8X8_SRGB] = NULL;
table[MESA_FORMAT_RGBX_UINT8] = NULL;
table[MESA_FORMAT_RGBX_SINT8] = NULL;
- table[MESA_FORMAT_XRGB2101010_UNORM] = pack_ubyte_XRGB2101010_UNORM;
+ table[MESA_FORMAT_B10G10R10X2_UNORM] = pack_ubyte_XRGB2101010_UNORM;
table[MESA_FORMAT_RGBX_UNORM16] = pack_ubyte_XBGR16161616_UNORM;
table[MESA_FORMAT_RGBX_SNORM16] = NULL;
table[MESA_FORMAT_RGBX_FLOAT16] = NULL;
@@ -2028,7 +2027,7 @@ _mesa_get_pack_ubyte_rgba_function(mesa_format format)
table[MESA_FORMAT_RGBX_UINT32] = NULL;
table[MESA_FORMAT_RGBX_SINT32] = NULL;
- table[MESA_FORMAT_ABGR2101010] = pack_ubyte_ABGR2101010;
+ table[MESA_FORMAT_R10G10B10A2_UNORM] = pack_ubyte_ABGR2101010;
initialized = GL_TRUE;
}
@@ -2062,20 +2061,20 @@ _mesa_get_pack_float_rgba_function(mesa_format format)
table[MESA_FORMAT_X8R8G8B8_UNORM] = pack_float_XRGB8888_REV;
table[MESA_FORMAT_BGR_UNORM8] = pack_float_RGB888;
table[MESA_FORMAT_RGB_UNORM8] = pack_float_BGR888;
- table[MESA_FORMAT_RGB565] = pack_float_RGB565;
- table[MESA_FORMAT_RGB565_REV] = pack_float_RGB565_REV;
- table[MESA_FORMAT_ARGB4444] = pack_float_ARGB4444;
- table[MESA_FORMAT_ARGB4444_REV] = pack_float_ARGB4444_REV;
- table[MESA_FORMAT_RGBA5551] = pack_float_RGBA5551;
- table[MESA_FORMAT_ARGB1555] = pack_float_ARGB1555;
- table[MESA_FORMAT_ARGB1555_REV] = pack_float_ARGB1555_REV;
-
- table[MESA_FORMAT_AL44] = pack_float_AL44;
- table[MESA_FORMAT_AL88] = pack_float_AL88;
- table[MESA_FORMAT_AL88_REV] = pack_float_AL88_REV;
- table[MESA_FORMAT_AL1616] = pack_float_AL1616;
- table[MESA_FORMAT_AL1616_REV] = pack_float_AL1616_REV;
- table[MESA_FORMAT_RGB332] = pack_float_RGB332;
+ table[MESA_FORMAT_B5G6R5_UNORM] = pack_float_RGB565;
+ table[MESA_FORMAT_R5G6B5_UNORM] = pack_float_RGB565_REV;
+ table[MESA_FORMAT_B4G4R4A4_UNORM] = pack_float_ARGB4444;
+ table[MESA_FORMAT_A4R4G4B4_UNORM] = pack_float_ARGB4444_REV;
+ table[MESA_FORMAT_A1B5G5R5_UNORM] = pack_float_RGBA5551;
+ table[MESA_FORMAT_B5G5R5A1_UNORM] = pack_float_ARGB1555;
+ table[MESA_FORMAT_A1R5G5B5_UNORM] = pack_float_ARGB1555_REV;
+
+ table[MESA_FORMAT_L4A4_UNORM] = pack_float_AL44;
+ table[MESA_FORMAT_L8A8_UNORM] = pack_float_AL88;
+ table[MESA_FORMAT_A8L8_UNORM] = pack_float_AL88_REV;
+ table[MESA_FORMAT_L16A16_UNORM] = pack_float_AL1616;
+ table[MESA_FORMAT_A16L16_UNORM] = pack_float_AL1616_REV;
+ table[MESA_FORMAT_B2G3R3_UNORM] = pack_float_RGB332;
table[MESA_FORMAT_A_UNORM8] = pack_float_A8;
table[MESA_FORMAT_A_UNORM16] = pack_float_A16;
table[MESA_FORMAT_L_UNORM8] = pack_float_L8;
@@ -2085,28 +2084,28 @@ _mesa_get_pack_float_rgba_function(mesa_format format)
table[MESA_FORMAT_YCBCR] = pack_float_YCBCR;
table[MESA_FORMAT_YCBCR_REV] = pack_float_YCBCR_REV;
table[MESA_FORMAT_R_UNORM8] = pack_float_R8;
- table[MESA_FORMAT_GR88] = pack_float_GR88;
- table[MESA_FORMAT_RG88] = pack_float_RG88;
+ table[MESA_FORMAT_R8G8_UNORM] = pack_float_GR88;
+ table[MESA_FORMAT_G8R8_UNORM] = pack_float_RG88;
table[MESA_FORMAT_R_UNORM16] = pack_float_R16;
- table[MESA_FORMAT_GR1616] = pack_float_GR1616;
- table[MESA_FORMAT_RG1616] = pack_float_RG1616;
- table[MESA_FORMAT_ARGB2101010] = pack_float_ARGB2101010;
- table[MESA_FORMAT_ABGR2101010_UINT] = pack_float_ABGR2101010_UINT;
+ table[MESA_FORMAT_R16G16_UNORM] = pack_float_GR1616;
+ table[MESA_FORMAT_G16R16_UNORM] = pack_float_RG1616;
+ table[MESA_FORMAT_B10G10R10A2_UNORM] = pack_float_ARGB2101010;
+ table[MESA_FORMAT_R10G10B10A2_UINT] = pack_float_ABGR2101010_UINT;
/* should never convert RGBA to these formats */
- table[MESA_FORMAT_Z24_S8] = NULL;
- table[MESA_FORMAT_S8_Z24] = NULL;
+ table[MESA_FORMAT_S8_UINT_Z24_UNORM] = NULL;
+ table[MESA_FORMAT_Z24_UNORM_X8_UINT] = NULL;
table[MESA_FORMAT_Z_UNORM16] = NULL;
- table[MESA_FORMAT_X8_Z24] = NULL;
- table[MESA_FORMAT_Z24_X8] = NULL;
+ table[MESA_FORMAT_Z24_UNORM_S8_UINT] = NULL;
+ table[MESA_FORMAT_X8Z24_UNORM] = NULL;
table[MESA_FORMAT_Z_UNORM32] = NULL;
table[MESA_FORMAT_S_UINT8] = NULL;
table[MESA_FORMAT_BGR_SRGB8] = pack_float_SRGB8;
- table[MESA_FORMAT_SRGBA8] = pack_float_SRGBA8;
- table[MESA_FORMAT_SARGB8] = pack_float_SARGB8;
+ table[MESA_FORMAT_A8B8G8R8_SRGB] = pack_float_SRGBA8;
+ table[MESA_FORMAT_B8G8R8A8_SRGB] = pack_float_SARGB8;
table[MESA_FORMAT_L_SRGB8] = pack_float_SL8;
- table[MESA_FORMAT_SLA8] = pack_float_SLA8;
+ table[MESA_FORMAT_L8A8_SRGB] = pack_float_SLA8;
/* n/a */
table[MESA_FORMAT_SRGB_DXT1] = NULL;
@@ -2169,16 +2168,16 @@ _mesa_get_pack_float_rgba_function(mesa_format format)
table[MESA_FORMAT_SIGNED_AL1616] = pack_float_SIGNED_AL1616;
table[MESA_FORMAT_SIGNED_I16] = pack_float_SIGNED_L16; /* reused */
- table[MESA_FORMAT_RGB9_E5_FLOAT] = pack_float_RGB9_E5_FLOAT;
- table[MESA_FORMAT_R11_G11_B10_FLOAT] = pack_float_R11_G11_B10_FLOAT;
+ table[MESA_FORMAT_R9G9B9E5_FLOAT] = pack_float_RGB9_E5_FLOAT;
+ table[MESA_FORMAT_R11G11B10_FLOAT] = pack_float_R11_G11_B10_FLOAT;
- table[MESA_FORMAT_XRGB4444_UNORM] = pack_float_XRGB4444_UNORM;
- table[MESA_FORMAT_XRGB1555_UNORM] = pack_float_XRGB1555_UNORM;
- table[MESA_FORMAT_XBGR8888_SNORM] = pack_float_XBGR8888_SNORM;
- table[MESA_FORMAT_XBGR8888_SRGB] = pack_float_XBGR8888_SRGB;
+ table[MESA_FORMAT_B4G4R4X4_UNORM] = pack_float_XRGB4444_UNORM;
+ table[MESA_FORMAT_B5G5R5X1_UNORM] = pack_float_XRGB1555_UNORM;
+ table[MESA_FORMAT_R8G8B8X8_SNORM] = pack_float_XBGR8888_SNORM;
+ table[MESA_FORMAT_R8G8B8X8_SRGB] = pack_float_XBGR8888_SRGB;
table[MESA_FORMAT_RGBX_UINT8] = NULL;
table[MESA_FORMAT_RGBX_SINT8] = NULL;
- table[MESA_FORMAT_XRGB2101010_UNORM] = pack_float_XRGB2101010_UNORM;
+ table[MESA_FORMAT_B10G10R10X2_UNORM] = pack_float_XRGB2101010_UNORM;
table[MESA_FORMAT_RGBX_UNORM16] = pack_float_XBGR16161616_UNORM;
table[MESA_FORMAT_RGBX_SNORM16] = pack_float_XBGR16161616_SNORM;
table[MESA_FORMAT_RGBX_FLOAT16] = pack_float_XBGR16161616_FLOAT;
@@ -2188,7 +2187,7 @@ _mesa_get_pack_float_rgba_function(mesa_format format)
table[MESA_FORMAT_RGBX_UINT32] = NULL;
table[MESA_FORMAT_RGBX_SINT32] = NULL;
- table[MESA_FORMAT_ABGR2101010] = pack_float_ABGR2101010;
+ table[MESA_FORMAT_R10G10B10A2_UNORM] = pack_float_ABGR2101010;
table[MESA_FORMAT_SIGNED_RG88] = pack_float_SIGNED_RG88;
table[MESA_FORMAT_SIGNED_RG1616] = pack_float_SIGNED_RG1616;
@@ -2223,8 +2222,8 @@ get_pack_float_rgba_row_function(mesa_format format)
table[MESA_FORMAT_X8R8G8B8_UNORM] = pack_row_float_XRGB8888_REV;
table[MESA_FORMAT_BGR_UNORM8] = pack_row_float_RGB888;
table[MESA_FORMAT_RGB_UNORM8] = pack_row_float_BGR888;
- table[MESA_FORMAT_RGB565] = pack_row_float_RGB565;
- table[MESA_FORMAT_RGB565_REV] = pack_row_float_RGB565_REV;
+ table[MESA_FORMAT_B5G6R5_UNORM] = pack_row_float_RGB565;
+ table[MESA_FORMAT_R5G6B5_UNORM] = pack_row_float_RGB565_REV;
initialized = GL_TRUE;
}
@@ -2256,8 +2255,8 @@ get_pack_ubyte_rgba_row_function(mesa_format format)
table[MESA_FORMAT_X8R8G8B8_UNORM] = pack_row_ubyte_XRGB8888_REV;
table[MESA_FORMAT_BGR_UNORM8] = pack_row_ubyte_RGB888;
table[MESA_FORMAT_RGB_UNORM8] = pack_row_ubyte_BGR888;
- table[MESA_FORMAT_RGB565] = pack_row_ubyte_RGB565;
- table[MESA_FORMAT_RGB565_REV] = pack_row_ubyte_RGB565_REV;
+ table[MESA_FORMAT_B5G6R5_UNORM] = pack_row_ubyte_RGB565;
+ table[MESA_FORMAT_R5G6B5_UNORM] = pack_row_ubyte_RGB565_REV;
initialized = GL_TRUE;
}
@@ -2426,18 +2425,18 @@ gl_pack_float_z_func
_mesa_get_pack_float_z_func(mesa_format format)
{
switch (format) {
- case MESA_FORMAT_Z24_S8:
- case MESA_FORMAT_Z24_X8:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
+ case MESA_FORMAT_X8Z24_UNORM:
return pack_float_z_Z24_S8;
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_X8_Z24:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
return pack_float_z_S8_Z24;
case MESA_FORMAT_Z_UNORM16:
return pack_float_z_Z16;
case MESA_FORMAT_Z_UNORM32:
return pack_float_z_Z32;
case MESA_FORMAT_Z_FLOAT32:
- case MESA_FORMAT_Z32_FLOAT_X24S8:
+ case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
return pack_float_z_Z32_FLOAT;
default:
_mesa_problem(NULL,
@@ -2511,11 +2510,11 @@ gl_pack_uint_z_func
_mesa_get_pack_uint_z_func(mesa_format format)
{
switch (format) {
- case MESA_FORMAT_Z24_S8:
- case MESA_FORMAT_Z24_X8:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
+ case MESA_FORMAT_X8Z24_UNORM:
return pack_uint_z_Z24_S8;
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_X8_Z24:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
return pack_uint_z_S8_Z24;
case MESA_FORMAT_Z_UNORM16:
return pack_uint_z_Z16;
@@ -2523,7 +2522,7 @@ _mesa_get_pack_uint_z_func(mesa_format format)
return pack_uint_z_Z32;
case MESA_FORMAT_Z_FLOAT32:
return pack_uint_z_Z32_FLOAT;
- case MESA_FORMAT_Z32_FLOAT_X24S8:
+ case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
return pack_uint_z_Z32_FLOAT_X24S8;
default:
_mesa_problem(NULL, "unexpected format in _mesa_get_pack_uint_z_func()");
@@ -2575,13 +2574,13 @@ gl_pack_ubyte_stencil_func
_mesa_get_pack_ubyte_stencil_func(mesa_format format)
{
switch (format) {
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
return pack_ubyte_stencil_Z24_S8;
- case MESA_FORMAT_S8_Z24:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
return pack_ubyte_stencil_S8_Z24;
case MESA_FORMAT_S_UINT8:
return pack_ubyte_stencil_S8;
- case MESA_FORMAT_Z32_FLOAT_X24S8:
+ case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
return pack_ubyte_stencil_Z32_FLOAT_X24S8;
default:
_mesa_problem(NULL,
@@ -2597,8 +2596,8 @@ _mesa_pack_float_z_row(mesa_format format, GLuint n,
const GLfloat *src, void *dst)
{
switch (format) {
- case MESA_FORMAT_Z24_S8:
- case MESA_FORMAT_Z24_X8:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
+ case MESA_FORMAT_X8Z24_UNORM:
{
/* don't disturb the stencil values */
GLuint *d = ((GLuint *) dst);
@@ -2612,8 +2611,8 @@ _mesa_pack_float_z_row(mesa_format format, GLuint n,
}
}
break;
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_X8_Z24:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
{
/* don't disturb the stencil values */
GLuint *d = ((GLuint *) dst);
@@ -2650,7 +2649,7 @@ _mesa_pack_float_z_row(mesa_format format, GLuint n,
case MESA_FORMAT_Z_FLOAT32:
memcpy(dst, src, n * sizeof(GLfloat));
break;
- case MESA_FORMAT_Z32_FLOAT_X24S8:
+ case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
{
struct z32f_x24s8 *d = (struct z32f_x24s8 *) dst;
GLuint i;
@@ -2673,8 +2672,8 @@ _mesa_pack_uint_z_row(mesa_format format, GLuint n,
const GLuint *src, void *dst)
{
switch (format) {
- case MESA_FORMAT_Z24_S8:
- case MESA_FORMAT_Z24_X8:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
+ case MESA_FORMAT_X8Z24_UNORM:
{
/* don't disturb the stencil values */
GLuint *d = ((GLuint *) dst);
@@ -2686,8 +2685,8 @@ _mesa_pack_uint_z_row(mesa_format format, GLuint n,
}
}
break;
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_X8_Z24:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
{
/* don't disturb the stencil values */
GLuint *d = ((GLuint *) dst);
@@ -2723,7 +2722,7 @@ _mesa_pack_uint_z_row(mesa_format format, GLuint n,
}
}
break;
- case MESA_FORMAT_Z32_FLOAT_X24S8:
+ case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
{
struct z32f_x24s8 *d = (struct z32f_x24s8 *) dst;
const GLdouble scale = 1.0 / (GLdouble) 0xffffffff;
@@ -2746,7 +2745,7 @@ _mesa_pack_ubyte_stencil_row(mesa_format format, GLuint n,
const GLubyte *src, void *dst)
{
switch (format) {
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
{
/* don't disturb the Z values */
GLuint *d = ((GLuint *) dst);
@@ -2758,7 +2757,7 @@ _mesa_pack_ubyte_stencil_row(mesa_format format, GLuint n,
}
}
break;
- case MESA_FORMAT_S8_Z24:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
{
/* don't disturb the Z values */
GLuint *d = ((GLuint *) dst);
@@ -2773,7 +2772,7 @@ _mesa_pack_ubyte_stencil_row(mesa_format format, GLuint n,
case MESA_FORMAT_S_UINT8:
memcpy(dst, src, n * sizeof(GLubyte));
break;
- case MESA_FORMAT_Z32_FLOAT_X24S8:
+ case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
{
struct z32f_x24s8 *d = (struct z32f_x24s8 *) dst;
GLuint i;
@@ -2796,10 +2795,10 @@ _mesa_pack_uint_24_8_depth_stencil_row(mesa_format format, GLuint n,
const GLuint *src, void *dst)
{
switch (format) {
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
memcpy(dst, src, n * sizeof(GLuint));
break;
- case MESA_FORMAT_S8_Z24:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
{
GLuint *d = ((GLuint *) dst);
GLuint i;
@@ -2810,7 +2809,7 @@ _mesa_pack_uint_24_8_depth_stencil_row(mesa_format format, GLuint n,
}
}
break;
- case MESA_FORMAT_Z32_FLOAT_X24S8:
+ case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
{
const GLdouble scale = 1.0 / (GLdouble) 0xffffff;
struct z32f_x24s8 *d = (struct z32f_x24s8 *) dst;
diff --git a/src/mesa/main/format_unpack.c b/src/mesa/main/format_unpack.c
index 33dc07d80c2..d40fb55802e 100644
--- a/src/mesa/main/format_unpack.c
+++ b/src/mesa/main/format_unpack.c
@@ -30,7 +30,7 @@
#include "../../gallium/auxiliary/util/u_format_r11g11b10f.h"
-/** Helper struct for MESA_FORMAT_Z32_FLOAT_X24S8 */
+/** Helper struct for MESA_FORMAT_Z32_FLOAT_S8X24_UINT */
struct z32f_x24s8
{
float z;
@@ -2329,19 +2329,19 @@ get_unpack_rgba_function(mesa_format format)
table[MESA_FORMAT_X8R8G8B8_UNORM] = unpack_XRGB8888_REV;
table[MESA_FORMAT_BGR_UNORM8] = unpack_RGB888;
table[MESA_FORMAT_RGB_UNORM8] = unpack_BGR888;
- table[MESA_FORMAT_RGB565] = unpack_RGB565;
- table[MESA_FORMAT_RGB565_REV] = unpack_RGB565_REV;
- table[MESA_FORMAT_ARGB4444] = unpack_ARGB4444;
- table[MESA_FORMAT_ARGB4444_REV] = unpack_ARGB4444_REV;
- table[MESA_FORMAT_RGBA5551] = unpack_RGBA5551;
- table[MESA_FORMAT_ARGB1555] = unpack_ARGB1555;
- table[MESA_FORMAT_ARGB1555_REV] = unpack_ARGB1555_REV;
- table[MESA_FORMAT_AL44] = unpack_AL44;
- table[MESA_FORMAT_AL88] = unpack_AL88;
- table[MESA_FORMAT_AL88_REV] = unpack_AL88_REV;
- table[MESA_FORMAT_AL1616] = unpack_AL1616;
- table[MESA_FORMAT_AL1616_REV] = unpack_AL1616_REV;
- table[MESA_FORMAT_RGB332] = unpack_RGB332;
+ table[MESA_FORMAT_B5G6R5_UNORM] = unpack_RGB565;
+ table[MESA_FORMAT_R5G6B5_UNORM] = unpack_RGB565_REV;
+ table[MESA_FORMAT_B4G4R4A4_UNORM] = unpack_ARGB4444;
+ table[MESA_FORMAT_A4R4G4B4_UNORM] = unpack_ARGB4444_REV;
+ table[MESA_FORMAT_A1B5G5R5_UNORM] = unpack_RGBA5551;
+ table[MESA_FORMAT_B5G5R5A1_UNORM] = unpack_ARGB1555;
+ table[MESA_FORMAT_A1R5G5B5_UNORM] = unpack_ARGB1555_REV;
+ table[MESA_FORMAT_L4A4_UNORM] = unpack_AL44;
+ table[MESA_FORMAT_L8A8_UNORM] = unpack_AL88;
+ table[MESA_FORMAT_A8L8_UNORM] = unpack_AL88_REV;
+ table[MESA_FORMAT_L16A16_UNORM] = unpack_AL1616;
+ table[MESA_FORMAT_A16L16_UNORM] = unpack_AL1616_REV;
+ table[MESA_FORMAT_B2G3R3_UNORM] = unpack_RGB332;
table[MESA_FORMAT_A_UNORM8] = unpack_A8;
table[MESA_FORMAT_A_UNORM16] = unpack_A16;
table[MESA_FORMAT_L_UNORM8] = unpack_L8;
@@ -2351,26 +2351,26 @@ get_unpack_rgba_function(mesa_format format)
table[MESA_FORMAT_YCBCR] = unpack_YCBCR;
table[MESA_FORMAT_YCBCR_REV] = unpack_YCBCR_REV;
table[MESA_FORMAT_R_UNORM8] = unpack_R8;
- table[MESA_FORMAT_GR88] = unpack_GR88;
- table[MESA_FORMAT_RG88] = unpack_RG88;
+ table[MESA_FORMAT_R8G8_UNORM] = unpack_GR88;
+ table[MESA_FORMAT_G8R8_UNORM] = unpack_RG88;
table[MESA_FORMAT_R_UNORM16] = unpack_R16;
- table[MESA_FORMAT_GR1616] = unpack_GR1616;
- table[MESA_FORMAT_RG1616] = unpack_RG1616;
- table[MESA_FORMAT_ARGB2101010] = unpack_ARGB2101010;
- table[MESA_FORMAT_ARGB2101010_UINT] = unpack_ARGB2101010_UINT;
- table[MESA_FORMAT_ABGR2101010_UINT] = unpack_ABGR2101010_UINT;
- table[MESA_FORMAT_Z24_S8] = unpack_Z24_S8;
- table[MESA_FORMAT_S8_Z24] = unpack_S8_Z24;
+ table[MESA_FORMAT_R16G16_UNORM] = unpack_GR1616;
+ table[MESA_FORMAT_G16R16_UNORM] = unpack_RG1616;
+ table[MESA_FORMAT_B10G10R10A2_UNORM] = unpack_ARGB2101010;
+ table[MESA_FORMAT_B10G10R10A2_UINT] = unpack_ARGB2101010_UINT;
+ table[MESA_FORMAT_R10G10B10A2_UINT] = unpack_ABGR2101010_UINT;
+ table[MESA_FORMAT_S8_UINT_Z24_UNORM] = unpack_Z24_S8;
+ table[MESA_FORMAT_Z24_UNORM_X8_UINT] = unpack_S8_Z24;
table[MESA_FORMAT_Z_UNORM16] = unpack_Z16;
- table[MESA_FORMAT_X8_Z24] = unpack_X8_Z24;
- table[MESA_FORMAT_Z24_X8] = unpack_Z24_X8;
+ table[MESA_FORMAT_Z24_UNORM_S8_UINT] = unpack_X8_Z24;
+ table[MESA_FORMAT_X8Z24_UNORM] = unpack_Z24_X8;
table[MESA_FORMAT_Z_UNORM32] = unpack_Z32;
table[MESA_FORMAT_S_UINT8] = unpack_S8;
table[MESA_FORMAT_BGR_SRGB8] = unpack_SRGB8;
- table[MESA_FORMAT_SRGBA8] = unpack_SRGBA8;
- table[MESA_FORMAT_SARGB8] = unpack_SARGB8;
+ table[MESA_FORMAT_A8B8G8R8_SRGB] = unpack_SRGBA8;
+ table[MESA_FORMAT_B8G8R8A8_SRGB] = unpack_SARGB8;
table[MESA_FORMAT_L_SRGB8] = unpack_SL8;
- table[MESA_FORMAT_SLA8] = unpack_SLA8;
+ table[MESA_FORMAT_L8A8_SRGB] = unpack_SLA8;
table[MESA_FORMAT_SRGB_DXT1] = unpack_SRGB_DXT1;
table[MESA_FORMAT_SRGBA_DXT1] = unpack_SRGBA_DXT1;
table[MESA_FORMAT_SRGBA_DXT3] = unpack_SRGBA_DXT3;
@@ -2497,19 +2497,19 @@ get_unpack_rgba_function(mesa_format format)
table[MESA_FORMAT_SIGNED_AL1616] = unpack_SIGNED_AL1616;
table[MESA_FORMAT_SIGNED_I16] = unpack_SIGNED_I16;
- table[MESA_FORMAT_RGB9_E5_FLOAT] = unpack_RGB9_E5_FLOAT;
- table[MESA_FORMAT_R11_G11_B10_FLOAT] = unpack_R11_G11_B10_FLOAT;
+ table[MESA_FORMAT_R9G9B9E5_FLOAT] = unpack_RGB9_E5_FLOAT;
+ table[MESA_FORMAT_R11G11B10_FLOAT] = unpack_R11_G11_B10_FLOAT;
table[MESA_FORMAT_Z_FLOAT32] = unpack_Z32_FLOAT;
- table[MESA_FORMAT_Z32_FLOAT_X24S8] = unpack_Z32_FLOAT_X24S8;
+ table[MESA_FORMAT_Z32_FLOAT_S8X24_UINT] = unpack_Z32_FLOAT_X24S8;
- table[MESA_FORMAT_XRGB4444_UNORM] = unpack_XRGB4444_UNORM;
- table[MESA_FORMAT_XRGB1555_UNORM] = unpack_XRGB1555_UNORM;
- table[MESA_FORMAT_XBGR8888_SNORM] = unpack_XBGR8888_SNORM;
- table[MESA_FORMAT_XBGR8888_SRGB] = unpack_XBGR8888_SRGB;
+ table[MESA_FORMAT_B4G4R4X4_UNORM] = unpack_XRGB4444_UNORM;
+ table[MESA_FORMAT_B5G5R5X1_UNORM] = unpack_XRGB1555_UNORM;
+ table[MESA_FORMAT_R8G8B8X8_SNORM] = unpack_XBGR8888_SNORM;
+ table[MESA_FORMAT_R8G8B8X8_SRGB] = unpack_XBGR8888_SRGB;
table[MESA_FORMAT_RGBX_UINT8] = unpack_XBGR8888_UINT;
table[MESA_FORMAT_RGBX_SINT8] = unpack_XBGR8888_SINT;
- table[MESA_FORMAT_XRGB2101010_UNORM] = unpack_XRGB2101010_UNORM;
+ table[MESA_FORMAT_B10G10R10X2_UNORM] = unpack_XRGB2101010_UNORM;
table[MESA_FORMAT_RGBX_UNORM16] = unpack_XBGR16161616_UNORM;
table[MESA_FORMAT_RGBX_SNORM16] = unpack_XBGR16161616_SNORM;
table[MESA_FORMAT_RGBX_FLOAT16] = unpack_XBGR16161616_FLOAT;
@@ -2519,7 +2519,7 @@ get_unpack_rgba_function(mesa_format format)
table[MESA_FORMAT_RGBX_UINT32] = unpack_XBGR32323232_UINT;
table[MESA_FORMAT_RGBX_SINT32] = unpack_XBGR32323232_SINT;
- table[MESA_FORMAT_ABGR2101010] = unpack_ABGR2101010;
+ table[MESA_FORMAT_R10G10B10A2_UNORM] = unpack_ABGR2101010;
table[MESA_FORMAT_SIGNED_RG88] = unpack_SIGNED_RG88;
table[MESA_FORMAT_SIGNED_RG1616] = unpack_SIGNED_RG1616;
@@ -2947,37 +2947,37 @@ _mesa_unpack_ubyte_rgba_row(mesa_format format, GLuint n,
case MESA_FORMAT_RGB_UNORM8:
unpack_ubyte_BGR888(src, dst, n);
break;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
unpack_ubyte_RGB565(src, dst, n);
break;
- case MESA_FORMAT_RGB565_REV:
+ case MESA_FORMAT_R5G6B5_UNORM:
unpack_ubyte_RGB565_REV(src, dst, n);
break;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
unpack_ubyte_ARGB4444(src, dst, n);
break;
- case MESA_FORMAT_ARGB4444_REV:
+ case MESA_FORMAT_A4R4G4B4_UNORM:
unpack_ubyte_ARGB4444_REV(src, dst, n);
break;
- case MESA_FORMAT_RGBA5551:
+ case MESA_FORMAT_A1B5G5R5_UNORM:
unpack_ubyte_RGBA5551(src, dst, n);
break;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
unpack_ubyte_ARGB1555(src, dst, n);
break;
- case MESA_FORMAT_ARGB1555_REV:
+ case MESA_FORMAT_A1R5G5B5_UNORM:
unpack_ubyte_ARGB1555_REV(src, dst, n);
break;
- case MESA_FORMAT_AL44:
+ case MESA_FORMAT_L4A4_UNORM:
unpack_ubyte_AL44(src, dst, n);
break;
- case MESA_FORMAT_AL88:
+ case MESA_FORMAT_L8A8_UNORM:
unpack_ubyte_AL88(src, dst, n);
break;
- case MESA_FORMAT_AL88_REV:
+ case MESA_FORMAT_A8L8_UNORM:
unpack_ubyte_AL88_REV(src, dst, n);
break;
- case MESA_FORMAT_RGB332:
+ case MESA_FORMAT_B2G3R3_UNORM:
unpack_ubyte_RGB332(src, dst, n);
break;
case MESA_FORMAT_A_UNORM8:
@@ -2992,10 +2992,10 @@ _mesa_unpack_ubyte_rgba_row(mesa_format format, GLuint n,
case MESA_FORMAT_R_UNORM8:
unpack_ubyte_R8(src, dst, n);
break;
- case MESA_FORMAT_GR88:
+ case MESA_FORMAT_R8G8_UNORM:
unpack_ubyte_GR88(src, dst, n);
break;
- case MESA_FORMAT_RG88:
+ case MESA_FORMAT_G8R8_UNORM:
unpack_ubyte_RG88(src, dst, n);
break;
default:
@@ -3806,15 +3806,15 @@ _mesa_unpack_uint_rgba_row(mesa_format format, GLuint n,
unpack_int_rgba_INTENSITY_INT8(src, dst, n);
break;
- case MESA_FORMAT_ARGB2101010_UINT:
+ case MESA_FORMAT_B10G10R10A2_UINT:
unpack_int_rgba_ARGB2101010_UINT(src, dst, n);
break;
- case MESA_FORMAT_ABGR2101010_UINT:
+ case MESA_FORMAT_R10G10B10A2_UINT:
unpack_int_rgba_ABGR2101010_UINT(src, dst, n);
break;
- case MESA_FORMAT_ARGB2101010:
+ case MESA_FORMAT_B10G10R10A2_UNORM:
unpack_int_rgba_ARGB2101010(src, dst, n);
break;
@@ -3839,7 +3839,7 @@ _mesa_unpack_uint_rgba_row(mesa_format format, GLuint n,
unpack_int_rgba_XBGR32323232_UINT(src, dst, n);
break;
- case MESA_FORMAT_ABGR2101010:
+ case MESA_FORMAT_R10G10B10A2_UNORM:
unpack_int_rgba_ABGR2101010(src, dst, n);
break;
@@ -3970,12 +3970,12 @@ _mesa_unpack_float_z_row(mesa_format format, GLuint n,
unpack_float_z_func unpack;
switch (format) {
- case MESA_FORMAT_Z24_S8:
- case MESA_FORMAT_Z24_X8:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
+ case MESA_FORMAT_X8Z24_UNORM:
unpack = unpack_float_z_Z24_X8;
break;
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_X8_Z24:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
unpack = unpack_float_z_X8_Z24;
break;
case MESA_FORMAT_Z_UNORM16:
@@ -3987,7 +3987,7 @@ _mesa_unpack_float_z_row(mesa_format format, GLuint n,
case MESA_FORMAT_Z_FLOAT32:
unpack = unpack_float_z_Z32F;
break;
- case MESA_FORMAT_Z32_FLOAT_X24S8:
+ case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
unpack = unpack_float_z_Z32X24S8;
break;
default:
@@ -4075,12 +4075,12 @@ _mesa_unpack_uint_z_row(mesa_format format, GLuint n,
const GLubyte *srcPtr = (GLubyte *) src;
switch (format) {
- case MESA_FORMAT_Z24_S8:
- case MESA_FORMAT_Z24_X8:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
+ case MESA_FORMAT_X8Z24_UNORM:
unpack = unpack_uint_z_Z24_X8;
break;
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_X8_Z24:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
unpack = unpack_uint_z_X8_Z24;
break;
case MESA_FORMAT_Z_UNORM16:
@@ -4092,7 +4092,7 @@ _mesa_unpack_uint_z_row(mesa_format format, GLuint n,
case MESA_FORMAT_Z_FLOAT32:
unpack = unpack_uint_z_Z32_FLOAT;
break;
- case MESA_FORMAT_Z32_FLOAT_X24S8:
+ case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
unpack = unpack_uint_z_Z32_FLOAT_X24S8;
break;
default:
@@ -4149,13 +4149,13 @@ _mesa_unpack_ubyte_stencil_row(mesa_format format, GLuint n,
case MESA_FORMAT_S_UINT8:
unpack_ubyte_s_S8(src, dst, n);
break;
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
unpack_ubyte_s_Z24_S8(src, dst, n);
break;
- case MESA_FORMAT_S8_Z24:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
unpack_ubyte_s_S8_Z24(src, dst, n);
break;
- case MESA_FORMAT_Z32_FLOAT_X24S8:
+ case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
unpack_ubyte_s_Z32_FLOAT_X24S8(src, dst, n);
break;
default:
@@ -4187,10 +4187,10 @@ _mesa_unpack_uint_24_8_depth_stencil_row(mesa_format format, GLuint n,
const void *src, GLuint *dst)
{
switch (format) {
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
unpack_uint_24_8_depth_stencil_Z24_S8(src, dst, n);
break;
- case MESA_FORMAT_S8_Z24:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
unpack_uint_24_8_depth_stencil_S8_Z24(src, dst, n);
break;
default:
diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c
index 99d1e189d8d..1ca2aa3b080 100644
--- a/src/mesa/main/formats.c
+++ b/src/mesa/main/formats.c
@@ -178,8 +178,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 3 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_RGB565, /* Name */
- "MESA_FORMAT_RGB565", /* StrName */
+ MESA_FORMAT_B5G6R5_UNORM, /* Name */
+ "MESA_FORMAT_B5G6R5_UNORM", /* StrName */
GL_RGB, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
5, 6, 5, 0, /* Red/Green/Blue/AlphaBits */
@@ -187,8 +187,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 2 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_RGB565_REV, /* Name */
- "MESA_FORMAT_RGB565_REV", /* StrName */
+ MESA_FORMAT_R5G6B5_UNORM, /* Name */
+ "MESA_FORMAT_R5G6B5_UNORM", /* StrName */
GL_RGB, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
5, 6, 5, 0, /* Red/Green/Blue/AlphaBits */
@@ -196,8 +196,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 2 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_ARGB4444, /* Name */
- "MESA_FORMAT_ARGB4444", /* StrName */
+ MESA_FORMAT_B4G4R4A4_UNORM, /* Name */
+ "MESA_FORMAT_B4G4R4A4_UNORM", /* StrName */
GL_RGBA, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
4, 4, 4, 4, /* Red/Green/Blue/AlphaBits */
@@ -205,8 +205,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 2 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_ARGB4444_REV, /* Name */
- "MESA_FORMAT_ARGB4444_REV", /* StrName */
+ MESA_FORMAT_A4R4G4B4_UNORM, /* Name */
+ "MESA_FORMAT_A4R4G4B4_UNORM", /* StrName */
GL_RGBA, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
4, 4, 4, 4, /* Red/Green/Blue/AlphaBits */
@@ -214,8 +214,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 2 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_RGBA5551, /* Name */
- "MESA_FORMAT_RGBA5551", /* StrName */
+ MESA_FORMAT_A1B5G5R5_UNORM, /* Name */
+ "MESA_FORMAT_A1B5G5R5_UNORM", /* StrName */
GL_RGBA, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
5, 5, 5, 1, /* Red/Green/Blue/AlphaBits */
@@ -223,8 +223,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 2 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_ARGB1555, /* Name */
- "MESA_FORMAT_ARGB1555", /* StrName */
+ MESA_FORMAT_B5G5R5A1_UNORM, /* Name */
+ "MESA_FORMAT_B5G5R5A1_UNORM", /* StrName */
GL_RGBA, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
5, 5, 5, 1, /* Red/Green/Blue/AlphaBits */
@@ -232,8 +232,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 2 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_ARGB1555_REV, /* Name */
- "MESA_FORMAT_ARGB1555_REV", /* StrName */
+ MESA_FORMAT_A1R5G5B5_UNORM, /* Name */
+ "MESA_FORMAT_A1R5G5B5_UNORM", /* StrName */
GL_RGBA, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
5, 5, 5, 1, /* Red/Green/Blue/AlphaBits */
@@ -241,8 +241,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 2 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_AL44, /* Name */
- "MESA_FORMAT_AL44", /* StrName */
+ MESA_FORMAT_L4A4_UNORM, /* Name */
+ "MESA_FORMAT_L4A4_UNORM", /* StrName */
GL_LUMINANCE_ALPHA, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
0, 0, 0, 4, /* Red/Green/Blue/AlphaBits */
@@ -250,8 +250,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 1 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_AL88, /* Name */
- "MESA_FORMAT_AL88", /* StrName */
+ MESA_FORMAT_L8A8_UNORM, /* Name */
+ "MESA_FORMAT_L8A8_UNORM", /* StrName */
GL_LUMINANCE_ALPHA, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
0, 0, 0, 8, /* Red/Green/Blue/AlphaBits */
@@ -259,8 +259,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 2 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_AL88_REV, /* Name */
- "MESA_FORMAT_AL88_REV", /* StrName */
+ MESA_FORMAT_A8L8_UNORM, /* Name */
+ "MESA_FORMAT_A8L8_UNORM", /* StrName */
GL_LUMINANCE_ALPHA, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
0, 0, 0, 8, /* Red/Green/Blue/AlphaBits */
@@ -268,8 +268,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 2 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_AL1616, /* Name */
- "MESA_FORMAT_AL1616", /* StrName */
+ MESA_FORMAT_L16A16_UNORM, /* Name */
+ "MESA_FORMAT_L16A16_UNORM", /* StrName */
GL_LUMINANCE_ALPHA, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
0, 0, 0, 16, /* Red/Green/Blue/AlphaBits */
@@ -277,8 +277,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_AL1616_REV, /* Name */
- "MESA_FORMAT_AL1616_REV", /* StrName */
+ MESA_FORMAT_A16L16_UNORM, /* Name */
+ "MESA_FORMAT_A16L16_UNORM", /* StrName */
GL_LUMINANCE_ALPHA, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
0, 0, 0, 16, /* Red/Green/Blue/AlphaBits */
@@ -286,8 +286,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_RGB332, /* Name */
- "MESA_FORMAT_RGB332", /* StrName */
+ MESA_FORMAT_B2G3R3_UNORM, /* Name */
+ "MESA_FORMAT_B2G3R3_UNORM", /* StrName */
GL_RGB, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
3, 3, 2, 0, /* Red/Green/Blue/AlphaBits */
@@ -376,8 +376,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 1
},
{
- MESA_FORMAT_GR88,
- "MESA_FORMAT_GR88",
+ MESA_FORMAT_R8G8_UNORM,
+ "MESA_FORMAT_R8G8_UNORM",
GL_RG,
GL_UNSIGNED_NORMALIZED,
8, 8, 0, 0,
@@ -385,8 +385,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 2
},
{
- MESA_FORMAT_RG88,
- "MESA_FORMAT_RG88",
+ MESA_FORMAT_G8R8_UNORM,
+ "MESA_FORMAT_G8R8_UNORM",
GL_RG,
GL_UNSIGNED_NORMALIZED,
8, 8, 0, 0,
@@ -403,8 +403,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 2
},
{
- MESA_FORMAT_GR1616,
- "MESA_FORMAT_GR1616",
+ MESA_FORMAT_R16G16_UNORM,
+ "MESA_FORMAT_R16G16_UNORM",
GL_RG,
GL_UNSIGNED_NORMALIZED,
16, 16, 0, 0,
@@ -412,8 +412,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4
},
{
- MESA_FORMAT_RG1616,
- "MESA_FORMAT_RG1616",
+ MESA_FORMAT_G16R16_UNORM,
+ "MESA_FORMAT_G16R16_UNORM",
GL_RG,
GL_UNSIGNED_NORMALIZED,
16, 16, 0, 0,
@@ -421,8 +421,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4
},
{
- MESA_FORMAT_ARGB2101010,
- "MESA_FORMAT_ARGB2101010",
+ MESA_FORMAT_B10G10R10A2_UNORM,
+ "MESA_FORMAT_B10G10R10A2_UNORM",
GL_RGBA,
GL_UNSIGNED_NORMALIZED,
10, 10, 10, 2,
@@ -430,8 +430,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4
},
{
- MESA_FORMAT_Z24_S8, /* Name */
- "MESA_FORMAT_Z24_S8", /* StrName */
+ MESA_FORMAT_S8_UINT_Z24_UNORM, /* Name */
+ "MESA_FORMAT_S8_UINT_Z24_UNORM", /* StrName */
GL_DEPTH_STENCIL, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
0, 0, 0, 0, /* Red/Green/Blue/AlphaBits */
@@ -439,8 +439,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_S8_Z24, /* Name */
- "MESA_FORMAT_S8_Z24", /* StrName */
+ MESA_FORMAT_Z24_UNORM_X8_UINT, /* Name */
+ "MESA_FORMAT_Z24_UNORM_X8_UINT", /* StrName */
GL_DEPTH_STENCIL, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
0, 0, 0, 0, /* Red/Green/Blue/AlphaBits */
@@ -457,8 +457,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 2 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_X8_Z24, /* Name */
- "MESA_FORMAT_X8_Z24", /* StrName */
+ MESA_FORMAT_Z24_UNORM_S8_UINT, /* Name */
+ "MESA_FORMAT_Z24_UNORM_S8_UINT", /* StrName */
GL_DEPTH_COMPONENT, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
0, 0, 0, 0, /* Red/Green/Blue/AlphaBits */
@@ -466,8 +466,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_Z24_X8, /* Name */
- "MESA_FORMAT_Z24_X8", /* StrName */
+ MESA_FORMAT_X8Z24_UNORM, /* Name */
+ "MESA_FORMAT_X8Z24_UNORM", /* StrName */
GL_DEPTH_COMPONENT, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
0, 0, 0, 0, /* Red/Green/Blue/AlphaBits */
@@ -502,8 +502,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 3
},
{
- MESA_FORMAT_SRGBA8,
- "MESA_FORMAT_SRGBA8",
+ MESA_FORMAT_A8B8G8R8_SRGB,
+ "MESA_FORMAT_A8B8G8R8_SRGB",
GL_RGBA,
GL_UNSIGNED_NORMALIZED,
8, 8, 8, 8,
@@ -511,8 +511,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4
},
{
- MESA_FORMAT_SARGB8,
- "MESA_FORMAT_SARGB8",
+ MESA_FORMAT_B8G8R8A8_SRGB,
+ "MESA_FORMAT_B8G8R8A8_SRGB",
GL_RGBA,
GL_UNSIGNED_NORMALIZED,
8, 8, 8, 8,
@@ -529,8 +529,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 1
},
{
- MESA_FORMAT_SLA8,
- "MESA_FORMAT_SLA8",
+ MESA_FORMAT_L8A8_SRGB,
+ "MESA_FORMAT_L8A8_SRGB",
GL_LUMINANCE_ALPHA,
GL_UNSIGNED_NORMALIZED,
0, 0, 0, 8,
@@ -1571,7 +1571,7 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 2
},
{
- MESA_FORMAT_RGB9_E5_FLOAT,
+ MESA_FORMAT_R9G9B9E5_FLOAT,
"MESA_FORMAT_RGB9_E5",
GL_RGB,
GL_FLOAT,
@@ -1580,8 +1580,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4
},
{
- MESA_FORMAT_R11_G11_B10_FLOAT,
- "MESA_FORMAT_R11_G11_B10_FLOAT",
+ MESA_FORMAT_R11G11B10_FLOAT,
+ "MESA_FORMAT_R11G11B10_FLOAT",
GL_RGB,
GL_FLOAT,
11, 11, 10, 0,
@@ -1599,8 +1599,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_Z32_FLOAT_X24S8, /* Name */
- "MESA_FORMAT_Z32_FLOAT_X24S8", /* StrName */
+ MESA_FORMAT_Z32_FLOAT_S8X24_UINT, /* Name */
+ "MESA_FORMAT_Z32_FLOAT_S8X24_UINT", /* StrName */
GL_DEPTH_STENCIL, /* BaseFormat */
/* DataType here is used to answer GL_TEXTURE_DEPTH_TYPE queries, and is
* never used for stencil because stencil is always GL_UNSIGNED_INT.
@@ -1611,8 +1611,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 8 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_ARGB2101010_UINT,
- "MESA_FORMAT_ARGB2101010_UINT",
+ MESA_FORMAT_B10G10R10A2_UINT,
+ "MESA_FORMAT_B10G10R10A2_UINT",
GL_RGBA,
GL_UNSIGNED_INT,
10, 10, 10, 2,
@@ -1620,8 +1620,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4
},
{
- MESA_FORMAT_ABGR2101010_UINT,
- "MESA_FORMAT_ABGR2101010_UINT",
+ MESA_FORMAT_R10G10B10A2_UINT,
+ "MESA_FORMAT_R10G10B10A2_UINT",
GL_RGBA,
GL_UNSIGNED_INT,
10, 10, 10, 2,
@@ -1629,8 +1629,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4
},
{
- MESA_FORMAT_XRGB4444_UNORM,
- "MESA_FORMAT_XRGB4444_UNORM",
+ MESA_FORMAT_B4G4R4X4_UNORM,
+ "MESA_FORMAT_B4G4R4X4_UNORM",
GL_RGB,
GL_UNSIGNED_NORMALIZED,
4, 4, 4, 0,
@@ -1638,8 +1638,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 2
},
{
- MESA_FORMAT_XRGB1555_UNORM,
- "MESA_FORMAT_XRGB1555_UNORM",
+ MESA_FORMAT_B5G5R5X1_UNORM,
+ "MESA_FORMAT_B5G5R5X1_UNORM",
GL_RGB,
GL_UNSIGNED_NORMALIZED,
5, 5, 5, 0,
@@ -1647,8 +1647,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 2
},
{
- MESA_FORMAT_XBGR8888_SNORM,
- "MESA_FORMAT_XBGR8888_SNORM",
+ MESA_FORMAT_R8G8B8X8_SNORM,
+ "MESA_FORMAT_R8G8B8X8_SNORM",
GL_RGB,
GL_SIGNED_NORMALIZED,
8, 8, 8, 0,
@@ -1656,8 +1656,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4
},
{
- MESA_FORMAT_XBGR8888_SRGB,
- "MESA_FORMAT_XBGR8888_SRGB",
+ MESA_FORMAT_R8G8B8X8_SRGB,
+ "MESA_FORMAT_R8G8B8X8_SRGB",
GL_RGB,
GL_UNSIGNED_NORMALIZED,
8, 8, 8, 0,
@@ -1683,8 +1683,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4
},
{
- MESA_FORMAT_XRGB2101010_UNORM,
- "MESA_FORMAT_XRGB2101010_UNORM",
+ MESA_FORMAT_B10G10R10X2_UNORM,
+ "MESA_FORMAT_B10G10R10X2_UNORM",
GL_RGB,
GL_UNSIGNED_NORMALIZED,
10, 10, 10, 0,
@@ -1764,8 +1764,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 16
},
{
- MESA_FORMAT_ABGR2101010,
- "MESA_FORMAT_ABGR2101010",
+ MESA_FORMAT_R10G10B10A2_UNORM,
+ "MESA_FORMAT_R10G10B10A2_UNORM",
GL_RGBA,
GL_UNSIGNED_NORMALIZED,
10, 10, 10, 2,
@@ -1999,8 +1999,8 @@ _mesa_is_format_unsigned(mesa_format format)
GLboolean
_mesa_is_format_signed(mesa_format format)
{
- if (format == MESA_FORMAT_R11_G11_B10_FLOAT ||
- format == MESA_FORMAT_RGB9_E5_FLOAT) {
+ if (format == MESA_FORMAT_R11G11B10_FLOAT ||
+ format == MESA_FORMAT_R9G9B9E5_FLOAT) {
/* these packed float formats only store unsigned values */
return GL_FALSE;
}
@@ -2023,15 +2023,15 @@ _mesa_get_format_color_encoding(mesa_format format)
/* XXX this info should be encoded in gl_format_info */
switch (format) {
case MESA_FORMAT_BGR_SRGB8:
- case MESA_FORMAT_SRGBA8:
- case MESA_FORMAT_SARGB8:
+ case MESA_FORMAT_A8B8G8R8_SRGB:
+ case MESA_FORMAT_B8G8R8A8_SRGB:
case MESA_FORMAT_L_SRGB8:
- case MESA_FORMAT_SLA8:
+ case MESA_FORMAT_L8A8_SRGB:
case MESA_FORMAT_SRGB_DXT1:
case MESA_FORMAT_SRGBA_DXT1:
case MESA_FORMAT_SRGBA_DXT3:
case MESA_FORMAT_SRGBA_DXT5:
- case MESA_FORMAT_XBGR8888_SRGB:
+ case MESA_FORMAT_R8G8B8X8_SRGB:
case MESA_FORMAT_ETC2_SRGB8:
case MESA_FORMAT_ETC2_SRGB8_ALPHA8_EAC:
case MESA_FORMAT_ETC2_SRGB8_PUNCHTHROUGH_ALPHA1:
@@ -2053,17 +2053,17 @@ _mesa_get_srgb_format_linear(mesa_format format)
case MESA_FORMAT_BGR_SRGB8:
format = MESA_FORMAT_BGR_UNORM8;
break;
- case MESA_FORMAT_SRGBA8:
+ case MESA_FORMAT_A8B8G8R8_SRGB:
format = MESA_FORMAT_A8B8G8R8_UNORM;
break;
- case MESA_FORMAT_SARGB8:
+ case MESA_FORMAT_B8G8R8A8_SRGB:
format = MESA_FORMAT_B8G8R8A8_UNORM;
break;
case MESA_FORMAT_L_SRGB8:
format = MESA_FORMAT_L_UNORM8;
break;
- case MESA_FORMAT_SLA8:
- format = MESA_FORMAT_AL88;
+ case MESA_FORMAT_L8A8_SRGB:
+ format = MESA_FORMAT_L8A8_UNORM;
break;
case MESA_FORMAT_SRGB_DXT1:
format = MESA_FORMAT_RGB_DXT1;
@@ -2077,7 +2077,7 @@ _mesa_get_srgb_format_linear(mesa_format format)
case MESA_FORMAT_SRGBA_DXT5:
format = MESA_FORMAT_RGBA_DXT5;
break;
- case MESA_FORMAT_XBGR8888_SRGB:
+ case MESA_FORMAT_R8G8B8X8_SRGB:
format = MESA_FORMAT_R8G8B8X8_UNORM;
break;
case MESA_FORMAT_ETC2_SRGB8:
@@ -2125,7 +2125,7 @@ _mesa_get_uncompressed_format(mesa_format format)
case MESA_FORMAT_SIGNED_RED_RGTC1:
return MESA_FORMAT_SIGNED_R8;
case MESA_FORMAT_RG_RGTC2:
- return MESA_FORMAT_GR88;
+ return MESA_FORMAT_R8G8_UNORM;
case MESA_FORMAT_SIGNED_RG_RGTC2:
return MESA_FORMAT_SIGNED_RG88_REV;
case MESA_FORMAT_L_LATC1:
@@ -2133,7 +2133,7 @@ _mesa_get_uncompressed_format(mesa_format format)
case MESA_FORMAT_SIGNED_L_LATC1:
return MESA_FORMAT_SIGNED_L8;
case MESA_FORMAT_LA_LATC2:
- return MESA_FORMAT_AL88;
+ return MESA_FORMAT_L8A8_UNORM;
case MESA_FORMAT_SIGNED_LA_LATC2:
return MESA_FORMAT_SIGNED_AL88;
case MESA_FORMAT_ETC1_RGB8:
@@ -2150,7 +2150,7 @@ _mesa_get_uncompressed_format(mesa_format format)
return MESA_FORMAT_R_UNORM16;
case MESA_FORMAT_ETC2_RG11_EAC:
case MESA_FORMAT_ETC2_SIGNED_RG11_EAC:
- return MESA_FORMAT_GR1616;
+ return MESA_FORMAT_R16G16_UNORM;
default:
#ifdef DEBUG
assert(!_mesa_is_format_compressed(format));
@@ -2388,53 +2388,53 @@ _mesa_format_to_type_and_comps(mesa_format format,
*datatype = GL_UNSIGNED_BYTE;
*comps = 3;
return;
- case MESA_FORMAT_RGB565:
- case MESA_FORMAT_RGB565_REV:
+ case MESA_FORMAT_B5G6R5_UNORM:
+ case MESA_FORMAT_R5G6B5_UNORM:
*datatype = GL_UNSIGNED_SHORT_5_6_5;
*comps = 3;
return;
- case MESA_FORMAT_ARGB4444:
- case MESA_FORMAT_ARGB4444_REV:
- case MESA_FORMAT_XRGB4444_UNORM:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
+ case MESA_FORMAT_A4R4G4B4_UNORM:
+ case MESA_FORMAT_B4G4R4X4_UNORM:
*datatype = GL_UNSIGNED_SHORT_4_4_4_4;
*comps = 4;
return;
- case MESA_FORMAT_ARGB1555:
- case MESA_FORMAT_ARGB1555_REV:
- case MESA_FORMAT_XRGB1555_UNORM:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
+ case MESA_FORMAT_A1R5G5B5_UNORM:
+ case MESA_FORMAT_B5G5R5X1_UNORM:
*datatype = GL_UNSIGNED_SHORT_1_5_5_5_REV;
*comps = 4;
return;
- case MESA_FORMAT_ARGB2101010:
+ case MESA_FORMAT_B10G10R10A2_UNORM:
*datatype = GL_UNSIGNED_INT_2_10_10_10_REV;
*comps = 4;
return;
- case MESA_FORMAT_RGBA5551:
+ case MESA_FORMAT_A1B5G5R5_UNORM:
*datatype = GL_UNSIGNED_SHORT_5_5_5_1;
*comps = 4;
return;
- case MESA_FORMAT_AL44:
+ case MESA_FORMAT_L4A4_UNORM:
*datatype = MESA_UNSIGNED_BYTE_4_4;
*comps = 2;
return;
- case MESA_FORMAT_AL88:
- case MESA_FORMAT_AL88_REV:
- case MESA_FORMAT_GR88:
- case MESA_FORMAT_RG88:
+ case MESA_FORMAT_L8A8_UNORM:
+ case MESA_FORMAT_A8L8_UNORM:
+ case MESA_FORMAT_R8G8_UNORM:
+ case MESA_FORMAT_G8R8_UNORM:
*datatype = GL_UNSIGNED_BYTE;
*comps = 2;
return;
- case MESA_FORMAT_AL1616:
- case MESA_FORMAT_AL1616_REV:
- case MESA_FORMAT_GR1616:
- case MESA_FORMAT_RG1616:
+ case MESA_FORMAT_L16A16_UNORM:
+ case MESA_FORMAT_A16L16_UNORM:
+ case MESA_FORMAT_R16G16_UNORM:
+ case MESA_FORMAT_G16R16_UNORM:
*datatype = GL_UNSIGNED_SHORT;
*comps = 2;
return;
@@ -2447,7 +2447,7 @@ _mesa_format_to_type_and_comps(mesa_format format,
*comps = 1;
return;
- case MESA_FORMAT_RGB332:
+ case MESA_FORMAT_B2G3R3_UNORM:
*datatype = GL_UNSIGNED_BYTE_3_3_2;
*comps = 3;
return;
@@ -2467,12 +2467,12 @@ _mesa_format_to_type_and_comps(mesa_format format,
*comps = 2;
return;
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
*datatype = GL_UNSIGNED_INT_24_8_MESA;
*comps = 2;
return;
- case MESA_FORMAT_S8_Z24:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
*datatype = GL_UNSIGNED_INT_8_24_REV_MESA;
*comps = 2;
return;
@@ -2482,12 +2482,12 @@ _mesa_format_to_type_and_comps(mesa_format format,
*comps = 1;
return;
- case MESA_FORMAT_X8_Z24:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
*datatype = GL_UNSIGNED_INT;
*comps = 1;
return;
- case MESA_FORMAT_Z24_X8:
+ case MESA_FORMAT_X8Z24_UNORM:
*datatype = GL_UNSIGNED_INT;
*comps = 1;
return;
@@ -2502,7 +2502,7 @@ _mesa_format_to_type_and_comps(mesa_format format,
*comps = 1;
return;
- case MESA_FORMAT_Z32_FLOAT_X24S8:
+ case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
*datatype = GL_FLOAT_32_UNSIGNED_INT_24_8_REV;
*comps = 1;
return;
@@ -2561,8 +2561,8 @@ _mesa_format_to_type_and_comps(mesa_format format,
*datatype = GL_UNSIGNED_BYTE;
*comps = 3;
return;
- case MESA_FORMAT_SRGBA8:
- case MESA_FORMAT_SARGB8:
+ case MESA_FORMAT_A8B8G8R8_SRGB:
+ case MESA_FORMAT_B8G8R8A8_SRGB:
*datatype = GL_UNSIGNED_BYTE;
*comps = 4;
return;
@@ -2570,7 +2570,7 @@ _mesa_format_to_type_and_comps(mesa_format format,
*datatype = GL_UNSIGNED_BYTE;
*comps = 1;
return;
- case MESA_FORMAT_SLA8:
+ case MESA_FORMAT_L8A8_SRGB:
*datatype = GL_UNSIGNED_BYTE;
*comps = 2;
return;
@@ -2815,35 +2815,35 @@ _mesa_format_to_type_and_comps(mesa_format format,
*comps = 4;
return;
- case MESA_FORMAT_RGB9_E5_FLOAT:
+ case MESA_FORMAT_R9G9B9E5_FLOAT:
*datatype = GL_UNSIGNED_INT_5_9_9_9_REV;
*comps = 3;
return;
- case MESA_FORMAT_R11_G11_B10_FLOAT:
+ case MESA_FORMAT_R11G11B10_FLOAT:
*datatype = GL_UNSIGNED_INT_10F_11F_11F_REV;
*comps = 3;
return;
- case MESA_FORMAT_ARGB2101010_UINT:
- case MESA_FORMAT_ABGR2101010_UINT:
+ case MESA_FORMAT_B10G10R10A2_UINT:
+ case MESA_FORMAT_R10G10B10A2_UINT:
*datatype = GL_UNSIGNED_INT_2_10_10_10_REV;
*comps = 4;
return;
- case MESA_FORMAT_XBGR8888_SRGB:
+ case MESA_FORMAT_R8G8B8X8_SRGB:
case MESA_FORMAT_RGBX_UINT8:
*datatype = GL_UNSIGNED_BYTE;
*comps = 4;
return;
- case MESA_FORMAT_XBGR8888_SNORM:
+ case MESA_FORMAT_R8G8B8X8_SNORM:
case MESA_FORMAT_RGBX_SINT8:
*datatype = GL_BYTE;
*comps = 4;
return;
- case MESA_FORMAT_XRGB2101010_UNORM:
+ case MESA_FORMAT_B10G10R10X2_UNORM:
*datatype = GL_UNSIGNED_INT_2_10_10_10_REV;
*comps = 4;
return;
@@ -2880,7 +2880,7 @@ _mesa_format_to_type_and_comps(mesa_format format,
*comps = 4;
return;
- case MESA_FORMAT_ABGR2101010:
+ case MESA_FORMAT_R10G10B10A2_UNORM:
*datatype = GL_UNSIGNED_INT_2_10_10_10_REV;
*comps = 4;
return;
@@ -2943,7 +2943,7 @@ _mesa_format_matches_format_and_type(mesa_format mesa_format,
return GL_FALSE;
case MESA_FORMAT_A8B8G8R8_UNORM:
- case MESA_FORMAT_SRGBA8:
+ case MESA_FORMAT_A8B8G8R8_SRGB:
if (format == GL_RGBA && type == GL_UNSIGNED_INT_8_8_8_8 && !swapBytes)
return GL_TRUE;
@@ -2991,7 +2991,7 @@ _mesa_format_matches_format_and_type(mesa_format mesa_format,
return GL_FALSE;
case MESA_FORMAT_B8G8R8A8_UNORM:
- case MESA_FORMAT_SARGB8:
+ case MESA_FORMAT_B8G8R8A8_SRGB:
if (format == GL_BGRA && type == GL_UNSIGNED_INT_8_8_8_8_REV &&
!swapBytes)
return GL_TRUE;
@@ -3032,48 +3032,48 @@ _mesa_format_matches_format_and_type(mesa_format mesa_format,
case MESA_FORMAT_RGB_UNORM8:
return format == GL_RGB && type == GL_UNSIGNED_BYTE && littleEndian;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
return format == GL_RGB && type == GL_UNSIGNED_SHORT_5_6_5 && !swapBytes;
- case MESA_FORMAT_RGB565_REV:
+ case MESA_FORMAT_R5G6B5_UNORM:
/* Some of the 16-bit MESA_FORMATs that would seem to correspond to
* GL_UNSIGNED_SHORT_* are byte-swapped instead of channel-reversed,
* according to formats.h, so they can't be matched.
*/
return GL_FALSE;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
return format == GL_BGRA && type == GL_UNSIGNED_SHORT_4_4_4_4_REV &&
!swapBytes;
- case MESA_FORMAT_ARGB4444_REV:
+ case MESA_FORMAT_A4R4G4B4_UNORM:
return GL_FALSE;
- case MESA_FORMAT_RGBA5551:
+ case MESA_FORMAT_A1B5G5R5_UNORM:
return format == GL_RGBA && type == GL_UNSIGNED_SHORT_5_5_5_1 &&
!swapBytes;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
return format == GL_BGRA && type == GL_UNSIGNED_SHORT_1_5_5_5_REV &&
!swapBytes;
- case MESA_FORMAT_ARGB1555_REV:
+ case MESA_FORMAT_A1R5G5B5_UNORM:
return GL_FALSE;
- case MESA_FORMAT_AL44:
+ case MESA_FORMAT_L4A4_UNORM:
return GL_FALSE;
- case MESA_FORMAT_AL88:
- case MESA_FORMAT_SLA8:
+ case MESA_FORMAT_L8A8_UNORM:
+ case MESA_FORMAT_L8A8_SRGB:
return format == GL_LUMINANCE_ALPHA && type == GL_UNSIGNED_BYTE && littleEndian;
- case MESA_FORMAT_AL88_REV:
+ case MESA_FORMAT_A8L8_UNORM:
return GL_FALSE;
- case MESA_FORMAT_AL1616:
+ case MESA_FORMAT_L16A16_UNORM:
return format == GL_LUMINANCE_ALPHA && type == GL_UNSIGNED_SHORT && littleEndian && !swapBytes;
- case MESA_FORMAT_AL1616_REV:
+ case MESA_FORMAT_A16L16_UNORM:
return GL_FALSE;
- case MESA_FORMAT_RGB332:
+ case MESA_FORMAT_B2G3R3_UNORM:
return format == GL_RGB && type == GL_UNSIGNED_BYTE_3_3_2;
case MESA_FORMAT_A_UNORM8:
@@ -3101,36 +3101,36 @@ _mesa_format_matches_format_and_type(mesa_format mesa_format,
case MESA_FORMAT_R_UNORM8:
return format == GL_RED && type == GL_UNSIGNED_BYTE;
- case MESA_FORMAT_GR88:
+ case MESA_FORMAT_R8G8_UNORM:
return format == GL_RG && type == GL_UNSIGNED_BYTE && littleEndian;
- case MESA_FORMAT_RG88:
+ case MESA_FORMAT_G8R8_UNORM:
return GL_FALSE;
case MESA_FORMAT_R_UNORM16:
return format == GL_RED && type == GL_UNSIGNED_SHORT &&
!swapBytes;
- case MESA_FORMAT_GR1616:
+ case MESA_FORMAT_R16G16_UNORM:
return format == GL_RG && type == GL_UNSIGNED_SHORT && littleEndian &&
!swapBytes;
- case MESA_FORMAT_RG1616:
+ case MESA_FORMAT_G16R16_UNORM:
return GL_FALSE;
- case MESA_FORMAT_ARGB2101010:
+ case MESA_FORMAT_B10G10R10A2_UNORM:
return format == GL_BGRA && type == GL_UNSIGNED_INT_2_10_10_10_REV &&
!swapBytes;
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
return format == GL_DEPTH_STENCIL && type == GL_UNSIGNED_INT_24_8 &&
!swapBytes;
- case MESA_FORMAT_Z24_X8:
- case MESA_FORMAT_S8_Z24:
+ case MESA_FORMAT_X8Z24_UNORM:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
return GL_FALSE;
case MESA_FORMAT_Z_UNORM16:
return format == GL_DEPTH_COMPONENT && type == GL_UNSIGNED_SHORT &&
!swapBytes;
- case MESA_FORMAT_X8_Z24:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
return GL_FALSE;
case MESA_FORMAT_Z_UNORM32:
@@ -3395,38 +3395,38 @@ _mesa_format_matches_format_and_type(mesa_format mesa_format,
return format == GL_INTENSITY && type == GL_SHORT && littleEndian &&
!swapBytes;
- case MESA_FORMAT_ARGB2101010_UINT:
+ case MESA_FORMAT_B10G10R10A2_UINT:
return (format == GL_BGRA_INTEGER_EXT &&
type == GL_UNSIGNED_INT_2_10_10_10_REV &&
!swapBytes);
- case MESA_FORMAT_ABGR2101010_UINT:
+ case MESA_FORMAT_R10G10B10A2_UINT:
return (format == GL_RGBA_INTEGER_EXT &&
type == GL_UNSIGNED_INT_2_10_10_10_REV &&
!swapBytes);
- case MESA_FORMAT_RGB9_E5_FLOAT:
+ case MESA_FORMAT_R9G9B9E5_FLOAT:
return format == GL_RGB && type == GL_UNSIGNED_INT_5_9_9_9_REV &&
!swapBytes;
- case MESA_FORMAT_R11_G11_B10_FLOAT:
+ case MESA_FORMAT_R11G11B10_FLOAT:
return format == GL_RGB && type == GL_UNSIGNED_INT_10F_11F_11F_REV &&
!swapBytes;
case MESA_FORMAT_Z_FLOAT32:
return format == GL_DEPTH_COMPONENT && type == GL_FLOAT && !swapBytes;
- case MESA_FORMAT_Z32_FLOAT_X24S8:
+ case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
return format == GL_DEPTH_STENCIL &&
type == GL_FLOAT_32_UNSIGNED_INT_24_8_REV && !swapBytes;
- case MESA_FORMAT_XRGB4444_UNORM:
- case MESA_FORMAT_XRGB1555_UNORM:
- case MESA_FORMAT_XBGR8888_SNORM:
- case MESA_FORMAT_XBGR8888_SRGB:
+ case MESA_FORMAT_B4G4R4X4_UNORM:
+ case MESA_FORMAT_B5G5R5X1_UNORM:
+ case MESA_FORMAT_R8G8B8X8_SNORM:
+ case MESA_FORMAT_R8G8B8X8_SRGB:
case MESA_FORMAT_RGBX_UINT8:
case MESA_FORMAT_RGBX_SINT8:
- case MESA_FORMAT_XRGB2101010_UNORM:
+ case MESA_FORMAT_B10G10R10X2_UNORM:
case MESA_FORMAT_RGBX_UNORM16:
case MESA_FORMAT_RGBX_SNORM16:
case MESA_FORMAT_RGBX_FLOAT16:
@@ -3437,7 +3437,7 @@ _mesa_format_matches_format_and_type(mesa_format mesa_format,
case MESA_FORMAT_RGBX_SINT32:
return GL_FALSE;
- case MESA_FORMAT_ABGR2101010:
+ case MESA_FORMAT_R10G10B10A2_UNORM:
return format == GL_RGBA && type == GL_UNSIGNED_INT_2_10_10_10_REV &&
!swapBytes;
diff --git a/src/mesa/main/formats.h b/src/mesa/main/formats.h
index 1e3fb8d43f5..f81e29cfa87 100644
--- a/src/mesa/main/formats.h
+++ b/src/mesa/main/formats.h
@@ -348,19 +348,19 @@ typedef enum
MESA_FORMAT_RGB_UNORM8, /* uchar[i * 3] = R, [i * 3 + 1] = G, [i *3 + 2] = B */
/* Type P formats */
- MESA_FORMAT_RGB565, /* RRRR RGGG GGGB BBBB */
- MESA_FORMAT_RGB565_REV, /* GGGB BBBB RRRR RGGG */
- MESA_FORMAT_ARGB4444, /* AAAA RRRR GGGG BBBB */
- MESA_FORMAT_ARGB4444_REV, /* GGGG BBBB AAAA RRRR */
- MESA_FORMAT_RGBA5551, /* RRRR RGGG GGBB BBBA */
- MESA_FORMAT_ARGB1555, /* ARRR RRGG GGGB BBBB */
- MESA_FORMAT_ARGB1555_REV, /* GGGB BBBB ARRR RRGG */
- MESA_FORMAT_AL44, /* AAAA LLLL */
- MESA_FORMAT_AL88, /* AAAA AAAA LLLL LLLL */
- MESA_FORMAT_AL88_REV, /* LLLL LLLL AAAA AAAA */
- MESA_FORMAT_AL1616, /* AAAA AAAA AAAA AAAA LLLL LLLL LLLL LLLL */
- MESA_FORMAT_AL1616_REV, /* LLLL LLLL LLLL LLLL AAAA AAAA AAAA AAAA */
- MESA_FORMAT_RGB332, /* RRRG GGBB */
+ MESA_FORMAT_B5G6R5_UNORM, /* BBBB BGGG GGGR RRRR */
+ MESA_FORMAT_R5G6B5_UNORM, /* RRRR RGGG GGGB BBBB */
+ MESA_FORMAT_B4G4R4A4_UNORM, /* BBBB GGGG RRRR AAAA */
+ MESA_FORMAT_A4R4G4B4_UNORM, /* AAAA RRRR GGGG BBBB */
+ MESA_FORMAT_A1B5G5R5_UNORM, /* ABBB BBGG GGGR RRRR */
+ MESA_FORMAT_B5G5R5A1_UNORM, /* BBBB BGGG GGRR RRRA */
+ MESA_FORMAT_A1R5G5B5_UNORM, /* ARRR RRGG GGGB BBBB */
+ MESA_FORMAT_L4A4_UNORM, /* LLLL AAAA */
+ MESA_FORMAT_L8A8_UNORM, /* LLLL LLLL AAAA AAAA */
+ MESA_FORMAT_A8L8_UNORM, /* AAAA AAAA LLLL LLLL */
+ MESA_FORMAT_L16A16_UNORM, /* LLLL LLLL LLLL LLLL AAAA AAAA AAAA AAAA */
+ MESA_FORMAT_A16L16_UNORM, /* AAAA AAAA AAAA AAAA LLLL LLLL LLLL LLLL */
+ MESA_FORMAT_B2G3R3_UNORM, /* BBGG GRRR */
/* Type A formats */
MESA_FORMAT_A_UNORM8, /* uchar[i] = A */
@@ -371,32 +371,32 @@ typedef enum
MESA_FORMAT_I_UNORM16, /* ushort[i] = I */
/* Type P formats */
- MESA_FORMAT_YCBCR, /* YYYY YYYY UorV UorV */
- MESA_FORMAT_YCBCR_REV, /* UorV UorV YYYY YYYY */
+ MESA_FORMAT_YCBCR, /* YYYY YYYY UorV UorV */
+ MESA_FORMAT_YCBCR_REV, /* UorV UorV YYYY YYYY */
/* Type A format(s) */
MESA_FORMAT_R_UNORM8, /* uchar[i] = R */
/* Type P formats */
- MESA_FORMAT_GR88, /* GGGG GGGG RRRR RRRR */
- MESA_FORMAT_RG88, /* RRRR RRRR GGGG GGGG */
+ MESA_FORMAT_R8G8_UNORM, /* RRRR RRRR GGGG GGGG */
+ MESA_FORMAT_G8R8_UNORM, /* GGGG GGGG RRRR RRRR */
/* Type A format(s) */
MESA_FORMAT_R_UNORM16, /* ushort[i] = R */
/* Type P formats */
- 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 */
+ MESA_FORMAT_R16G16_UNORM, /* RRRR RRRR RRRR RRRR GGGG GGGG GGGG GGGG */
+ MESA_FORMAT_G16R16_UNORM, /* GGGG GGGG GGGG GGGG RRRR RRRR RRRR RRRR */
+ MESA_FORMAT_B10G10R10A2_UNORM,/* BBBB BBBB BBGG GGGG GGGG RRRR RRRR RRAA */
+ MESA_FORMAT_S8_UINT_Z24_UNORM,/* SSSS SSSS ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ */
+ MESA_FORMAT_Z24_UNORM_X8_UINT,/* ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ xxxx xxxx */
/* Type A format(s) */
MESA_FORMAT_Z_UNORM16, /* ushort[i] = Z */
/* Type P formats */
- MESA_FORMAT_X8_Z24, /* xxxx xxxx ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ */
- MESA_FORMAT_Z24_X8, /* ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ xxxx xxxx */
+ MESA_FORMAT_Z24_UNORM_S8_UINT,/* ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ SSSS SSSS */
+ MESA_FORMAT_X8Z24_UNORM, /* xxxx xxxx ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ */
/* Type A formats */
MESA_FORMAT_Z_UNORM32, /* uint[i] = Z */
@@ -411,14 +411,14 @@ typedef enum
MESA_FORMAT_BGR_SRGB8, /* uchar[i * 3] = B, [i * 3 + 1] = G, [i *3 + 2] = R */
/* Type P formats */
- MESA_FORMAT_SRGBA8, /* RRRR RRRR GGGG GGGG BBBB BBBB AAAA AAAA */
- MESA_FORMAT_SARGB8, /* AAAA AAAA RRRR RRRR GGGG GGGG BBBB BBBB */
+ MESA_FORMAT_A8B8G8R8_SRGB, /* AAAA AAAA BBBB BBBB GGGG GGGG RRRR RRRR*/
+ MESA_FORMAT_B8G8R8A8_SRGB, /* BBBB BBBB GGGG GGGG RRRR RRRR AAAA AAAA */
/* Type A format(s) */
MESA_FORMAT_L_SRGB8, /* uchar[i] = L */
/* Type P formats */
- MESA_FORMAT_SLA8, /* AAAA AAAA LLLL LLLL */
+ MESA_FORMAT_L8A8_SRGB, /* LLLL LLLL AAAA AAAA */
/* Type C formats */
MESA_FORMAT_SRGB_DXT1,
@@ -531,8 +531,8 @@ typedef enum
MESA_FORMAT_RGB_UINT32,
MESA_FORMAT_RGBA_UINT32,
- /* msb <------ TEXEL BITS -----------> lsb */
- /* ---- ---- ---- ---- ---- ---- ---- ---- */
+ /* msb <------ TEXEL BITS -----------> lsb */
+ /* ---- ---- ---- ---- ---- ---- ---- ---- */
/**
* \name Signed fixed point texture formats.
*/
@@ -602,31 +602,31 @@ typedef enum
MESA_FORMAT_SIGNED_I16, /* IIII IIII IIII IIII */
/* Type P format(s) */
- MESA_FORMAT_RGB9_E5_FLOAT,
- MESA_FORMAT_R11_G11_B10_FLOAT,
+ MESA_FORMAT_R9G9B9E5_FLOAT,
+ MESA_FORMAT_R11G11B10_FLOAT,
/* Type A format(s) */
MESA_FORMAT_Z_FLOAT32,
/* Type P formats */
- MESA_FORMAT_Z32_FLOAT_X24S8,
+ MESA_FORMAT_Z32_FLOAT_S8X24_UINT,
- MESA_FORMAT_ARGB2101010_UINT,
- MESA_FORMAT_ABGR2101010_UINT,
+ MESA_FORMAT_B10G10R10A2_UINT,
+ MESA_FORMAT_R10G10B10A2_UINT,
- MESA_FORMAT_XRGB4444_UNORM, /* xxxx RRRR GGGG BBBB */
- MESA_FORMAT_XRGB1555_UNORM, /* xRRR RRGG GGGB BBBB */
- MESA_FORMAT_XBGR8888_SNORM, /* xxxx xxxx BBBB BBBB GGGG GGGG RRRR RRRR */
- MESA_FORMAT_XBGR8888_SRGB, /* xxxx xxxx BBBB BBBB GGGG GGGG RRRR RRRR */
+ MESA_FORMAT_B4G4R4X4_UNORM, /* BBBB GGGG RRRR xxxx */
+ MESA_FORMAT_B5G5R5X1_UNORM, /* BBBB BGGG GGRR RRRx */
+ MESA_FORMAT_R8G8B8X8_SNORM, /* RRRR RRRR GGGG GGGG BBBB BBBB xxxx xxxx */
+ MESA_FORMAT_R8G8B8X8_SRGB, /* RRRR RRRR GGGG GGGG BBBB BBBB xxxx xxxx */
/* Type A formats */
MESA_FORMAT_RGBX_UINT8, /* uchar[i * 4] = R, [i * 4 + 1] = G, [i * 4 + 2] = B, [i * 4 + 3] = x */
MESA_FORMAT_RGBX_SINT8, /* char[i * 4] = R, [i * 4 + 1] = G, [i * 4 + 2] = B, [i * 4 + 3] = x */
/* Type P format(s) */
- MESA_FORMAT_XRGB2101010_UNORM, /* xxRR RRRR RRRR GGGG GGGG GGBB BBBB BBBB */
+ MESA_FORMAT_B10G10R10X2_UNORM,/* xxRR RRRR RRRR GGGG GGGG GGBB BBBB BBBB */
- /* Type A format(s) */
+ /* Type A formats */
MESA_FORMAT_RGBX_UNORM16, /* ushort[i * 4] = R, [i * 4 + 1] = G, [i * 4 + 2] = B, [i * 4 + 3] = x */
MESA_FORMAT_RGBX_SNORM16, /* ... */
MESA_FORMAT_RGBX_FLOAT16, /* ... */
@@ -638,7 +638,7 @@ typedef enum
MESA_FORMAT_RGBX_SINT32, /* ... */
/* Type P formats */
- MESA_FORMAT_ABGR2101010,
+ MESA_FORMAT_R10G10B10A2_UNORM,
MESA_FORMAT_SIGNED_RG88,
MESA_FORMAT_SIGNED_RG1616,
diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
index b5fc4ee0d8a..54eeda2b2ae 100644
--- a/src/mesa/main/framebuffer.c
+++ b/src/mesa/main/framebuffer.c
@@ -842,7 +842,7 @@ _mesa_get_color_read_format(struct gl_context *ctx)
if (format == MESA_FORMAT_B8G8R8A8_UNORM)
return GL_BGRA;
- else if (format == MESA_FORMAT_RGB565)
+ else if (format == MESA_FORMAT_B5G6R5_UNORM)
return GL_BGR;
switch (data_type) {
@@ -875,7 +875,7 @@ _mesa_get_color_read_type(struct gl_context *ctx)
const GLenum format = ctx->ReadBuffer->_ColorReadBuffer->Format;
const GLenum data_type = _mesa_get_format_datatype(format);
- if (format == MESA_FORMAT_RGB565)
+ if (format == MESA_FORMAT_B5G6R5_UNORM)
return GL_UNSIGNED_SHORT_5_6_5_REV;
switch (data_type) {
diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c
index fcf849b9808..e16346896ba 100644
--- a/src/mesa/main/readpix.c
+++ b/src/mesa/main/readpix.c
@@ -594,8 +594,8 @@ fast_read_depth_stencil_pixels(struct gl_context *ctx,
if (rb != stencilRb)
return GL_FALSE;
- if (rb->Format != MESA_FORMAT_Z24_S8 &&
- rb->Format != MESA_FORMAT_S8_Z24)
+ if (rb->Format != MESA_FORMAT_S8_UINT_Z24_UNORM &&
+ rb->Format != MESA_FORMAT_Z24_UNORM_X8_UINT)
return GL_FALSE;
ctx->Driver.MapRenderbuffer(ctx, rb, x, y, width, height, GL_MAP_READ_BIT,
diff --git a/src/mesa/main/shaderimage.c b/src/mesa/main/shaderimage.c
index 824607ae31a..05362325213 100644
--- a/src/mesa/main/shaderimage.c
+++ b/src/mesa/main/shaderimage.c
@@ -43,15 +43,15 @@
*/
#ifdef MESA_BIG_ENDIAN
# 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_RG_16 MESA_FORMAT_G16R16_UNORM
+# define MESA_FORMAT_RG_8 MESA_FORMAT_G8R8_UNORM
# 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_R8G8B8A8_UNORM
-# define MESA_FORMAT_RG_16 MESA_FORMAT_GR1616
-# define MESA_FORMAT_RG_8 MESA_FORMAT_GR88
+# define MESA_FORMAT_RG_16 MESA_FORMAT_R16G16_UNORM
+# define MESA_FORMAT_RG_8 MESA_FORMAT_R8G8_UNORM
# define MESA_FORMAT_SIGNED_RGBA_8 MESA_FORMAT_SIGNED_RGBA8888_REV
# define MESA_FORMAT_SIGNED_RG_16 MESA_FORMAT_SIGNED_GR1616
# define MESA_FORMAT_SIGNED_RG_8 MESA_FORMAT_SIGNED_RG88_REV
@@ -74,7 +74,7 @@ get_image_format(GLenum format)
return MESA_FORMAT_RG_FLOAT16;
case GL_R11F_G11F_B10F:
- return MESA_FORMAT_R11_G11_B10_FLOAT;
+ return MESA_FORMAT_R11G11B10_FLOAT;
case GL_R32F:
return MESA_FORMAT_R_FLOAT32;
@@ -89,7 +89,7 @@ get_image_format(GLenum format)
return MESA_FORMAT_RGBA_UINT16;
case GL_RGB10_A2UI:
- return MESA_FORMAT_ABGR2101010_UINT;
+ return MESA_FORMAT_R10G10B10A2_UINT;
case GL_RGBA8UI:
return MESA_FORMAT_RGBA_UINT8;
@@ -143,7 +143,7 @@ get_image_format(GLenum format)
return MESA_FORMAT_RGBA_UNORM16;
case GL_RGB10_A2:
- return MESA_FORMAT_ABGR2101010;
+ return MESA_FORMAT_R10G10B10A2_UNORM;
case GL_RGBA8:
return MESA_FORMAT_RGBA_8;
@@ -220,7 +220,7 @@ get_image_format_class(mesa_format format)
case MESA_FORMAT_RG_FLOAT16:
return IMAGE_FORMAT_CLASS_2X16;
- case MESA_FORMAT_R11_G11_B10_FLOAT:
+ case MESA_FORMAT_R11G11B10_FLOAT:
return IMAGE_FORMAT_CLASS_10_11_11;
case MESA_FORMAT_R_FLOAT32:
@@ -235,7 +235,7 @@ get_image_format_class(mesa_format format)
case MESA_FORMAT_RGBA_UINT16:
return IMAGE_FORMAT_CLASS_4X16;
- case MESA_FORMAT_ABGR2101010_UINT:
+ case MESA_FORMAT_R10G10B10A2_UINT:
return IMAGE_FORMAT_CLASS_2_10_10_10;
case MESA_FORMAT_RGBA_UINT8:
@@ -289,7 +289,7 @@ get_image_format_class(mesa_format format)
case MESA_FORMAT_RGBA_UNORM16:
return IMAGE_FORMAT_CLASS_4X16;
- case MESA_FORMAT_ABGR2101010:
+ case MESA_FORMAT_R10G10B10A2_UNORM:
return IMAGE_FORMAT_CLASS_2_10_10_10;
case MESA_FORMAT_RGBA_8:
diff --git a/src/mesa/main/texcompress_etc.c b/src/mesa/main/texcompress_etc.c
index 75bb9f7ffa8..e3862be45e6 100644
--- a/src/mesa/main/texcompress_etc.c
+++ b/src/mesa/main/texcompress_etc.c
@@ -726,7 +726,7 @@ etc2_unpack_srgb8(uint8_t *dst_row,
for (i = 0; i < bw; i++) {
etc2_rgb8_fetch_texel(&block, i, j, dst,
false /* punchthrough_alpha */);
- /* Convert to MESA_FORMAT_SARGB8 */
+ /* Convert to MESA_FORMAT_B8G8R8A8_SRGB */
tmp = dst[0];
dst[0] = dst[2];
dst[2] = tmp;
@@ -806,7 +806,7 @@ etc2_unpack_srgb8_alpha8(uint8_t *dst_row,
for (i = 0; i < bw; i++) {
etc2_rgba8_fetch_texel(&block, i, j, dst);
- /* Convert to MESA_FORMAT_SARGB8 */
+ /* Convert to MESA_FORMAT_B8G8R8A8_SRGB */
tmp = dst[0];
dst[0] = dst[2];
dst[2] = tmp;
@@ -1047,7 +1047,7 @@ etc2_unpack_srgb8_punchthrough_alpha1(uint8_t *dst_row,
for (i = 0; i < bw; i++) {
etc2_rgb8_fetch_texel(&block, i, j, dst,
true /* punchthrough_alpha */);
- /* Convert to MESA_FORMAT_SARGB8 */
+ /* Convert to MESA_FORMAT_B8G8R8A8_SRGB */
tmp = dst[0];
dst[0] = dst[2];
dst[2] = tmp;
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c
index ab31d3ebc1a..7137c5fc9c5 100644
--- a/src/mesa/main/texformat.c
+++ b/src/mesa/main/texformat.c
@@ -70,11 +70,11 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
case 4:
case GL_RGBA:
if (type == GL_UNSIGNED_SHORT_4_4_4_4_REV) {
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB4444);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B4G4R4A4_UNORM);
} else if (type == GL_UNSIGNED_SHORT_1_5_5_5_REV) {
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB1555);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B5G5R5A1_UNORM);
} else if (type == GL_UNSIGNED_INT_2_10_10_10_REV) {
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB2101010);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B10G10R10A2_UNORM);
}
RETURN_IF_SUPPORTED(MESA_FORMAT_A8B8G8R8_UNORM);
RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_UNORM);
@@ -85,19 +85,19 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_UNORM);
break;
case GL_RGB5_A1:
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB1555);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B5G5R5A1_UNORM);
break;
case GL_RGBA2:
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB4444_REV); /* just to test another format*/
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB4444);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_A4R4G4B4_UNORM); /* just to test another format*/
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B4G4R4A4_UNORM);
break;
case GL_RGBA4:
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB4444);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B4G4R4A4_UNORM);
break;
/* deep RGBA formats */
case GL_RGB10_A2:
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB2101010);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B10G10R10A2_UNORM);
RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_UNORM);
break;
case GL_RGBA12:
@@ -112,7 +112,7 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
case 3:
case GL_RGB:
if (type == GL_UNSIGNED_INT_2_10_10_10_REV) {
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB2101010);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B10G10R10A2_UNORM);
}
/* fallthrough */
case GL_RGB8:
@@ -121,19 +121,19 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
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_B2G3R3_UNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B5G6R5_UNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R5G6B5_UNORM);
RETURN_IF_SUPPORTED(MESA_FORMAT_BGR_UNORM8);
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 */
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R5G6B5_UNORM); /* just to test another format */
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B5G6R5_UNORM);
break;
case GL_RGB5:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B5G6R5_UNORM);
break;
/* deep RGB formats */
@@ -175,22 +175,22 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
/* Luminance/Alpha formats */
case GL_LUMINANCE4_ALPHA4:
- RETURN_IF_SUPPORTED(MESA_FORMAT_AL44);
- RETURN_IF_SUPPORTED(MESA_FORMAT_AL88);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_L4A4_UNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_L8A8_UNORM);
break;
case 2:
case GL_LUMINANCE_ALPHA:
case GL_LUMINANCE6_ALPHA2:
case GL_LUMINANCE8_ALPHA8:
- RETURN_IF_SUPPORTED(MESA_FORMAT_AL88);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_L8A8_UNORM);
break;
case GL_LUMINANCE12_ALPHA4:
case GL_LUMINANCE12_ALPHA12:
case GL_LUMINANCE16_ALPHA16:
- RETURN_IF_SUPPORTED(MESA_FORMAT_AL1616);
- RETURN_IF_SUPPORTED(MESA_FORMAT_AL88);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_L16A16_UNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_L8A8_UNORM);
break;
case GL_INTENSITY:
@@ -209,13 +209,13 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
case GL_DEPTH_COMPONENT24:
case GL_DEPTH_COMPONENT32:
RETURN_IF_SUPPORTED(MESA_FORMAT_Z_UNORM32);
- RETURN_IF_SUPPORTED(MESA_FORMAT_X8_Z24);
- RETURN_IF_SUPPORTED(MESA_FORMAT_S8_Z24);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_Z24_UNORM_S8_UINT);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_Z24_UNORM_X8_UINT);
break;
case GL_DEPTH_COMPONENT16:
RETURN_IF_SUPPORTED(MESA_FORMAT_Z_UNORM16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_X8_Z24);
- RETURN_IF_SUPPORTED(MESA_FORMAT_S8_Z24);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_Z24_UNORM_S8_UINT);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_Z24_UNORM_X8_UINT);
break;
case GL_COMPRESSED_ALPHA_ARB:
@@ -225,7 +225,7 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
RETURN_IF_SUPPORTED(MESA_FORMAT_L_UNORM8);
break;
case GL_COMPRESSED_LUMINANCE_ALPHA_ARB:
- RETURN_IF_SUPPORTED(MESA_FORMAT_AL88);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_L8A8_UNORM);
break;
case GL_COMPRESSED_INTENSITY_ARB:
RETURN_IF_SUPPORTED(MESA_FORMAT_I_UNORM8);
@@ -259,7 +259,7 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
break;
case GL_RGB565:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B5G6R5_UNORM);
break;
case GL_YCBCR_MESA:
@@ -415,26 +415,26 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
case GL_RGB9_E5:
/* GL_EXT_texture_shared_exponent -- just one format to support */
- ASSERT(ctx->TextureFormatSupported[MESA_FORMAT_RGB9_E5_FLOAT]);
- return MESA_FORMAT_RGB9_E5_FLOAT;
+ ASSERT(ctx->TextureFormatSupported[MESA_FORMAT_R9G9B9E5_FLOAT]);
+ return MESA_FORMAT_R9G9B9E5_FLOAT;
case GL_R11F_G11F_B10F:
/* GL_EXT_texture_packed_float -- just one format to support */
- ASSERT(ctx->TextureFormatSupported[MESA_FORMAT_R11_G11_B10_FLOAT]);
- return MESA_FORMAT_R11_G11_B10_FLOAT;
+ ASSERT(ctx->TextureFormatSupported[MESA_FORMAT_R11G11B10_FLOAT]);
+ return MESA_FORMAT_R11G11B10_FLOAT;
case GL_DEPTH_STENCIL_EXT:
case GL_DEPTH24_STENCIL8_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_Z24_S8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_S8_Z24);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_S8_UINT_Z24_UNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_Z24_UNORM_X8_UINT);
break;
case GL_DEPTH_COMPONENT32F:
ASSERT(ctx->TextureFormatSupported[MESA_FORMAT_Z_FLOAT32]);
return MESA_FORMAT_Z_FLOAT32;
case GL_DEPTH32F_STENCIL8:
- ASSERT(ctx->TextureFormatSupported[MESA_FORMAT_Z32_FLOAT_X24S8]);
- return MESA_FORMAT_Z32_FLOAT_X24S8;
+ ASSERT(ctx->TextureFormatSupported[MESA_FORMAT_Z32_FLOAT_S8X24_UINT]);
+ return MESA_FORMAT_Z32_FLOAT_S8X24_UINT;
case GL_DUDV_ATI:
case GL_DU8DV8_ATI:
@@ -523,42 +523,42 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
case GL_SRGB_EXT:
case GL_SRGB8_EXT:
RETURN_IF_SUPPORTED(MESA_FORMAT_BGR_SRGB8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_SRGB);
break;
case GL_SRGB_ALPHA_EXT:
case GL_SRGB8_ALPHA8_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SRGBA8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_A8B8G8R8_SRGB);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_SRGB);
break;
case GL_SLUMINANCE_EXT:
case GL_SLUMINANCE8_EXT:
RETURN_IF_SUPPORTED(MESA_FORMAT_L_SRGB8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_SRGB);
break;
case GL_SLUMINANCE_ALPHA_EXT:
case GL_SLUMINANCE8_ALPHA8_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SLA8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_L8A8_SRGB);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_SRGB);
break;
case GL_COMPRESSED_SLUMINANCE_EXT:
RETURN_IF_SUPPORTED(MESA_FORMAT_L_SRGB8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_SRGB);
break;
case GL_COMPRESSED_SLUMINANCE_ALPHA_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SLA8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_L8A8_SRGB);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_SRGB);
break;
case GL_COMPRESSED_SRGB_EXT:
if (ctx->Mesa_DXTn)
RETURN_IF_SUPPORTED(MESA_FORMAT_SRGB_DXT1);
RETURN_IF_SUPPORTED(MESA_FORMAT_BGR_SRGB8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_SRGB);
break;
case GL_COMPRESSED_SRGB_ALPHA_EXT:
if (ctx->Mesa_DXTn)
RETURN_IF_SUPPORTED(MESA_FORMAT_SRGBA_DXT3); /* Not srgba_dxt1, see spec */
- RETURN_IF_SUPPORTED(MESA_FORMAT_SRGBA8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_A8B8G8R8_SRGB);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_SRGB);
break;
case GL_ALPHA8UI_EXT:
@@ -724,17 +724,17 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
case GL_RG:
case GL_RG8:
- RETURN_IF_SUPPORTED(MESA_FORMAT_GR88);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R8G8_UNORM);
break;
case GL_COMPRESSED_RG:
if (target != GL_TEXTURE_1D && target != GL_TEXTURE_1D_ARRAY)
RETURN_IF_SUPPORTED(MESA_FORMAT_RG_RGTC2);
- RETURN_IF_SUPPORTED(MESA_FORMAT_GR88);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R8G8_UNORM);
break;
case GL_RG16:
- RETURN_IF_SUPPORTED(MESA_FORMAT_GR1616);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R16G16_UNORM);
break;
case GL_R16F:
@@ -804,8 +804,8 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
break;
case GL_RGB10_A2UI:
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB2101010_UINT);
- RETURN_IF_SUPPORTED(MESA_FORMAT_ABGR2101010_UINT);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B10G10R10A2_UINT);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R10G10B10A2_UINT);
break;
case GL_BGRA:
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 03e44759ad0..0bcbb3297cb 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -4054,9 +4054,9 @@ get_texbuffer_format(const struct gl_context *ctx, GLenum internalFormat)
case GL_LUMINANCE32UI_EXT:
return MESA_FORMAT_LUMINANCE_UINT32;
case GL_LUMINANCE8_ALPHA8:
- return MESA_FORMAT_AL88;
+ return MESA_FORMAT_L8A8_UNORM;
case GL_LUMINANCE16_ALPHA16:
- return MESA_FORMAT_AL1616;
+ return MESA_FORMAT_L16A16_UNORM;
case GL_LUMINANCE_ALPHA16F_ARB:
return MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16;
case GL_LUMINANCE_ALPHA32F_ARB:
@@ -4135,9 +4135,9 @@ get_texbuffer_format(const struct gl_context *ctx, GLenum internalFormat)
return MESA_FORMAT_RGBA_UINT32;
case GL_RG8:
- return MESA_FORMAT_GR88;
+ return MESA_FORMAT_R8G8_UNORM;
case GL_RG16:
- return MESA_FORMAT_GR1616;
+ return MESA_FORMAT_R16G16_UNORM;
case GL_RG16F:
return MESA_FORMAT_RG_FLOAT16;
case GL_RG32F:
diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
index 8145a657d37..e915ddd76fc 100644
--- a/src/mesa/main/texparam.c
+++ b/src/mesa/main/texparam.c
@@ -1169,7 +1169,7 @@ get_tex_level_parameter_image(struct gl_context *ctx,
if (ctx->Version < 30 &&
!ctx->Extensions.EXT_texture_shared_exponent)
goto invalid_pname;
- *params = texFormat == MESA_FORMAT_RGB9_E5_FLOAT ? 5 : 0;
+ *params = texFormat == MESA_FORMAT_R9G9B9E5_FLOAT ? 5 : 0;
break;
/* GL_ARB_texture_compression */
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index 4c1d789eb76..bcfaf8dc1ea 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -1049,7 +1049,7 @@ _mesa_texstore_x8_z24(TEXSTORE_PARAMS)
const GLuint depthScale = 0xffffff;
(void) dims;
- ASSERT(dstFormat == MESA_FORMAT_X8_Z24);
+ ASSERT(dstFormat == MESA_FORMAT_Z24_UNORM_S8_UINT);
{
/* general path */
@@ -1079,7 +1079,7 @@ _mesa_texstore_z24_x8(TEXSTORE_PARAMS)
const GLuint depthScale = 0xffffff;
(void) dims;
- ASSERT(dstFormat == MESA_FORMAT_Z24_X8);
+ ASSERT(dstFormat == MESA_FORMAT_X8Z24_UNORM);
{
/* general path */
@@ -1141,8 +1141,8 @@ _mesa_texstore_z16(TEXSTORE_PARAMS)
static GLboolean
_mesa_texstore_rgb565(TEXSTORE_PARAMS)
{
- ASSERT(dstFormat == MESA_FORMAT_RGB565 ||
- dstFormat == MESA_FORMAT_RGB565_REV);
+ ASSERT(dstFormat == MESA_FORMAT_B5G6R5_UNORM ||
+ dstFormat == MESA_FORMAT_R5G6B5_UNORM);
ASSERT(_mesa_get_format_bytes(dstFormat) == 2);
if (!ctx->_ImageTransferState &&
@@ -1163,7 +1163,7 @@ _mesa_texstore_rgb565(TEXSTORE_PARAMS)
const GLubyte *srcUB = (const GLubyte *) src;
GLushort *dstUS = (GLushort *) dst;
/* check for byteswapped format */
- if (dstFormat == MESA_FORMAT_RGB565) {
+ if (dstFormat == MESA_FORMAT_B5G6R5_UNORM) {
for (col = 0; col < srcWidth; col++) {
dstUS[col] = PACK_COLOR_565( srcUB[0], srcUB[1], srcUB[2] );
srcUB += 3;
@@ -1525,8 +1525,8 @@ _mesa_texstore_bgr888(TEXSTORE_PARAMS)
static GLboolean
_mesa_texstore_argb2101010(TEXSTORE_PARAMS)
{
- ASSERT(dstFormat == MESA_FORMAT_ARGB2101010 ||
- dstFormat == MESA_FORMAT_XRGB2101010_UNORM);
+ ASSERT(dstFormat == MESA_FORMAT_B10G10R10A2_UNORM ||
+ dstFormat == MESA_FORMAT_B10G10R10X2_UNORM);
ASSERT(_mesa_get_format_bytes(dstFormat) == 4);
{
@@ -1579,7 +1579,7 @@ _mesa_texstore_unorm44(TEXSTORE_PARAMS)
{
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
- ASSERT(dstFormat == MESA_FORMAT_AL44);
+ ASSERT(dstFormat == MESA_FORMAT_L4A4_UNORM);
ASSERT(_mesa_get_format_bytes(dstFormat) == 1);
{
@@ -1622,10 +1622,10 @@ _mesa_texstore_unorm88(TEXSTORE_PARAMS)
const GLboolean littleEndian = _mesa_little_endian();
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
- ASSERT(dstFormat == MESA_FORMAT_AL88 ||
- dstFormat == MESA_FORMAT_AL88_REV ||
- dstFormat == MESA_FORMAT_GR88 ||
- dstFormat == MESA_FORMAT_RG88);
+ ASSERT(dstFormat == MESA_FORMAT_L8A8_UNORM ||
+ dstFormat == MESA_FORMAT_A8L8_UNORM ||
+ dstFormat == MESA_FORMAT_R8G8_UNORM ||
+ dstFormat == MESA_FORMAT_G8R8_UNORM);
ASSERT(_mesa_get_format_bytes(dstFormat) == 2);
if (!ctx->_ImageTransferState &&
@@ -1637,9 +1637,9 @@ _mesa_texstore_unorm88(TEXSTORE_PARAMS)
/* dstmap - how to swizzle from RGBA to dst format:
*/
- if (dstFormat == MESA_FORMAT_AL88 || dstFormat == MESA_FORMAT_AL88_REV) {
- if ((littleEndian && dstFormat == MESA_FORMAT_AL88) ||
- (!littleEndian && dstFormat == MESA_FORMAT_AL88_REV)) {
+ if (dstFormat == MESA_FORMAT_L8A8_UNORM || dstFormat == MESA_FORMAT_A8L8_UNORM) {
+ if ((littleEndian && dstFormat == MESA_FORMAT_L8A8_UNORM) ||
+ (!littleEndian && dstFormat == MESA_FORMAT_A8L8_UNORM)) {
dstmap[0] = 0;
dstmap[1] = 3;
}
@@ -1649,8 +1649,8 @@ _mesa_texstore_unorm88(TEXSTORE_PARAMS)
}
}
else {
- if ((littleEndian && dstFormat == MESA_FORMAT_GR88) ||
- (!littleEndian && dstFormat == MESA_FORMAT_RG88)) {
+ if ((littleEndian && dstFormat == MESA_FORMAT_R8G8_UNORM) ||
+ (!littleEndian && dstFormat == MESA_FORMAT_G8R8_UNORM)) {
dstmap[0] = 0;
dstmap[1] = 1;
}
@@ -1687,8 +1687,8 @@ _mesa_texstore_unorm88(TEXSTORE_PARAMS)
GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
GLushort *dstUS = (GLushort *) dstRow;
- if (dstFormat == MESA_FORMAT_AL88 ||
- dstFormat == MESA_FORMAT_GR88) {
+ if (dstFormat == MESA_FORMAT_L8A8_UNORM ||
+ dstFormat == MESA_FORMAT_R8G8_UNORM) {
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],
@@ -1721,10 +1721,10 @@ _mesa_texstore_unorm1616(TEXSTORE_PARAMS)
{
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
- ASSERT(dstFormat == MESA_FORMAT_AL1616 ||
- dstFormat == MESA_FORMAT_AL1616_REV ||
- dstFormat == MESA_FORMAT_GR1616 ||
- dstFormat == MESA_FORMAT_RG1616);
+ ASSERT(dstFormat == MESA_FORMAT_L16A16_UNORM ||
+ dstFormat == MESA_FORMAT_A16L16_UNORM ||
+ dstFormat == MESA_FORMAT_R16G16_UNORM ||
+ dstFormat == MESA_FORMAT_G16R16_UNORM);
ASSERT(_mesa_get_format_bytes(dstFormat) == 4);
{
@@ -1744,8 +1744,8 @@ _mesa_texstore_unorm1616(TEXSTORE_PARAMS)
GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
GLuint *dstUI = (GLuint *) dstRow;
- if (dstFormat == MESA_FORMAT_AL1616 ||
- dstFormat == MESA_FORMAT_GR1616) {
+ if (dstFormat == MESA_FORMAT_L16A16_UNORM ||
+ dstFormat == MESA_FORMAT_R16G16_UNORM) {
for (col = 0; col < srcWidth; col++) {
GLushort l, a;
@@ -2346,7 +2346,7 @@ _mesa_texstore_snorm1616(TEXSTORE_PARAMS)
/**
* Store a texture in MESA_FORMAT_SIGNED_RGBX8888 or
- * MESA_FORMAT_XBGR8888_SNORM.
+ * MESA_FORMAT_R8G8B8X8_SNORM.
*/
static GLboolean
_mesa_texstore_signed_rgbx8888(TEXSTORE_PARAMS)
@@ -2354,7 +2354,7 @@ _mesa_texstore_signed_rgbx8888(TEXSTORE_PARAMS)
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
ASSERT(dstFormat == MESA_FORMAT_SIGNED_RGBX8888 ||
- dstFormat == MESA_FORMAT_XBGR8888_SNORM);
+ dstFormat == MESA_FORMAT_R8G8B8X8_SNORM);
ASSERT(_mesa_get_format_bytes(dstFormat) == 4);
{
@@ -2474,7 +2474,7 @@ _mesa_texstore_z24_s8(TEXSTORE_PARAMS)
= _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType);
GLint img, row;
- ASSERT(dstFormat == MESA_FORMAT_Z24_S8);
+ ASSERT(dstFormat == MESA_FORMAT_S8_UINT_Z24_UNORM);
ASSERT(srcFormat == GL_DEPTH_STENCIL_EXT ||
srcFormat == GL_DEPTH_COMPONENT ||
srcFormat == GL_STENCIL_INDEX);
@@ -2558,7 +2558,7 @@ _mesa_texstore_s8_z24(TEXSTORE_PARAMS)
GLuint *depth;
GLubyte *stencil;
- ASSERT(dstFormat == MESA_FORMAT_S8_Z24);
+ ASSERT(dstFormat == MESA_FORMAT_Z24_UNORM_X8_UINT);
ASSERT(srcFormat == GL_DEPTH_STENCIL_EXT ||
srcFormat == GL_DEPTH_COMPONENT ||
srcFormat == GL_STENCIL_INDEX);
@@ -3259,14 +3259,14 @@ _mesa_texstore_srgba8(TEXSTORE_PARAMS)
mesa_format newDstFormat;
GLboolean k;
- ASSERT(dstFormat == MESA_FORMAT_SRGBA8 ||
- dstFormat == MESA_FORMAT_XBGR8888_SRGB);
+ ASSERT(dstFormat == MESA_FORMAT_A8B8G8R8_SRGB ||
+ dstFormat == MESA_FORMAT_R8G8B8X8_SRGB);
/* reuse normal rgba texstore code */
- if (dstFormat == MESA_FORMAT_SRGBA8) {
+ if (dstFormat == MESA_FORMAT_A8B8G8R8_SRGB) {
newDstFormat = MESA_FORMAT_A8B8G8R8_UNORM;
}
- else if (dstFormat == MESA_FORMAT_XBGR8888_SRGB) {
+ else if (dstFormat == MESA_FORMAT_R8G8B8X8_SRGB) {
newDstFormat = MESA_FORMAT_R8G8B8X8_UNORM;
}
else {
@@ -3290,7 +3290,7 @@ _mesa_texstore_sargb8(TEXSTORE_PARAMS)
mesa_format newDstFormat;
GLboolean k;
- ASSERT(dstFormat == MESA_FORMAT_SARGB8);
+ ASSERT(dstFormat == MESA_FORMAT_B8G8R8A8_SRGB);
/* reuse normal rgba texstore code */
newDstFormat = MESA_FORMAT_B8G8R8A8_UNORM;
@@ -3332,10 +3332,10 @@ _mesa_texstore_sla8(TEXSTORE_PARAMS)
mesa_format newDstFormat;
GLboolean k;
- ASSERT(dstFormat == MESA_FORMAT_SLA8);
+ ASSERT(dstFormat == MESA_FORMAT_L8A8_SRGB);
/* reuse normal luminance/alpha texstore code */
- newDstFormat = MESA_FORMAT_AL88;
+ newDstFormat = MESA_FORMAT_L8A8_UNORM;
k = _mesa_texstore_unorm88(ctx, dims, baseInternalFormat,
newDstFormat,
@@ -3351,7 +3351,7 @@ _mesa_texstore_rgb9_e5(TEXSTORE_PARAMS)
{
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
- ASSERT(dstFormat == MESA_FORMAT_RGB9_E5_FLOAT);
+ ASSERT(dstFormat == MESA_FORMAT_R9G9B9E5_FLOAT);
ASSERT(baseInternalFormat == GL_RGB);
{
@@ -3389,7 +3389,7 @@ _mesa_texstore_r11_g11_b10f(TEXSTORE_PARAMS)
{
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
- ASSERT(dstFormat == MESA_FORMAT_R11_G11_B10_FLOAT);
+ ASSERT(dstFormat == MESA_FORMAT_R11G11B10_FLOAT);
ASSERT(baseInternalFormat == GL_RGB);
{
@@ -3426,7 +3426,7 @@ _mesa_texstore_r11_g11_b10f(TEXSTORE_PARAMS)
static GLboolean
_mesa_texstore_z32f_x24s8(TEXSTORE_PARAMS)
{
- ASSERT(dstFormat == MESA_FORMAT_Z32_FLOAT_X24S8);
+ ASSERT(dstFormat == MESA_FORMAT_Z32_FLOAT_S8X24_UINT);
ASSERT(srcFormat == GL_DEPTH_STENCIL ||
srcFormat == GL_DEPTH_COMPONENT ||
srcFormat == GL_STENCIL_INDEX);
@@ -3479,7 +3479,7 @@ _mesa_texstore_argb2101010_uint(TEXSTORE_PARAMS)
{
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
- ASSERT(dstFormat == MESA_FORMAT_ARGB2101010_UINT);
+ ASSERT(dstFormat == MESA_FORMAT_B10G10R10A2_UINT);
ASSERT(_mesa_get_format_bytes(dstFormat) == 4);
{
@@ -3535,7 +3535,7 @@ _mesa_texstore_abgr2101010_uint(TEXSTORE_PARAMS)
{
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
- ASSERT(dstFormat == MESA_FORMAT_ABGR2101010_UINT);
+ ASSERT(dstFormat == MESA_FORMAT_R10G10B10A2_UINT);
ASSERT(_mesa_get_format_bytes(dstFormat) == 4);
{
@@ -3591,7 +3591,7 @@ _mesa_texstore_abgr2101010(TEXSTORE_PARAMS)
{
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
- ASSERT(dstFormat == MESA_FORMAT_ABGR2101010);
+ ASSERT(dstFormat == MESA_FORMAT_R10G10B10A2_UNORM);
ASSERT(_mesa_get_format_bytes(dstFormat) == 4);
{
@@ -3670,19 +3670,19 @@ _mesa_get_texstore_func(mesa_format format)
table[MESA_FORMAT_X8R8G8B8_UNORM] = _mesa_texstore_argb8888;
table[MESA_FORMAT_BGR_UNORM8] = _mesa_texstore_rgb888;
table[MESA_FORMAT_RGB_UNORM8] = _mesa_texstore_bgr888;
- table[MESA_FORMAT_RGB565] = _mesa_texstore_rgb565;
- table[MESA_FORMAT_RGB565_REV] = _mesa_texstore_rgb565;
- table[MESA_FORMAT_ARGB4444] = store_ubyte_texture;
- table[MESA_FORMAT_ARGB4444_REV] = store_ubyte_texture;
- table[MESA_FORMAT_RGBA5551] = store_ubyte_texture;
- table[MESA_FORMAT_ARGB1555] = store_ubyte_texture;
- table[MESA_FORMAT_ARGB1555_REV] = store_ubyte_texture;
- table[MESA_FORMAT_AL44] = _mesa_texstore_unorm44;
- table[MESA_FORMAT_AL88] = _mesa_texstore_unorm88;
- table[MESA_FORMAT_AL88_REV] = _mesa_texstore_unorm88;
- table[MESA_FORMAT_AL1616] = _mesa_texstore_unorm1616;
- table[MESA_FORMAT_AL1616_REV] = _mesa_texstore_unorm1616;
- table[MESA_FORMAT_RGB332] = store_ubyte_texture;
+ table[MESA_FORMAT_B5G6R5_UNORM] = _mesa_texstore_rgb565;
+ table[MESA_FORMAT_R5G6B5_UNORM] = _mesa_texstore_rgb565;
+ table[MESA_FORMAT_B4G4R4A4_UNORM] = store_ubyte_texture;
+ table[MESA_FORMAT_A4R4G4B4_UNORM] = store_ubyte_texture;
+ table[MESA_FORMAT_A1B5G5R5_UNORM] = store_ubyte_texture;
+ table[MESA_FORMAT_B5G5R5A1_UNORM] = store_ubyte_texture;
+ table[MESA_FORMAT_A1R5G5B5_UNORM] = store_ubyte_texture;
+ table[MESA_FORMAT_L4A4_UNORM] = _mesa_texstore_unorm44;
+ table[MESA_FORMAT_L8A8_UNORM] = _mesa_texstore_unorm88;
+ table[MESA_FORMAT_A8L8_UNORM] = _mesa_texstore_unorm88;
+ table[MESA_FORMAT_L16A16_UNORM] = _mesa_texstore_unorm1616;
+ table[MESA_FORMAT_A16L16_UNORM] = _mesa_texstore_unorm1616;
+ table[MESA_FORMAT_B2G3R3_UNORM] = store_ubyte_texture;
table[MESA_FORMAT_A_UNORM8] = _mesa_texstore_unorm8;
table[MESA_FORMAT_A_UNORM16] = _mesa_texstore_unorm16;
table[MESA_FORMAT_L_UNORM8] = _mesa_texstore_unorm8;
@@ -3692,24 +3692,24 @@ _mesa_get_texstore_func(mesa_format format)
table[MESA_FORMAT_YCBCR] = _mesa_texstore_ycbcr;
table[MESA_FORMAT_YCBCR_REV] = _mesa_texstore_ycbcr;
table[MESA_FORMAT_R_UNORM8] = _mesa_texstore_unorm8;
- table[MESA_FORMAT_GR88] = _mesa_texstore_unorm88;
- table[MESA_FORMAT_RG88] = _mesa_texstore_unorm88;
+ table[MESA_FORMAT_R8G8_UNORM] = _mesa_texstore_unorm88;
+ table[MESA_FORMAT_G8R8_UNORM] = _mesa_texstore_unorm88;
table[MESA_FORMAT_R_UNORM16] = _mesa_texstore_unorm16;
- table[MESA_FORMAT_GR1616] = _mesa_texstore_unorm1616;
- table[MESA_FORMAT_RG1616] = _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;
+ table[MESA_FORMAT_R16G16_UNORM] = _mesa_texstore_unorm1616;
+ table[MESA_FORMAT_G16R16_UNORM] = _mesa_texstore_unorm1616;
+ table[MESA_FORMAT_B10G10R10A2_UNORM] = _mesa_texstore_argb2101010;
+ table[MESA_FORMAT_S8_UINT_Z24_UNORM] = _mesa_texstore_z24_s8;
+ table[MESA_FORMAT_Z24_UNORM_X8_UINT] = _mesa_texstore_s8_z24;
table[MESA_FORMAT_Z_UNORM16] = _mesa_texstore_z16;
- table[MESA_FORMAT_X8_Z24] = _mesa_texstore_x8_z24;
- table[MESA_FORMAT_Z24_X8] = _mesa_texstore_z24_x8;
+ table[MESA_FORMAT_Z24_UNORM_S8_UINT] = _mesa_texstore_x8_z24;
+ table[MESA_FORMAT_X8Z24_UNORM] = _mesa_texstore_z24_x8;
table[MESA_FORMAT_Z_UNORM32] = _mesa_texstore_z32;
table[MESA_FORMAT_S_UINT8] = _mesa_texstore_s8;
table[MESA_FORMAT_BGR_SRGB8] = _mesa_texstore_srgb8;
- table[MESA_FORMAT_SRGBA8] = _mesa_texstore_srgba8;
- table[MESA_FORMAT_SARGB8] = _mesa_texstore_sargb8;
+ table[MESA_FORMAT_A8B8G8R8_SRGB] = _mesa_texstore_srgba8;
+ table[MESA_FORMAT_B8G8R8A8_SRGB] = _mesa_texstore_sargb8;
table[MESA_FORMAT_L_SRGB8] = _mesa_texstore_sl8;
- table[MESA_FORMAT_SLA8] = _mesa_texstore_sla8;
+ table[MESA_FORMAT_L8A8_SRGB] = _mesa_texstore_sla8;
table[MESA_FORMAT_SRGB_DXT1] = _mesa_texstore_rgb_dxt1;
table[MESA_FORMAT_SRGBA_DXT1] = _mesa_texstore_rgba_dxt1;
table[MESA_FORMAT_SRGBA_DXT3] = _mesa_texstore_rgba_dxt3;
@@ -3776,10 +3776,10 @@ _mesa_get_texstore_func(mesa_format format)
table[MESA_FORMAT_SIGNED_L16] = _mesa_texstore_snorm16;
table[MESA_FORMAT_SIGNED_AL1616] = _mesa_texstore_snorm1616;
table[MESA_FORMAT_SIGNED_I16] = _mesa_texstore_snorm16;
- table[MESA_FORMAT_RGB9_E5_FLOAT] = _mesa_texstore_rgb9_e5;
- table[MESA_FORMAT_R11_G11_B10_FLOAT] = _mesa_texstore_r11_g11_b10f;
+ table[MESA_FORMAT_R9G9B9E5_FLOAT] = _mesa_texstore_rgb9_e5;
+ table[MESA_FORMAT_R11G11B10_FLOAT] = _mesa_texstore_r11_g11_b10f;
table[MESA_FORMAT_Z_FLOAT32] = _mesa_texstore_z32;
- table[MESA_FORMAT_Z32_FLOAT_X24S8] = _mesa_texstore_z32f_x24s8;
+ table[MESA_FORMAT_Z32_FLOAT_S8X24_UINT] = _mesa_texstore_z32f_x24s8;
table[MESA_FORMAT_ALPHA_UINT8] = _mesa_texstore_rgba_uint8;
table[MESA_FORMAT_ALPHA_UINT16] = _mesa_texstore_rgba_uint16;
@@ -3835,16 +3835,16 @@ _mesa_get_texstore_func(mesa_format format)
table[MESA_FORMAT_RGB_UINT32] = _mesa_texstore_rgba_uint32;
table[MESA_FORMAT_RGBA_UINT32] = _mesa_texstore_rgba_uint32;
- table[MESA_FORMAT_ARGB2101010_UINT] = _mesa_texstore_argb2101010_uint;
- table[MESA_FORMAT_ABGR2101010_UINT] = _mesa_texstore_abgr2101010_uint;
+ table[MESA_FORMAT_B10G10R10A2_UINT] = _mesa_texstore_argb2101010_uint;
+ table[MESA_FORMAT_R10G10B10A2_UINT] = _mesa_texstore_abgr2101010_uint;
- table[MESA_FORMAT_XRGB4444_UNORM] = store_ubyte_texture;
- table[MESA_FORMAT_XRGB1555_UNORM] = store_ubyte_texture;
- table[MESA_FORMAT_XBGR8888_SNORM] = _mesa_texstore_signed_rgbx8888;
- table[MESA_FORMAT_XBGR8888_SRGB] = _mesa_texstore_srgba8;
+ table[MESA_FORMAT_B4G4R4X4_UNORM] = store_ubyte_texture;
+ table[MESA_FORMAT_B5G5R5X1_UNORM] = store_ubyte_texture;
+ table[MESA_FORMAT_R8G8B8X8_SNORM] = _mesa_texstore_signed_rgbx8888;
+ table[MESA_FORMAT_R8G8B8X8_SRGB] = _mesa_texstore_srgba8;
table[MESA_FORMAT_RGBX_UINT8] = _mesa_texstore_rgba_uint8;
table[MESA_FORMAT_RGBX_SINT8] = _mesa_texstore_rgba_int8;
- table[MESA_FORMAT_XRGB2101010_UNORM] = _mesa_texstore_argb2101010;
+ table[MESA_FORMAT_B10G10R10X2_UNORM] = _mesa_texstore_argb2101010;
table[MESA_FORMAT_RGBX_UNORM16] = _mesa_texstore_rgba_16;
table[MESA_FORMAT_RGBX_SNORM16] = _mesa_texstore_signed_rgba_16;
table[MESA_FORMAT_RGBX_FLOAT16] = _mesa_texstore_rgba_float16;
@@ -3854,7 +3854,7 @@ _mesa_get_texstore_func(mesa_format format)
table[MESA_FORMAT_RGBX_UINT32] = _mesa_texstore_rgba_uint32;
table[MESA_FORMAT_RGBX_SINT32] = _mesa_texstore_rgba_int32;
- table[MESA_FORMAT_ABGR2101010] = _mesa_texstore_abgr2101010;
+ table[MESA_FORMAT_R10G10B10A2_UNORM] = _mesa_texstore_abgr2101010;
table[MESA_FORMAT_SIGNED_RG88] = _mesa_texstore_snorm88;
table[MESA_FORMAT_SIGNED_RG1616] = _mesa_texstore_snorm1616;