[Mesa-dev] [V3 PATCH 4/8] mesa: MESA_FORMAT Type P Conversion
Mark Mueller
markkmueller at gmail.com
Fri Jan 17 03:47:56 PST 2014
Conversion of Type P formats as follows (w/related
comment fixes):
s/\bMESA_FORMAT_RGB565\b/MESA_FORMAT_B5G6R5_UNORM/g
s/\bMESA_FORMAT_RGB565_REV\b/MESA_FORMAT_R5G6B5_UNORM/g
s/\bMESA_FORMAT_ARGB4444\b/MESA_FORMAT_B4G4R4A4_UNORM/g
s/\bMESA_FORMAT_ARGB4444_REV\b/MESA_FORMAT_A4R4G4B4_UNORM/g
s/\bMESA_FORMAT_RGBA5551\b/MESA_FORMAT_A1B5G5R5_UNORM/g
s/\bMESA_FORMAT_ARGB1555\b/MESA_FORMAT_B5G5R5A1_UNORM/g
s/\bMESA_FORMAT_ARGB1555_REV\b/MESA_FORMAT_A1R5G5B5_UNORM/g
s/\bMESA_FORMAT_AL44\b/MESA_FORMAT_L4A4_UNORM/g
s/\bMESA_FORMAT_RGB332\b/MESA_FORMAT_B2G3R3_UNORM/g
s/\bMESA_FORMAT_ARGB2101010\b/MESA_FORMAT_B10G10R10A2_UNORM/g
s/\bMESA_FORMAT_Z24_S8\b/MESA_FORMAT_S8_UINT_Z24_UNORM/g
s/\bMESA_FORMAT_S8_Z24\b/MESA_FORMAT_Z24_UNORM_S8_UINT/g
s/\bMESA_FORMAT_X8_Z24\b/MESA_FORMAT_Z24_UNORM_X8_UINT/g
s/\bMESA_FORMAT_Z24_X8\b/MESA_FORMAT_X8Z24_UNORM/g
s/\bMESA_FORMAT_RGB9_E5_FLOAT\b/MESA_FORMAT_R9G9B9E5_FLOAT/g
s/\bMESA_FORMAT_R11_G11_B10_FLOAT\b/MESA_FORMAT_R11G11B10_FLOAT/g
s/\bMESA_FORMAT_Z32_FLOAT_X24S8\b/MESA_FORMAT_Z32_FLOAT_S8X24_UINT/g
s/\bMESA_FORMAT_ABGR2101010_UINT\b/MESA_FORMAT_R10G10B10A2_UINT/g
s/\bMESA_FORMAT_XRGB4444_UNORM\b/MESA_FORMAT_B4G4R4X4_UNORM/g
s/\bMESA_FORMAT_XRGB1555_UNORM\b/MESA_FORMAT_B5G5R5X1_UNORM/g
s/\bMESA_FORMAT_XRGB2101010_UNORM\b/MESA_FORMAT_B10G10R10X2_UNORM/g
Signed-off-by: Mark Mueller <MarkKMueller at gmail.com>
---
src/gallium/state_trackers/dri/common/dri_screen.c | 2 +-
src/mesa/drivers/dri/common/dri_util.c | 12 +-
src/mesa/drivers/dri/common/utils.c | 12 +-
src/mesa/drivers/dri/i915/i830_texstate.c | 6 +-
src/mesa/drivers/dri/i915/i830_vtbl.c | 14 +-
src/mesa/drivers/dri/i915/i915_context.c | 10 +-
src/mesa/drivers/dri/i915/i915_texstate.c | 10 +-
src/mesa/drivers/dri/i915/i915_vtbl.c | 14 +-
src/mesa/drivers/dri/i915/intel_blit.c | 6 +-
src/mesa/drivers/dri/i915/intel_fbo.c | 2 +-
src/mesa/drivers/dri/i915/intel_pixel_bitmap.c | 2 +-
src/mesa/drivers/dri/i915/intel_screen.c | 10 +-
src/mesa/drivers/dri/i915/intel_tex_image.c | 2 +-
src/mesa/drivers/dri/i965/brw_blorp.cpp | 4 +-
src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 6 +-
src/mesa/drivers/dri/i965/brw_clear.c | 4 +-
src/mesa/drivers/dri/i965/brw_misc_state.c | 10 +-
src/mesa/drivers/dri/i965/brw_surface_formats.c | 68 ++++----
src/mesa/drivers/dri/i965/intel_fbo.c | 2 +-
src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 12 +-
src/mesa/drivers/dri/i965/intel_mipmap_tree.h | 6 +-
src/mesa/drivers/dri/i965/intel_pixel_bitmap.c | 2 +-
src/mesa/drivers/dri/i965/intel_screen.c | 14 +-
src/mesa/drivers/dri/i965/intel_tex_image.c | 2 +-
src/mesa/drivers/dri/nouveau/nouveau_fbo.c | 8 +-
src/mesa/drivers/dri/nouveau/nouveau_screen.c | 2 +-
src/mesa/drivers/dri/nouveau/nouveau_texture.c | 4 +-
src/mesa/drivers/dri/nouveau/nouveau_util.h | 6 +-
src/mesa/drivers/dri/nouveau/nv04_state_fb.c | 2 +-
src/mesa/drivers/dri/nouveau/nv04_state_tex.c | 6 +-
src/mesa/drivers/dri/nouveau/nv04_surface.c | 80 ++++-----
src/mesa/drivers/dri/nouveau/nv10_state_fb.c | 4 +-
src/mesa/drivers/dri/nouveau/nv10_state_tex.c | 10 +-
src/mesa/drivers/dri/nouveau/nv20_state_fb.c | 6 +-
src/mesa/drivers/dri/nouveau/nv20_state_tex.c | 12 +-
src/mesa/drivers/dri/r200/r200_blit.c | 24 +--
src/mesa/drivers/dri/r200/r200_state_init.c | 6 +-
src/mesa/drivers/dri/r200/r200_texstate.c | 30 ++--
src/mesa/drivers/dri/radeon/radeon_blit.c | 18 +-
src/mesa/drivers/dri/radeon/radeon_fbo.c | 10 +-
src/mesa/drivers/dri/radeon/radeon_pixel_read.c | 14 +-
src/mesa/drivers/dri/radeon/radeon_screen.c | 12 +-
src/mesa/drivers/dri/radeon/radeon_state_init.c | 6 +-
src/mesa/drivers/dri/radeon/radeon_tex_copy.c | 4 +-
src/mesa/drivers/dri/radeon/radeon_texstate.c | 18 +-
src/mesa/drivers/dri/radeon/radeon_texture.c | 16 +-
src/mesa/drivers/dri/swrast/swrast.c | 6 +-
src/mesa/drivers/haiku/swrast/SoftwareRast.cpp | 4 +-
src/mesa/drivers/osmesa/osmesa.c | 2 +-
src/mesa/drivers/x11/xm_buffer.c | 2 +-
src/mesa/main/fbobject.c | 6 +-
src/mesa/main/format_pack.c | 182 ++++++++++-----------
src/mesa/main/format_unpack.c | 100 +++++------
src/mesa/main/formats.c | 178 ++++++++++----------
src/mesa/main/formats.h | 44 ++---
src/mesa/main/framebuffer.c | 4 +-
src/mesa/main/readpix.c | 4 +-
src/mesa/main/shaderimage.c | 8 +-
src/mesa/main/texformat.c | 62 +++----
src/mesa/main/texparam.c | 2 +-
src/mesa/main/texstore.c | 74 ++++-----
src/mesa/state_tracker/st_format.c | 68 ++++----
src/mesa/swrast/s_blit.c | 2 +-
src/mesa/swrast/s_depth.c | 30 ++--
src/mesa/swrast/s_drawpix.c | 6 +-
src/mesa/swrast/s_renderbuffer.c | 4 +-
src/mesa/swrast/s_stencil.c | 4 +-
src/mesa/swrast/s_texfetch.c | 44 ++---
src/mesa/swrast/s_texfetch_tmp.h | 32 ++--
69 files changed, 699 insertions(+), 699 deletions(-)
diff --git a/src/gallium/state_trackers/dri/common/dri_screen.c b/src/gallium/state_trackers/dri/common/dri_screen.c
index 08f5d07..1b2fa09 100644
--- a/src/gallium/state_trackers/dri/common/dri_screen.c
+++ b/src/gallium/state_trackers/dri/common/dri_screen.c
@@ -84,7 +84,7 @@ dri_fill_in_modes(struct dri_screen *screen)
static const mesa_format mesa_formats[3] = {
MESA_FORMAT_BGRA_UNORM8,
MESA_FORMAT_BGRX_UNORM8,
- MESA_FORMAT_RGB565,
+ MESA_FORMAT_B5G6R5_UNORM,
};
static const enum pipe_format pipe_formats[3] = {
PIPE_FORMAT_BGRA8888_UNORM,
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index 8678122..e7358bf 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -809,13 +809,13 @@ uint32_t
driGLFormatToImageFormat(mesa_format format)
{
switch (format) {
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
return __DRI_IMAGE_FORMAT_RGB565;
case MESA_FORMAT_BGRX_UNORM8:
return __DRI_IMAGE_FORMAT_XRGB8888;
- case MESA_FORMAT_ARGB2101010:
+ case MESA_FORMAT_B10G10R10A2_UNORM:
return __DRI_IMAGE_FORMAT_ARGB2101010;
- case MESA_FORMAT_XRGB2101010_UNORM:
+ case MESA_FORMAT_B10G10R10X2_UNORM:
return __DRI_IMAGE_FORMAT_XRGB2101010;
case MESA_FORMAT_BGRA_UNORM8:
return __DRI_IMAGE_FORMAT_ARGB8888;
@@ -841,13 +841,13 @@ driImageFormatToGLFormat(uint32_t image_format)
{
switch (image_format) {
case __DRI_IMAGE_FORMAT_RGB565:
- return MESA_FORMAT_RGB565;
+ return MESA_FORMAT_B5G6R5_UNORM;
case __DRI_IMAGE_FORMAT_XRGB8888:
return MESA_FORMAT_BGRX_UNORM8;
case __DRI_IMAGE_FORMAT_ARGB2101010:
- return MESA_FORMAT_ARGB2101010;
+ return MESA_FORMAT_B10G10R10A2_UNORM;
case __DRI_IMAGE_FORMAT_XRGB2101010:
- return MESA_FORMAT_XRGB2101010_UNORM;
+ return MESA_FORMAT_B10G10R10X2_UNORM;
case __DRI_IMAGE_FORMAT_ARGB8888:
return MESA_FORMAT_BGRA_UNORM8;
case __DRI_IMAGE_FORMAT_ABGR8888:
diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c
index 68f587f..ace726c 100644
--- a/src/mesa/drivers/dri/common/utils.c
+++ b/src/mesa/drivers/dri/common/utils.c
@@ -184,15 +184,15 @@ driCreateConfigs(mesa_format format,
GLboolean enable_accum)
{
static const uint32_t masks_table[][4] = {
- /* MESA_FORMAT_RGB565 */
+ /* MESA_FORMAT_B5G6R5_UNORM */
{ 0x0000F800, 0x000007E0, 0x0000001F, 0x00000000 },
/* MESA_FORMAT_BGRX_UNORM8 */
{ 0x00FF0000, 0x0000FF00, 0x000000FF, 0x00000000 },
/* MESA_FORMAT_BGRA_UNORM8 */
{ 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000 },
- /* MESA_FORMAT_XRGB2101010_UNORM */
+ /* MESA_FORMAT_B10G10R10X2_UNORM */
{ 0x3FF00000, 0x000FFC00, 0x000003FF, 0x00000000 },
- /* MESA_FORMAT_ARGB2101010 */
+ /* MESA_FORMAT_B10G10R10A2_UNORM */
{ 0x3FF00000, 0x000FFC00, 0x000003FF, 0xC0000000 },
};
@@ -209,7 +209,7 @@ driCreateConfigs(mesa_format format,
bool is_srgb;
switch (format) {
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
masks = masks_table[0];
break;
case MESA_FORMAT_BGRX_UNORM8:
@@ -219,10 +219,10 @@ driCreateConfigs(mesa_format format,
case MESA_FORMAT_SBGRA_UNORM8:
masks = masks_table[2];
break;
- case MESA_FORMAT_XRGB2101010_UNORM:
+ case MESA_FORMAT_B10G10R10X2_UNORM:
masks = masks_table[3];
break;
- case MESA_FORMAT_ARGB2101010:
+ case MESA_FORMAT_B10G10R10A2_UNORM:
masks = masks_table[4];
break;
default:
diff --git a/src/mesa/drivers/dri/i915/i830_texstate.c b/src/mesa/drivers/dri/i915/i830_texstate.c
index 6486f25..9f85d40 100644
--- a/src/mesa/drivers/dri/i915/i830_texstate.c
+++ b/src/mesa/drivers/dri/i915/i830_texstate.c
@@ -51,11 +51,11 @@ translate_texture_format(GLuint mesa_format)
return MAPSURF_8BIT | MT_8BIT_I8; /* Kludge! */
case MESA_FORMAT_LA_UNORM8:
return MAPSURF_16BIT | MT_16BIT_AY88;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
return MAPSURF_16BIT | MT_16BIT_RGB565;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
return MAPSURF_16BIT | MT_16BIT_ARGB1555;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
return MAPSURF_16BIT | MT_16BIT_ARGB4444;
case MESA_FORMAT_BGRA_UNORM8:
return MAPSURF_32BIT | MT_32BIT_ARGB8888;
diff --git a/src/mesa/drivers/dri/i915/i830_vtbl.c b/src/mesa/drivers/dri/i915/i830_vtbl.c
index 9bdfa93..581aed7 100644
--- a/src/mesa/drivers/dri/i915/i830_vtbl.c
+++ b/src/mesa/drivers/dri/i915/i830_vtbl.c
@@ -584,9 +584,9 @@ static uint32_t i830_render_target_format_for_mesa_format[MESA_FORMAT_COUNT] =
{
[MESA_FORMAT_BGRA_UNORM8] = DV_PF_8888,
[MESA_FORMAT_BGRX_UNORM8] = DV_PF_8888,
- [MESA_FORMAT_RGB565] = DV_PF_565,
- [MESA_FORMAT_ARGB1555] = DV_PF_1555,
- [MESA_FORMAT_ARGB4444] = DV_PF_4444,
+ [MESA_FORMAT_B5G6R5_UNORM] = DV_PF_565,
+ [MESA_FORMAT_B5G5R5A1_UNORM] = DV_PF_1555,
+ [MESA_FORMAT_B4G4R4A4_UNORM] = DV_PF_4444,
};
static bool
@@ -595,8 +595,8 @@ i830_render_target_supported(struct intel_context *intel,
{
mesa_format format = rb->Format;
- if (format == MESA_FORMAT_S8_Z24 ||
- format == MESA_FORMAT_X8_Z24 ||
+ if (format == MESA_FORMAT_Z24_UNORM_S8_UINT ||
+ format == MESA_FORMAT_Z24_UNORM_X8_UINT ||
format == MESA_FORMAT_Z_UNORM16) {
return true;
}
@@ -804,7 +804,7 @@ i830_update_draw_buffer(struct intel_context *intel)
/* Check for stencil fallback. */
if (irbStencil && irbStencil->mt) {
- assert(intel_rb_format(irbStencil) == MESA_FORMAT_S8_Z24);
+ assert(intel_rb_format(irbStencil) == MESA_FORMAT_Z24_UNORM_S8_UINT);
FALLBACK(intel, INTEL_FALLBACK_STENCIL_BUFFER, false);
} else if (irbStencil && !irbStencil->mt) {
FALLBACK(intel, INTEL_FALLBACK_STENCIL_BUFFER, true);
@@ -817,7 +817,7 @@ i830_update_draw_buffer(struct intel_context *intel)
* we still need to set up the shared depth/stencil state so we can use it.
*/
if (depthRegion == NULL && irbStencil && irbStencil->mt
- && intel_rb_format(irbStencil) == MESA_FORMAT_S8_Z24) {
+ && intel_rb_format(irbStencil) == MESA_FORMAT_Z24_UNORM_S8_UINT) {
depthRegion = irbStencil->mt->region;
}
diff --git a/src/mesa/drivers/dri/i915/i915_context.c b/src/mesa/drivers/dri/i915/i915_context.c
index b854513..43346df 100644
--- a/src/mesa/drivers/dri/i915/i915_context.c
+++ b/src/mesa/drivers/dri/i915/i915_context.c
@@ -105,17 +105,17 @@ intel_init_texture_formats(struct gl_context *ctx)
ctx->TextureFormatSupported[MESA_FORMAT_BGRX_UNORM8] = true;
if (intel->gen == 3)
ctx->TextureFormatSupported[MESA_FORMAT_SBGRA_UNORM8] = true;
- ctx->TextureFormatSupported[MESA_FORMAT_ARGB4444] = true;
- ctx->TextureFormatSupported[MESA_FORMAT_ARGB1555] = true;
- ctx->TextureFormatSupported[MESA_FORMAT_RGB565] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_B4G4R4A4_UNORM] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_B5G5R5A1_UNORM] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_B5G6R5_UNORM] = true;
ctx->TextureFormatSupported[MESA_FORMAT_L_UNORM8] = true;
ctx->TextureFormatSupported[MESA_FORMAT_A_UNORM8] = true;
ctx->TextureFormatSupported[MESA_FORMAT_I_UNORM8] = true;
ctx->TextureFormatSupported[MESA_FORMAT_LA_UNORM8] = true;
/* Depth and stencil */
- ctx->TextureFormatSupported[MESA_FORMAT_S8_Z24] = true;
- ctx->TextureFormatSupported[MESA_FORMAT_X8_Z24] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_Z24_UNORM_S8_UINT] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_Z24_UNORM_X8_UINT] = true;
/*
* This was disabled in initial FBO enabling to avoid combinations
diff --git a/src/mesa/drivers/dri/i915/i915_texstate.c b/src/mesa/drivers/dri/i915/i915_texstate.c
index 14a526f..a2bda54 100644
--- a/src/mesa/drivers/dri/i915/i915_texstate.c
+++ b/src/mesa/drivers/dri/i915/i915_texstate.c
@@ -50,11 +50,11 @@ translate_texture_format(mesa_format mesa_format, GLenum DepthMode)
return MAPSURF_8BIT | MT_8BIT_A8;
case MESA_FORMAT_LA_UNORM8:
return MAPSURF_16BIT | MT_16BIT_AY88;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
return MAPSURF_16BIT | MT_16BIT_RGB565;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
return MAPSURF_16BIT | MT_16BIT_ARGB1555;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
return MAPSURF_16BIT | MT_16BIT_ARGB4444;
case MESA_FORMAT_SBGRA_UNORM8:
case MESA_FORMAT_BGRA_UNORM8:
@@ -88,8 +88,8 @@ translate_texture_format(mesa_format mesa_format, GLenum DepthMode)
case MESA_FORMAT_RGBA_DXT5:
case MESA_FORMAT_SRGBA_DXT5:
return (MAPSURF_COMPRESSED | MT_COMPRESS_DXT4_5);
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_X8_Z24:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
if (DepthMode == GL_ALPHA)
return (MAPSURF_32BIT | MT_32BIT_x8A24);
else if (DepthMode == GL_INTENSITY)
diff --git a/src/mesa/drivers/dri/i915/i915_vtbl.c b/src/mesa/drivers/dri/i915/i915_vtbl.c
index cd8cad6..c363d9d 100644
--- a/src/mesa/drivers/dri/i915/i915_vtbl.c
+++ b/src/mesa/drivers/dri/i915/i915_vtbl.c
@@ -551,9 +551,9 @@ static uint32_t i915_render_target_format_for_mesa_format[MESA_FORMAT_COUNT] =
{
[MESA_FORMAT_BGRA_UNORM8] = DV_PF_8888,
[MESA_FORMAT_BGRX_UNORM8] = DV_PF_8888,
- [MESA_FORMAT_RGB565] = DV_PF_565 | DITHER_FULL_ALWAYS,
- [MESA_FORMAT_ARGB1555] = DV_PF_1555 | DITHER_FULL_ALWAYS,
- [MESA_FORMAT_ARGB4444] = DV_PF_4444 | DITHER_FULL_ALWAYS,
+ [MESA_FORMAT_B5G6R5_UNORM] = DV_PF_565 | DITHER_FULL_ALWAYS,
+ [MESA_FORMAT_B5G5R5A1_UNORM] = DV_PF_1555 | DITHER_FULL_ALWAYS,
+ [MESA_FORMAT_B4G4R4A4_UNORM] = DV_PF_4444 | DITHER_FULL_ALWAYS,
};
static bool
@@ -562,8 +562,8 @@ i915_render_target_supported(struct intel_context *intel,
{
mesa_format format = rb->Format;
- if (format == MESA_FORMAT_S8_Z24 ||
- format == MESA_FORMAT_X8_Z24 ||
+ if (format == MESA_FORMAT_Z24_UNORM_S8_UINT ||
+ format == MESA_FORMAT_Z24_UNORM_X8_UINT ||
format == MESA_FORMAT_Z_UNORM16) {
return true;
}
@@ -777,7 +777,7 @@ i915_update_draw_buffer(struct intel_context *intel)
/* Check for stencil fallback. */
if (irbStencil && irbStencil->mt) {
- assert(intel_rb_format(irbStencil) == MESA_FORMAT_S8_Z24);
+ assert(intel_rb_format(irbStencil) == MESA_FORMAT_Z24_UNORM_S8_UINT);
FALLBACK(intel, INTEL_FALLBACK_STENCIL_BUFFER, false);
} else if (irbStencil && !irbStencil->mt) {
FALLBACK(intel, INTEL_FALLBACK_STENCIL_BUFFER, true);
@@ -790,7 +790,7 @@ i915_update_draw_buffer(struct intel_context *intel)
* we still need to set up the shared depth/stencil state so we can use it.
*/
if (depthRegion == NULL && irbStencil && irbStencil->mt
- && intel_rb_format(irbStencil) == MESA_FORMAT_S8_Z24) {
+ && intel_rb_format(irbStencil) == MESA_FORMAT_Z24_UNORM_S8_UINT) {
depthRegion = irbStencil->mt->region;
}
diff --git a/src/mesa/drivers/dri/i915/intel_blit.c b/src/mesa/drivers/dri/i915/intel_blit.c
index b61191d..683030f 100644
--- a/src/mesa/drivers/dri/i915/intel_blit.c
+++ b/src/mesa/drivers/dri/i915/intel_blit.c
@@ -455,14 +455,14 @@ intelClearWithBlit(struct gl_context *ctx, GLbitfield mask)
clear_val = PACK_COLOR_8888(clear[3], clear[0],
clear[1], clear[2]);
break;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
clear_val = PACK_COLOR_565(clear[0], clear[1], clear[2]);
break;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
clear_val = PACK_COLOR_4444(clear[3], clear[0],
clear[1], clear[2]);
break;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
clear_val = PACK_COLOR_1555(clear[3], clear[0],
clear[1], clear[2]);
break;
diff --git a/src/mesa/drivers/dri/i915/intel_fbo.c b/src/mesa/drivers/dri/i915/intel_fbo.c
index 3872449..3c584bc 100644
--- a/src/mesa/drivers/dri/i915/intel_fbo.c
+++ b/src/mesa/drivers/dri/i915/intel_fbo.c
@@ -194,7 +194,7 @@ intel_alloc_renderbuffer_storage(struct gl_context * ctx, struct gl_renderbuffer
case GL_STENCIL_INDEX8_EXT:
case GL_STENCIL_INDEX16_EXT:
/* These aren't actual texture formats, so force them here. */
- rb->Format = MESA_FORMAT_S8_Z24;
+ rb->Format = MESA_FORMAT_Z24_UNORM_S8_UINT;
break;
}
diff --git a/src/mesa/drivers/dri/i915/intel_pixel_bitmap.c b/src/mesa/drivers/dri/i915/intel_pixel_bitmap.c
index 96003f2..6bdff21 100644
--- a/src/mesa/drivers/dri/i915/intel_pixel_bitmap.c
+++ b/src/mesa/drivers/dri/i915/intel_pixel_bitmap.c
@@ -232,7 +232,7 @@ do_blit_bitmap( struct gl_context *ctx,
case MESA_FORMAT_BGRX_UNORM8:
color = PACK_COLOR_8888(ubcolor[3], ubcolor[0], ubcolor[1], ubcolor[2]);
break;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
color = PACK_COLOR_565(ubcolor[0], ubcolor[1], ubcolor[2]);
break;
default:
diff --git a/src/mesa/drivers/dri/i915/intel_screen.c b/src/mesa/drivers/dri/i915/intel_screen.c
index 89cd527..0e9d81c 100644
--- a/src/mesa/drivers/dri/i915/intel_screen.c
+++ b/src/mesa/drivers/dri/i915/intel_screen.c
@@ -857,7 +857,7 @@ intelCreateBuffer(__DRIscreen * driScrnPriv,
_mesa_initialize_window_framebuffer(fb, mesaVis);
if (mesaVis->redBits == 5)
- rgbFormat = MESA_FORMAT_RGB565;
+ rgbFormat = MESA_FORMAT_B5G6R5_UNORM;
else if (mesaVis->sRGBCapable)
rgbFormat = MESA_FORMAT_SBGRA_UNORM8;
else if (mesaVis->alphaBits == 0)
@@ -886,7 +886,7 @@ intelCreateBuffer(__DRIscreen * driScrnPriv,
* Use combined depth/stencil. Note that the renderbuffer is
* attached to two attachment points.
*/
- rb = intel_create_private_renderbuffer(MESA_FORMAT_S8_Z24);
+ rb = intel_create_private_renderbuffer(MESA_FORMAT_Z24_UNORM_S8_UINT);
_mesa_add_renderbuffer(fb, BUFFER_DEPTH, &rb->Base.Base);
_mesa_add_renderbuffer(fb, BUFFER_STENCIL, &rb->Base.Base);
}
@@ -1043,7 +1043,7 @@ static __DRIconfig**
intel_screen_make_configs(__DRIscreen *dri_screen)
{
static const mesa_format formats[] = {
- MESA_FORMAT_RGB565,
+ MESA_FORMAT_B5G6R5_UNORM,
MESA_FORMAT_BGRA_UNORM8
};
@@ -1069,7 +1069,7 @@ intel_screen_make_configs(__DRIscreen *dri_screen)
depth_bits[0] = 0;
stencil_bits[0] = 0;
- if (formats[i] == MESA_FORMAT_RGB565) {
+ if (formats[i] == MESA_FORMAT_B5G6R5_UNORM) {
depth_bits[1] = 16;
stencil_bits[1] = 0;
} else {
@@ -1093,7 +1093,7 @@ intel_screen_make_configs(__DRIscreen *dri_screen)
for (int i = 0; i < ARRAY_SIZE(formats); i++) {
__DRIconfig **new_configs;
- if (formats[i] == MESA_FORMAT_RGB565) {
+ if (formats[i] == MESA_FORMAT_B5G6R5_UNORM) {
depth_bits[0] = 16;
stencil_bits[0] = 0;
} else {
diff --git a/src/mesa/drivers/dri/i915/intel_tex_image.c b/src/mesa/drivers/dri/i915/intel_tex_image.c
index a70bc5d..30df342 100644
--- a/src/mesa/drivers/dri/i915/intel_tex_image.c
+++ b/src/mesa/drivers/dri/i915/intel_tex_image.c
@@ -317,7 +317,7 @@ intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
}
} else if (rb->mt->cpp == 2) {
internalFormat = GL_RGB;
- texFormat = MESA_FORMAT_RGB565;
+ texFormat = MESA_FORMAT_B5G6R5_UNORM;
}
_mesa_lock_texture(&intel->ctx, texObj);
diff --git a/src/mesa/drivers/dri/i965/brw_blorp.cpp b/src/mesa/drivers/dri/i965/brw_blorp.cpp
index e1b782d..76537c8 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp.cpp
+++ b/src/mesa/drivers/dri/i965/brw_blorp.cpp
@@ -95,7 +95,7 @@ brw_blorp_surface_info::set(struct brw_context *brw,
this->map_stencil_as_y_tiled = true;
this->brw_surfaceformat = BRW_SURFACEFORMAT_R8_UNORM;
break;
- case MESA_FORMAT_X8_Z24:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
/* It would make sense to use BRW_SURFACEFORMAT_R24_UNORM_X8_TYPELESS
* here, but unfortunately it isn't supported as a render target, which
* would prevent us from blitting to 24-bit depth.
@@ -328,7 +328,7 @@ brw_hiz_op_params::brw_hiz_op_params(struct intel_mipmap_tree *mt,
switch (mt->format) {
case MESA_FORMAT_Z_UNORM16: depth_format = BRW_DEPTHFORMAT_D16_UNORM; break;
case MESA_FORMAT_Z_FLOAT32: depth_format = BRW_DEPTHFORMAT_D32_FLOAT; break;
- case MESA_FORMAT_X8_Z24: depth_format = BRW_DEPTHFORMAT_D24_UNORM_X8_UINT; break;
+ case MESA_FORMAT_Z24_UNORM_X8_UINT: depth_format = BRW_DEPTHFORMAT_D24_UNORM_X8_UINT; break;
default: assert(0); break;
}
}
diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
index 09322c4..4e4c248 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
+++ b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
@@ -221,7 +221,7 @@ formats_match(GLbitfield buffer_bit, struct intel_renderbuffer *src_irb,
{
/* Note: don't just check gl_renderbuffer::Format, because in some cases
* multiple gl_formats resolve to the same native type in the miptree (for
- * example MESA_FORMAT_X8_Z24 and MESA_FORMAT_S8_Z24), and we can blit
+ * example MESA_FORMAT_Z24_UNORM_X8_UINT and MESA_FORMAT_Z24_UNORM_S8_UINT), and we can blit
* between those formats.
*/
mesa_format src_format = find_miptree(buffer_bit, src_irb)->format;
@@ -370,8 +370,8 @@ brw_blorp_copytexsubimage(struct brw_context *brw,
* we have to lie about the surface format. See the comments in
* brw_blorp_surface_info::set().
*/
- if ((src_mt->format == MESA_FORMAT_X8_Z24) !=
- (dst_mt->format == MESA_FORMAT_X8_Z24)) {
+ if ((src_mt->format == MESA_FORMAT_Z24_UNORM_X8_UINT) !=
+ (dst_mt->format == MESA_FORMAT_Z24_UNORM_X8_UINT)) {
return false;
}
diff --git a/src/mesa/drivers/dri/i965/brw_clear.c b/src/mesa/drivers/dri/i965/brw_clear.c
index 39476a3..acd2f12 100644
--- a/src/mesa/drivers/dri/i965/brw_clear.c
+++ b/src/mesa/drivers/dri/i965/brw_clear.c
@@ -129,8 +129,8 @@ brw_fast_clear_depth(struct gl_context *ctx)
uint32_t depth_clear_value;
switch (mt->format) {
- case MESA_FORMAT_Z32_FLOAT_X24S8:
- case MESA_FORMAT_S8_Z24:
+ case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
/* From the Sandy Bridge PRM, volume 2 part 1, page 314:
*
* "[DevSNB+]: Several cases exist where Depth Buffer Clear cannot be
diff --git a/src/mesa/drivers/dri/i965/brw_misc_state.c b/src/mesa/drivers/dri/i965/brw_misc_state.c
index 5df55fe..0344eb2 100644
--- a/src/mesa/drivers/dri/i965/brw_misc_state.c
+++ b/src/mesa/drivers/dri/i965/brw_misc_state.c
@@ -142,8 +142,8 @@ brw_depthbuffer_format(struct brw_context *brw)
if (!drb &&
(srb = intel_get_renderbuffer(fb, BUFFER_STENCIL)) &&
!srb->mt->stencil_mt &&
- (intel_rb_format(srb) == MESA_FORMAT_S8_Z24 ||
- intel_rb_format(srb) == MESA_FORMAT_Z32_FLOAT_X24S8)) {
+ (intel_rb_format(srb) == MESA_FORMAT_Z24_UNORM_S8_UINT ||
+ intel_rb_format(srb) == MESA_FORMAT_Z32_FLOAT_S8X24_UINT)) {
drb = srb;
}
@@ -155,7 +155,7 @@ brw_depthbuffer_format(struct brw_context *brw)
return BRW_DEPTHFORMAT_D16_UNORM;
case MESA_FORMAT_Z_FLOAT32:
return BRW_DEPTHFORMAT_D32_FLOAT;
- case MESA_FORMAT_X8_Z24:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
if (brw->gen >= 6) {
return BRW_DEPTHFORMAT_D24_UNORM_X8_UINT;
} else {
@@ -173,9 +173,9 @@ brw_depthbuffer_format(struct brw_context *brw)
*/
return BRW_DEPTHFORMAT_D24_UNORM_S8_UINT;
}
- case MESA_FORMAT_S8_Z24:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
return BRW_DEPTHFORMAT_D24_UNORM_S8_UINT;
- case MESA_FORMAT_Z32_FLOAT_X24S8:
+ case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
return BRW_DEPTHFORMAT_D32_FLOAT_S8X24_UINT;
default:
_mesa_problem(ctx, "Unexpected depth format %s\n",
diff --git a/src/mesa/drivers/dri/i965/brw_surface_formats.c b/src/mesa/drivers/dri/i965/brw_surface_formats.c
index c19f9d2..dc5a82b 100644
--- a/src/mesa/drivers/dri/i965/brw_surface_formats.c
+++ b/src/mesa/drivers/dri/i965/brw_surface_formats.c
@@ -329,19 +329,19 @@ brw_format_for_mesa_format(mesa_format mesa_format)
[MESA_FORMAT_XRGB_UNORM8] = 0,
[MESA_FORMAT_BGR_UNORM8] = 0,
[MESA_FORMAT_RGB_UNORM8] = BRW_SURFACEFORMAT_R8G8B8_UNORM,
- [MESA_FORMAT_RGB565] = BRW_SURFACEFORMAT_B5G6R5_UNORM,
- [MESA_FORMAT_RGB565_REV] = 0,
- [MESA_FORMAT_ARGB4444] = BRW_SURFACEFORMAT_B4G4R4A4_UNORM,
- [MESA_FORMAT_ARGB4444_REV] = 0,
- [MESA_FORMAT_RGBA5551] = 0,
- [MESA_FORMAT_ARGB1555] = BRW_SURFACEFORMAT_B5G5R5A1_UNORM,
- [MESA_FORMAT_ARGB1555_REV] = 0,
- [MESA_FORMAT_AL44] = 0,
+ [MESA_FORMAT_B5G6R5_UNORM] = BRW_SURFACEFORMAT_B5G6R5_UNORM,
+ [MESA_FORMAT_R5G6B5_UNORM] = 0,
+ [MESA_FORMAT_B4G4R4A4_UNORM] = BRW_SURFACEFORMAT_B4G4R4A4_UNORM,
+ [MESA_FORMAT_A4R4G4B4_UNORM] = 0,
+ [MESA_FORMAT_A1B5G5R5_UNORM] = 0,
+ [MESA_FORMAT_B5G5R5A1_UNORM] = BRW_SURFACEFORMAT_B5G5R5A1_UNORM,
+ [MESA_FORMAT_A1R5G5B5_UNORM] = 0,
+ [MESA_FORMAT_L4A4_UNORM] = 0,
[MESA_FORMAT_LA_UNORM8] = BRW_SURFACEFORMAT_L8A8_UNORM,
[MESA_FORMAT_AL_UNORM8] = 0,
[MESA_FORMAT_LA_UNORM16] = BRW_SURFACEFORMAT_L16A16_UNORM,
[MESA_FORMAT_AL_UNORM16] = 0,
- [MESA_FORMAT_RGB332] = 0,
+ [MESA_FORMAT_B2G3R3_UNORM] = 0,
[MESA_FORMAT_A_UNORM8] = BRW_SURFACEFORMAT_A8_UNORM,
[MESA_FORMAT_A_UNORM16] = BRW_SURFACEFORMAT_A16_UNORM,
[MESA_FORMAT_L_UNORM8] = BRW_SURFACEFORMAT_L8_UNORM,
@@ -356,12 +356,12 @@ brw_format_for_mesa_format(mesa_format mesa_format)
[MESA_FORMAT_R_UNORM16] = BRW_SURFACEFORMAT_R16_UNORM,
[MESA_FORMAT_RG_UNORM16] = BRW_SURFACEFORMAT_R16G16_UNORM,
[MESA_FORMAT_GR_UNORM16] = 0,
- [MESA_FORMAT_ARGB2101010] = BRW_SURFACEFORMAT_B10G10R10A2_UNORM,
- [MESA_FORMAT_Z24_S8] = 0,
- [MESA_FORMAT_S8_Z24] = 0,
+ [MESA_FORMAT_B10G10R10A2_UNORM] = BRW_SURFACEFORMAT_B10G10R10A2_UNORM,
+ [MESA_FORMAT_S8_UINT_Z24_UNORM] = 0,
+ [MESA_FORMAT_Z24_UNORM_S8_UINT] = 0,
[MESA_FORMAT_Z_UNORM16] = 0,
- [MESA_FORMAT_X8_Z24] = 0,
- [MESA_FORMAT_Z24_X8] = 0,
+ [MESA_FORMAT_Z24_UNORM_X8_UINT] = 0,
+ [MESA_FORMAT_X8Z24_UNORM] = 0,
[MESA_FORMAT_Z_UNORM32] = 0,
[MESA_FORMAT_S_UINT8] = 0,
@@ -496,22 +496,22 @@ brw_format_for_mesa_format(mesa_format mesa_format)
[MESA_FORMAT_SIGNED_AL1616] = 0,
[MESA_FORMAT_SIGNED_I16] = 0,
- [MESA_FORMAT_RGB9_E5_FLOAT] = BRW_SURFACEFORMAT_R9G9B9E5_SHAREDEXP,
- [MESA_FORMAT_R11_G11_B10_FLOAT] = BRW_SURFACEFORMAT_R11G11B10_FLOAT,
+ [MESA_FORMAT_R9G9B9E5_FLOAT] = BRW_SURFACEFORMAT_R9G9B9E5_SHAREDEXP,
+ [MESA_FORMAT_R11G11B10_FLOAT] = BRW_SURFACEFORMAT_R11G11B10_FLOAT,
[MESA_FORMAT_Z_FLOAT32] = 0,
- [MESA_FORMAT_Z32_FLOAT_X24S8] = 0,
+ [MESA_FORMAT_Z32_FLOAT_S8X24_UINT] = 0,
- [MESA_FORMAT_ARGB2101010_UINT] = BRW_SURFACEFORMAT_B10G10R10A2_UINT,
- [MESA_FORMAT_ABGR2101010_UINT] = BRW_SURFACEFORMAT_R10G10B10A2_UINT,
+ [MESA_FORMAT_B10G10R10A2_UINT] = BRW_SURFACEFORMAT_B10G10R10A2_UINT,
+ [MESA_FORMAT_R10G10B10A2_UINT] = BRW_SURFACEFORMAT_R10G10B10A2_UINT,
- [MESA_FORMAT_XRGB4444_UNORM] = 0,
- [MESA_FORMAT_XRGB1555_UNORM] = BRW_SURFACEFORMAT_B5G5R5X1_UNORM,
+ [MESA_FORMAT_B4G4R4X4_UNORM] = 0,
+ [MESA_FORMAT_B5G5R5X1_UNORM] = BRW_SURFACEFORMAT_B5G5R5X1_UNORM,
[MESA_FORMAT_XBGR8888_SNORM] = 0,
[MESA_FORMAT_XBGR8888_SRGB] = 0,
[MESA_FORMAT_XBGR8888_UINT] = 0,
[MESA_FORMAT_XBGR8888_SINT] = 0,
- [MESA_FORMAT_XRGB2101010_UNORM] = BRW_SURFACEFORMAT_B10G10R10X2_UNORM,
+ [MESA_FORMAT_B10G10R10X2_UNORM] = BRW_SURFACEFORMAT_B10G10R10X2_UNORM,
[MESA_FORMAT_XBGR16161616_UNORM] = BRW_SURFACEFORMAT_R16G16B16X16_UNORM,
[MESA_FORMAT_XBGR16161616_SNORM] = 0,
[MESA_FORMAT_XBGR16161616_FLOAT] = BRW_SURFACEFORMAT_R16G16B16X16_FLOAT,
@@ -600,20 +600,20 @@ brw_init_surface_formats(struct brw_context *brw)
/* We will check this table for FBO completeness, but the surface format
* table above only covered color rendering.
*/
- brw->format_supported_as_render_target[MESA_FORMAT_S8_Z24] = true;
- brw->format_supported_as_render_target[MESA_FORMAT_X8_Z24] = true;
+ brw->format_supported_as_render_target[MESA_FORMAT_Z24_UNORM_S8_UINT] = true;
+ brw->format_supported_as_render_target[MESA_FORMAT_Z24_UNORM_X8_UINT] = true;
brw->format_supported_as_render_target[MESA_FORMAT_S_UINT8] = true;
brw->format_supported_as_render_target[MESA_FORMAT_Z_UNORM16] = true;
brw->format_supported_as_render_target[MESA_FORMAT_Z_FLOAT32] = true;
- brw->format_supported_as_render_target[MESA_FORMAT_Z32_FLOAT_X24S8] = true;
+ brw->format_supported_as_render_target[MESA_FORMAT_Z32_FLOAT_S8X24_UINT] = true;
/* We remap depth formats to a supported texturing format in
* translate_tex_format().
*/
- ctx->TextureFormatSupported[MESA_FORMAT_S8_Z24] = true;
- ctx->TextureFormatSupported[MESA_FORMAT_X8_Z24] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_Z24_UNORM_S8_UINT] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_Z24_UNORM_X8_UINT] = true;
ctx->TextureFormatSupported[MESA_FORMAT_Z_FLOAT32] = true;
- ctx->TextureFormatSupported[MESA_FORMAT_Z32_FLOAT_X24S8] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_Z32_FLOAT_S8X24_UINT] = true;
/* It appears that Z16 is slower than Z24 (on Intel Ivybridge and newer
* hardware at least), so there's no real reason to prefer it unless you're
@@ -697,14 +697,14 @@ translate_tex_format(struct brw_context *brw,
case MESA_FORMAT_Z_UNORM16:
return BRW_SURFACEFORMAT_R16_UNORM;
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_X8_Z24:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
return BRW_SURFACEFORMAT_R24_UNORM_X8_TYPELESS;
case MESA_FORMAT_Z_FLOAT32:
return BRW_SURFACEFORMAT_R32_FLOAT;
- case MESA_FORMAT_Z32_FLOAT_X24S8:
+ case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
return BRW_SURFACEFORMAT_R32_FLOAT_X8X24_TYPELESS;
case MESA_FORMAT_RGBA_FLOAT32:
@@ -739,9 +739,9 @@ brw_is_hiz_depth_format(struct brw_context *brw, mesa_format format)
switch (format) {
case MESA_FORMAT_Z_FLOAT32:
- case MESA_FORMAT_Z32_FLOAT_X24S8:
- case MESA_FORMAT_X8_Z24:
- case MESA_FORMAT_S8_Z24:
+ case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
case MESA_FORMAT_Z_UNORM16:
return true;
default:
diff --git a/src/mesa/drivers/dri/i965/intel_fbo.c b/src/mesa/drivers/dri/i965/intel_fbo.c
index 80b15f5..055c697 100644
--- a/src/mesa/drivers/dri/i965/intel_fbo.c
+++ b/src/mesa/drivers/dri/i965/intel_fbo.c
@@ -209,7 +209,7 @@ intel_alloc_renderbuffer_storage(struct gl_context * ctx, struct gl_renderbuffer
rb->Format = MESA_FORMAT_S_UINT8;
} else {
assert(!brw->must_use_separate_stencil);
- rb->Format = MESA_FORMAT_S8_Z24;
+ rb->Format = MESA_FORMAT_Z24_UNORM_S8_UINT;
}
break;
}
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index 9d8db3a..acf5244 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -370,9 +370,9 @@ intel_miptree_create_layout(struct brw_context *brw,
/* Fix up the Z miptree format for how we're splitting out separate
* stencil. Gen7 expects there to be no stencil bits in its depth buffer.
*/
- if (mt->format == MESA_FORMAT_S8_Z24) {
- mt->format = MESA_FORMAT_X8_Z24;
- } else if (mt->format == MESA_FORMAT_Z32_FLOAT_X24S8) {
+ if (mt->format == MESA_FORMAT_Z24_UNORM_S8_UINT) {
+ mt->format = MESA_FORMAT_Z24_UNORM_X8_UINT;
+ } else if (mt->format == MESA_FORMAT_Z32_FLOAT_S8X24_UINT) {
mt->format = MESA_FORMAT_Z_FLOAT32;
mt->cpp = 4;
} else {
@@ -918,10 +918,10 @@ intel_miptree_match_image(struct intel_mipmap_tree *mt,
assert(target_to_target(image->TexObject->Target) == mt->target);
mesa_format mt_format = mt->format;
- if (mt->format == MESA_FORMAT_X8_Z24 && mt->stencil_mt)
- mt_format = MESA_FORMAT_S8_Z24;
+ if (mt->format == MESA_FORMAT_Z24_UNORM_X8_UINT && mt->stencil_mt)
+ mt_format = MESA_FORMAT_Z24_UNORM_S8_UINT;
if (mt->format == MESA_FORMAT_Z_FLOAT32 && mt->stencil_mt)
- mt_format = MESA_FORMAT_Z32_FLOAT_X24S8;
+ mt_format = MESA_FORMAT_Z32_FLOAT_S8X24_UINT;
if (mt->etc_format != MESA_FORMAT_NONE)
mt_format = mt->etc_format;
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
index 93f90b7..727f209 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
@@ -278,9 +278,9 @@ struct intel_mipmap_tree
* However, for textures and renderbuffers with packed depth/stencil formats
* on hardware where we want or need to use separate stencil, there will be
* two miptrees for storing the data. If the depthstencil texture or rb is
- * MESA_FORMAT_Z32_FLOAT_X24S8, then mt->format will be
- * MESA_FORMAT_Z_FLOAT32, otherwise for MESA_FORMAT_S8_Z24 objects it will be
- * MESA_FORMAT_X8_Z24.
+ * MESA_FORMAT_Z32_FLOAT_S8X24_UINT, then mt->format will be
+ * MESA_FORMAT_Z_FLOAT32, otherwise for MESA_FORMATPIPE_FORMAT_Z24_UNORM_S8_UINT objects it will be
+ * MESA_FORMAT_Z24_UNORM_X8_UINT.
*
* For ETC1/ETC2 textures, this is one of the uncompressed mesa texture
* formats if the hardware lacks support for ETC1/ETC2. See @ref wraps_etc.
diff --git a/src/mesa/drivers/dri/i965/intel_pixel_bitmap.c b/src/mesa/drivers/dri/i965/intel_pixel_bitmap.c
index 7d6a12c..8f46f9f 100644
--- a/src/mesa/drivers/dri/i965/intel_pixel_bitmap.c
+++ b/src/mesa/drivers/dri/i965/intel_pixel_bitmap.c
@@ -233,7 +233,7 @@ do_blit_bitmap( struct gl_context *ctx,
case MESA_FORMAT_BGRX_UNORM8:
color = PACK_COLOR_8888(ubcolor[3], ubcolor[0], ubcolor[1], ubcolor[2]);
break;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
color = PACK_COLOR_565(ubcolor[0], ubcolor[1], ubcolor[2]);
break;
default:
diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
index 7c0efac..dd08918 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -976,7 +976,7 @@ intelCreateBuffer(__DRIscreen * driScrnPriv,
_mesa_initialize_window_framebuffer(fb, mesaVis);
if (mesaVis->redBits == 5)
- rgbFormat = MESA_FORMAT_RGB565;
+ rgbFormat = MESA_FORMAT_B5G6R5_UNORM;
else if (mesaVis->sRGBCapable)
rgbFormat = MESA_FORMAT_SBGRA_UNORM8;
else if (mesaVis->alphaBits == 0)
@@ -1004,7 +1004,7 @@ intelCreateBuffer(__DRIscreen * driScrnPriv,
assert(mesaVis->stencilBits == 8);
if (screen->devinfo->has_hiz_and_separate_stencil) {
- rb = intel_create_private_renderbuffer(MESA_FORMAT_X8_Z24,
+ rb = intel_create_private_renderbuffer(MESA_FORMAT_Z24_UNORM_X8_UINT,
num_samples);
_mesa_add_renderbuffer(fb, BUFFER_DEPTH, &rb->Base.Base);
rb = intel_create_private_renderbuffer(MESA_FORMAT_S_UINT8,
@@ -1015,7 +1015,7 @@ intelCreateBuffer(__DRIscreen * driScrnPriv,
* Use combined depth/stencil. Note that the renderbuffer is
* attached to two attachment points.
*/
- rb = intel_create_private_renderbuffer(MESA_FORMAT_S8_Z24,
+ rb = intel_create_private_renderbuffer(MESA_FORMAT_Z24_UNORM_S8_UINT,
num_samples);
_mesa_add_renderbuffer(fb, BUFFER_DEPTH, &rb->Base.Base);
_mesa_add_renderbuffer(fb, BUFFER_STENCIL, &rb->Base.Base);
@@ -1125,7 +1125,7 @@ static __DRIconfig**
intel_screen_make_configs(__DRIscreen *dri_screen)
{
static const mesa_format formats[] = {
- MESA_FORMAT_RGB565,
+ MESA_FORMAT_B5G6R5_UNORM,
MESA_FORMAT_BGRA_UNORM8
};
@@ -1154,7 +1154,7 @@ intel_screen_make_configs(__DRIscreen *dri_screen)
depth_bits[0] = 0;
stencil_bits[0] = 0;
- if (formats[i] == MESA_FORMAT_RGB565) {
+ if (formats[i] == MESA_FORMAT_B5G6R5_UNORM) {
depth_bits[1] = 16;
stencil_bits[1] = 0;
if (devinfo->gen >= 6) {
@@ -1183,7 +1183,7 @@ intel_screen_make_configs(__DRIscreen *dri_screen)
for (int i = 0; i < ARRAY_SIZE(formats); i++) {
__DRIconfig **new_configs;
- if (formats[i] == MESA_FORMAT_RGB565) {
+ if (formats[i] == MESA_FORMAT_B5G6R5_UNORM) {
depth_bits[0] = 16;
stencil_bits[0] = 0;
} else {
@@ -1223,7 +1223,7 @@ intel_screen_make_configs(__DRIscreen *dri_screen)
depth_bits[0] = 0;
stencil_bits[0] = 0;
- if (formats[i] == MESA_FORMAT_RGB565) {
+ if (formats[i] == MESA_FORMAT_B5G6R5_UNORM) {
depth_bits[1] = 16;
stencil_bits[1] = 0;
} else {
diff --git a/src/mesa/drivers/dri/i965/intel_tex_image.c b/src/mesa/drivers/dri/i965/intel_tex_image.c
index ca7df05..c42e600 100644
--- a/src/mesa/drivers/dri/i965/intel_tex_image.c
+++ b/src/mesa/drivers/dri/i965/intel_tex_image.c
@@ -308,7 +308,7 @@ intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
}
} else if (rb->mt->cpp == 2) {
internalFormat = GL_RGB;
- texFormat = MESA_FORMAT_RGB565;
+ texFormat = MESA_FORMAT_B5G6R5_UNORM;
}
_mesa_lock_texture(&brw->ctx, texObj);
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fbo.c b/src/mesa/drivers/dri/nouveau/nouveau_fbo.c
index 0b2d606..30dd42e 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_fbo.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_fbo.c
@@ -55,7 +55,7 @@ set_renderbuffer_format(struct gl_renderbuffer *rb, GLenum internalFormat)
break;
case GL_RGB5:
rb->_BaseFormat = GL_RGB;
- rb->Format = MESA_FORMAT_RGB565;
+ rb->Format = MESA_FORMAT_B5G6R5_UNORM;
s->cpp = 2;
break;
case GL_DEPTH_COMPONENT16:
@@ -68,7 +68,7 @@ set_renderbuffer_format(struct gl_renderbuffer *rb, GLenum internalFormat)
case GL_STENCIL_INDEX8_EXT:
case GL_DEPTH24_STENCIL8_EXT:
rb->_BaseFormat = GL_DEPTH_STENCIL;
- rb->Format = MESA_FORMAT_Z24_S8;
+ rb->Format = MESA_FORMAT_S8_UINT_Z24_UNORM;
s->cpp = 4;
break;
default:
@@ -274,9 +274,9 @@ validate_format_bpp(mesa_format format)
switch (format) {
case MESA_FORMAT_BGRX_UNORM8:
case MESA_FORMAT_BGRA_UNORM8:
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
return 32;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
case MESA_FORMAT_Z_UNORM16:
return 16;
default:
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_screen.c b/src/mesa/drivers/dri/nouveau/nouveau_screen.c
index 262913e..a33c6ae 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_screen.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_screen.c
@@ -53,7 +53,7 @@ nouveau_get_configs(void)
const uint8_t msaa_samples[] = { 0 };
static const mesa_format formats[3] = {
- MESA_FORMAT_RGB565,
+ MESA_FORMAT_B5G6R5_UNORM,
MESA_FORMAT_BGRA_UNORM8,
MESA_FORMAT_BGRX_UNORM8,
};
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_texture.c b/src/mesa/drivers/dri/nouveau/nouveau_texture.c
index 81a28a7..635a42e 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_texture.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_texture.c
@@ -177,7 +177,7 @@ nouveau_choose_tex_format(struct gl_context *ctx, GLenum target,
case GL_COMPRESSED_RGBA:
return MESA_FORMAT_BGRA_UNORM8;
case GL_RGB5_A1:
- return MESA_FORMAT_ARGB1555;
+ return MESA_FORMAT_B5G5R5A1_UNORM;
case GL_RGB:
case GL_RGB8:
@@ -190,7 +190,7 @@ nouveau_choose_tex_format(struct gl_context *ctx, GLenum target,
case GL_R3_G3_B2:
case GL_RGB4:
case GL_RGB5:
- return MESA_FORMAT_RGB565;
+ return MESA_FORMAT_B5G6R5_UNORM;
case 2:
case GL_LUMINANCE_ALPHA:
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_util.h b/src/mesa/drivers/dri/nouveau/nouveau_util.h
index 45e4a7a..42c8624 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_util.h
+++ b/src/mesa/drivers/dri/nouveau/nouveau_util.h
@@ -46,7 +46,7 @@ pack_rgba_i(mesa_format f, uint8_t c[])
return PACK_COLOR_8888(c[RCOMP], c[GCOMP], c[BCOMP], c[ACOMP]);
case MESA_FORMAT_RGBA_UNORM8:
return PACK_COLOR_8888(c[ACOMP], c[BCOMP], c[GCOMP], c[RCOMP]);
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
return PACK_COLOR_565(c[RCOMP], c[GCOMP], c[BCOMP]);
default:
assert(0);
@@ -57,9 +57,9 @@ static inline unsigned
pack_zs_i(mesa_format f, uint32_t z, uint8_t s)
{
switch (f) {
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
return (z & 0xffffff00) | (s & 0xff);
- case MESA_FORMAT_Z24_X8:
+ case MESA_FORMAT_X8Z24_UNORM:
return (z & 0xffffff00);
case MESA_FORMAT_Z_UNORM16:
return (z & 0xffff0000) >> 16;
diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_fb.c b/src/mesa/drivers/dri/nouveau/nv04_state_fb.c
index b4fb1ff..df55a85 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_state_fb.c
+++ b/src/mesa/drivers/dri/nouveau/nv04_state_fb.c
@@ -39,7 +39,7 @@ get_rt_format(mesa_format format)
return NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_X8R8G8B8_X8R8G8B8;
case MESA_FORMAT_BGRA_UNORM8:
return NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_A8R8G8B8;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
return NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_R5G6B5;
default:
assert(0);
diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_tex.c b/src/mesa/drivers/dri/nouveau/nv04_state_tex.c
index f502f70..d8e075f 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_state_tex.c
+++ b/src/mesa/drivers/dri/nouveau/nv04_state_tex.c
@@ -42,11 +42,11 @@ get_tex_format(struct gl_texture_image *ti)
case MESA_FORMAT_L_UNORM8:
case MESA_FORMAT_I_UNORM8:
return NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_Y8;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
return NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_A1R5G5B5;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
return NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_A4R4G4B4;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
return NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_R5G6B5;
case MESA_FORMAT_BGRA_UNORM8:
return NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_A8R8G8B8;
diff --git a/src/mesa/drivers/dri/nouveau/nv04_surface.c b/src/mesa/drivers/dri/nouveau/nv04_surface.c
index 5ba00a7..ea32971 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_surface.c
+++ b/src/mesa/drivers/dri/nouveau/nv04_surface.c
@@ -40,16 +40,16 @@ swzsurf_format(mesa_format format)
case MESA_FORMAT_A_UNORM8:
case MESA_FORMAT_L_UNORM8:
case MESA_FORMAT_I_UNORM8:
- case MESA_FORMAT_RGB332:
+ case MESA_FORMAT_B2G3R3_UNORM:
return NV04_SWIZZLED_SURFACE_FORMAT_COLOR_Y8;
- case MESA_FORMAT_RGB565:
- case MESA_FORMAT_RGB565_REV:
- case MESA_FORMAT_ARGB4444:
- case MESA_FORMAT_ARGB4444_REV:
- case MESA_FORMAT_ARGB1555:
- case MESA_FORMAT_RGBA5551:
- case MESA_FORMAT_ARGB1555_REV:
+ case MESA_FORMAT_B5G6R5_UNORM:
+ case MESA_FORMAT_R5G6B5_UNORM:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
+ case MESA_FORMAT_A4R4G4B4_UNORM:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
+ case MESA_FORMAT_A1B5G5R5_UNORM:
+ case MESA_FORMAT_A1R5G5B5_UNORM:
case MESA_FORMAT_LA_UNORM8:
case MESA_FORMAT_AL_UNORM8:
case MESA_FORMAT_YCBCR:
@@ -62,8 +62,8 @@ swzsurf_format(mesa_format format)
case MESA_FORMAT_BGRX_UNORM8:
case MESA_FORMAT_BGRA_UNORM8:
case MESA_FORMAT_ARGB_UNORM8:
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
case MESA_FORMAT_Z_UNORM32:
return NV04_SWIZZLED_SURFACE_FORMAT_COLOR_A8R8G8B8;
@@ -79,16 +79,16 @@ surf2d_format(mesa_format format)
case MESA_FORMAT_A_UNORM8:
case MESA_FORMAT_L_UNORM8:
case MESA_FORMAT_I_UNORM8:
- case MESA_FORMAT_RGB332:
+ case MESA_FORMAT_B2G3R3_UNORM:
return NV04_CONTEXT_SURFACES_2D_FORMAT_Y8;
- case MESA_FORMAT_RGB565:
- case MESA_FORMAT_RGB565_REV:
- case MESA_FORMAT_ARGB4444:
- case MESA_FORMAT_ARGB4444_REV:
- case MESA_FORMAT_ARGB1555:
- case MESA_FORMAT_RGBA5551:
- case MESA_FORMAT_ARGB1555_REV:
+ case MESA_FORMAT_B5G6R5_UNORM:
+ case MESA_FORMAT_R5G6B5_UNORM:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
+ case MESA_FORMAT_A4R4G4B4_UNORM:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
+ case MESA_FORMAT_A1B5G5R5_UNORM:
+ case MESA_FORMAT_A1R5G5B5_UNORM:
case MESA_FORMAT_LA_UNORM8:
case MESA_FORMAT_AL_UNORM8:
case MESA_FORMAT_YCBCR:
@@ -101,8 +101,8 @@ surf2d_format(mesa_format format)
case MESA_FORMAT_BGRX_UNORM8:
case MESA_FORMAT_BGRA_UNORM8:
case MESA_FORMAT_ARGB_UNORM8:
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
case MESA_FORMAT_Z_UNORM32:
return NV04_CONTEXT_SURFACES_2D_FORMAT_Y32;
@@ -118,16 +118,16 @@ rect_format(mesa_format format)
case MESA_FORMAT_A_UNORM8:
case MESA_FORMAT_L_UNORM8:
case MESA_FORMAT_I_UNORM8:
- case MESA_FORMAT_RGB332:
+ case MESA_FORMAT_B2G3R3_UNORM:
return NV04_GDI_RECTANGLE_TEXT_COLOR_FORMAT_A8R8G8B8;
- case MESA_FORMAT_RGB565:
- case MESA_FORMAT_RGB565_REV:
- case MESA_FORMAT_ARGB4444:
- case MESA_FORMAT_ARGB4444_REV:
- case MESA_FORMAT_ARGB1555:
- case MESA_FORMAT_RGBA5551:
- case MESA_FORMAT_ARGB1555_REV:
+ case MESA_FORMAT_B5G6R5_UNORM:
+ case MESA_FORMAT_R5G6B5_UNORM:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
+ case MESA_FORMAT_A4R4G4B4_UNORM:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
+ case MESA_FORMAT_A1B5G5R5_UNORM:
+ case MESA_FORMAT_A1R5G5B5_UNORM:
case MESA_FORMAT_LA_UNORM8:
case MESA_FORMAT_AL_UNORM8:
case MESA_FORMAT_YCBCR:
@@ -140,8 +140,8 @@ rect_format(mesa_format format)
case MESA_FORMAT_BGRX_UNORM8:
case MESA_FORMAT_BGRA_UNORM8:
case MESA_FORMAT_ARGB_UNORM8:
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
case MESA_FORMAT_Z_UNORM32:
return NV04_GDI_RECTANGLE_TEXT_COLOR_FORMAT_A8R8G8B8;
@@ -157,16 +157,16 @@ sifm_format(mesa_format format)
case MESA_FORMAT_A_UNORM8:
case MESA_FORMAT_L_UNORM8:
case MESA_FORMAT_I_UNORM8:
- case MESA_FORMAT_RGB332:
+ case MESA_FORMAT_B2G3R3_UNORM:
return NV03_SCALED_IMAGE_FROM_MEMORY_COLOR_FORMAT_AY8;
- case MESA_FORMAT_RGB565:
- case MESA_FORMAT_RGB565_REV:
- case MESA_FORMAT_ARGB4444:
- case MESA_FORMAT_ARGB4444_REV:
- case MESA_FORMAT_ARGB1555:
- case MESA_FORMAT_RGBA5551:
- case MESA_FORMAT_ARGB1555_REV:
+ case MESA_FORMAT_B5G6R5_UNORM:
+ case MESA_FORMAT_R5G6B5_UNORM:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
+ case MESA_FORMAT_A4R4G4B4_UNORM:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
+ case MESA_FORMAT_A1B5G5R5_UNORM:
+ case MESA_FORMAT_A1R5G5B5_UNORM:
case MESA_FORMAT_LA_UNORM8:
case MESA_FORMAT_AL_UNORM8:
case MESA_FORMAT_YCBCR:
@@ -179,8 +179,8 @@ sifm_format(mesa_format format)
case MESA_FORMAT_BGRX_UNORM8:
case MESA_FORMAT_BGRA_UNORM8:
case MESA_FORMAT_ARGB_UNORM8:
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
case MESA_FORMAT_Z_UNORM32:
return NV03_SCALED_IMAGE_FROM_MEMORY_COLOR_FORMAT_A8R8G8B8;
diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_fb.c b/src/mesa/drivers/dri/nouveau/nv10_state_fb.c
index c91deae..5c1841b 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_state_fb.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_state_fb.c
@@ -40,11 +40,11 @@ get_rt_format(mesa_format format)
return NV10_3D_RT_FORMAT_COLOR_X8R8G8B8;
case MESA_FORMAT_BGRA_UNORM8:
return NV10_3D_RT_FORMAT_COLOR_A8R8G8B8;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
return NV10_3D_RT_FORMAT_COLOR_R5G6B5;
case MESA_FORMAT_Z_UNORM16:
return NV10_3D_RT_FORMAT_DEPTH_Z16;
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
return NV10_3D_RT_FORMAT_DEPTH_Z24S8;
default:
assert(0);
diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_tex.c b/src/mesa/drivers/dri/nouveau/nv10_state_tex.c
index bb5b677..bcb1bad 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_state_tex.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_state_tex.c
@@ -96,13 +96,13 @@ get_tex_format_pot(struct gl_texture_image *ti)
case MESA_FORMAT_BGRX_UNORM8:
return NV10_3D_TEX_FORMAT_FORMAT_X8R8G8B8;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
return NV10_3D_TEX_FORMAT_FORMAT_A1R5G5B5;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
return NV10_3D_TEX_FORMAT_FORMAT_A4R4G4B4;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
return NV10_3D_TEX_FORMAT_FORMAT_R5G6B5;
case MESA_FORMAT_A_UNORM8:
@@ -131,10 +131,10 @@ static uint32_t
get_tex_format_rect(struct gl_texture_image *ti)
{
switch (ti->TexFormat) {
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
return NV10_3D_TEX_FORMAT_FORMAT_A1R5G5B5_RECT;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
return NV10_3D_TEX_FORMAT_FORMAT_R5G6B5_RECT;
case MESA_FORMAT_BGRA_UNORM8:
diff --git a/src/mesa/drivers/dri/nouveau/nv20_state_fb.c b/src/mesa/drivers/dri/nouveau/nv20_state_fb.c
index d7a3c5a..2129005 100644
--- a/src/mesa/drivers/dri/nouveau/nv20_state_fb.c
+++ b/src/mesa/drivers/dri/nouveau/nv20_state_fb.c
@@ -40,11 +40,11 @@ get_rt_format(mesa_format format)
return NV20_3D_RT_FORMAT_COLOR_X8R8G8B8;
case MESA_FORMAT_BGRA_UNORM8:
return NV20_3D_RT_FORMAT_COLOR_A8R8G8B8;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
return NV20_3D_RT_FORMAT_COLOR_R5G6B5;
case MESA_FORMAT_Z_UNORM16:
return NV20_3D_RT_FORMAT_DEPTH_Z16;
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
return NV20_3D_RT_FORMAT_DEPTH_Z24S8;
default:
assert(0);
@@ -117,7 +117,7 @@ nv20_emit_framebuffer(struct gl_context *ctx, int emit)
if (context_chipset(ctx) >= 0x25)
setup_hierz_buffer(ctx);
} else {
- rt_format |= get_rt_format(MESA_FORMAT_Z24_S8);
+ rt_format |= get_rt_format(MESA_FORMAT_S8_UINT_Z24_UNORM);
zeta_pitch = rt_pitch;
}
diff --git a/src/mesa/drivers/dri/nouveau/nv20_state_tex.c b/src/mesa/drivers/dri/nouveau/nv20_state_tex.c
index 6afdfa8..f2112d9 100644
--- a/src/mesa/drivers/dri/nouveau/nv20_state_tex.c
+++ b/src/mesa/drivers/dri/nouveau/nv20_state_tex.c
@@ -90,16 +90,16 @@ get_tex_format_pot(struct gl_texture_image *ti)
case MESA_FORMAT_BGRA_UNORM8:
return NV20_3D_TEX_FORMAT_FORMAT_A8R8G8B8;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
return NV20_3D_TEX_FORMAT_FORMAT_A1R5G5B5;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
return NV20_3D_TEX_FORMAT_FORMAT_A4R4G4B4;
case MESA_FORMAT_BGRX_UNORM8:
return NV20_3D_TEX_FORMAT_FORMAT_X8R8G8B8;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
return NV20_3D_TEX_FORMAT_FORMAT_R5G6B5;
case MESA_FORMAT_A_UNORM8:
@@ -131,16 +131,16 @@ get_tex_format_rect(struct gl_texture_image *ti)
case MESA_FORMAT_BGRA_UNORM8:
return NV20_3D_TEX_FORMAT_FORMAT_A8R8G8B8_RECT;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
return NV20_3D_TEX_FORMAT_FORMAT_A1R5G5B5_RECT;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
return NV20_3D_TEX_FORMAT_FORMAT_A4R4G4B4_RECT;
case MESA_FORMAT_BGRX_UNORM8:
return NV20_3D_TEX_FORMAT_FORMAT_R8G8B8_RECT;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
return NV20_3D_TEX_FORMAT_FORMAT_R5G6B5_RECT;
case MESA_FORMAT_L_UNORM8:
diff --git a/src/mesa/drivers/dri/r200/r200_blit.c b/src/mesa/drivers/dri/r200/r200_blit.c
index 187339e..f6b196e 100644
--- a/src/mesa/drivers/dri/r200/r200_blit.c
+++ b/src/mesa/drivers/dri/r200/r200_blit.c
@@ -44,9 +44,9 @@ unsigned r200_check_blit(mesa_format mesa_format, uint32_t dst_pitch)
switch (mesa_format) {
case MESA_FORMAT_BGRA_UNORM8:
case MESA_FORMAT_BGRX_UNORM8:
- case MESA_FORMAT_RGB565:
- case MESA_FORMAT_ARGB4444:
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_B5G6R5_UNORM:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
case MESA_FORMAT_A_UNORM8:
case MESA_FORMAT_L_UNORM8:
case MESA_FORMAT_I_UNORM8:
@@ -126,13 +126,13 @@ static void inline emit_tx_setup(struct r200_context *r200,
case MESA_FORMAT_BGRX_UNORM8:
txformat |= R200_TXFORMAT_ARGB8888;
break;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
txformat |= R200_TXFORMAT_RGB565;
break;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
txformat |= R200_TXFORMAT_ARGB4444 | R200_TXFORMAT_ALPHA_IN_MAP;
break;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
txformat |= R200_TXFORMAT_ARGB1555 | R200_TXFORMAT_ALPHA_IN_MAP;
break;
case MESA_FORMAT_A_UNORM8:
@@ -157,9 +157,9 @@ static void inline emit_tx_setup(struct r200_context *r200,
switch (dst_mesa_format) {
case MESA_FORMAT_BGRA_UNORM8:
case MESA_FORMAT_BGRX_UNORM8:
- case MESA_FORMAT_RGB565:
- case MESA_FORMAT_ARGB4444:
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_B5G6R5_UNORM:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
case MESA_FORMAT_A_UNORM8:
case MESA_FORMAT_L_UNORM8:
case MESA_FORMAT_I_UNORM8:
@@ -314,13 +314,13 @@ static inline void emit_cb_setup(struct r200_context *r200,
case MESA_FORMAT_RGBA_UNORM8:
dst_format = RADEON_COLOR_FORMAT_ARGB8888;
break;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
dst_format = RADEON_COLOR_FORMAT_RGB565;
break;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
dst_format = RADEON_COLOR_FORMAT_ARGB4444;
break;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
dst_format = RADEON_COLOR_FORMAT_ARGB1555;
break;
case MESA_FORMAT_A_UNORM8:
diff --git a/src/mesa/drivers/dri/r200/r200_state_init.c b/src/mesa/drivers/dri/r200/r200_state_init.c
index b048a83..537df4f 100644
--- a/src/mesa/drivers/dri/r200/r200_state_init.c
+++ b/src/mesa/drivers/dri/r200/r200_state_init.c
@@ -452,13 +452,13 @@ static void ctx_emit_cs(struct gl_context *ctx, struct radeon_state_atom *atom)
if (rrb->cpp == 4)
atom->cmd[CTX_RB3D_CNTL] |= RADEON_COLOR_FORMAT_ARGB8888;
else switch (rrb->base.Base.Format) {
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
atom->cmd[CTX_RB3D_CNTL] |= RADEON_COLOR_FORMAT_RGB565;
break;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
atom->cmd[CTX_RB3D_CNTL] |= RADEON_COLOR_FORMAT_ARGB4444;
break;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
atom->cmd[CTX_RB3D_CNTL] |= RADEON_COLOR_FORMAT_ARGB1555;
break;
default:
diff --git a/src/mesa/drivers/dri/r200/r200_texstate.c b/src/mesa/drivers/dri/r200/r200_texstate.c
index 831f707..e1bff12 100644
--- a/src/mesa/drivers/dri/r200/r200_texstate.c
+++ b/src/mesa/drivers/dri/r200/r200_texstate.c
@@ -74,12 +74,12 @@ static const struct tx_table tx_table_be[] =
[ MESA_FORMAT_BGRA_UNORM8 ] = { R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
[ MESA_FORMAT_ARGB_UNORM8 ] = { R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
[ MESA_FORMAT_BGR_UNORM8 ] = { 0xffffffff, 0 },
- [ MESA_FORMAT_RGB565 ] = { R200_TXFORMAT_RGB565, 0 },
- [ MESA_FORMAT_RGB565_REV ] = { R200_TXFORMAT_RGB565, 0 },
- [ MESA_FORMAT_ARGB4444 ] = { R200_TXFORMAT_ARGB4444 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
- [ MESA_FORMAT_ARGB4444_REV ] = { R200_TXFORMAT_ARGB4444 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
- [ MESA_FORMAT_ARGB1555 ] = { R200_TXFORMAT_ARGB1555 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
- [ MESA_FORMAT_ARGB1555_REV ] = { R200_TXFORMAT_ARGB1555 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
+ [ MESA_FORMAT_B5G6R5_UNORM ] = { R200_TXFORMAT_RGB565, 0 },
+ [ MESA_FORMAT_R5G6B5_UNORM ] = { R200_TXFORMAT_RGB565, 0 },
+ [ MESA_FORMAT_B4G4R4A4_UNORM ] = { R200_TXFORMAT_ARGB4444 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
+ [ MESA_FORMAT_A4R4G4B4_UNORM ] = { R200_TXFORMAT_ARGB4444 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
+ [ MESA_FORMAT_B5G5R5A1_UNORM ] = { R200_TXFORMAT_ARGB1555 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
+ [ MESA_FORMAT_A1R5G5B5_UNORM ] = { R200_TXFORMAT_ARGB1555 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
[ MESA_FORMAT_LA_UNORM8 ] = { R200_TXFORMAT_AL88 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
[ MESA_FORMAT_AL_UNORM8 ] = { R200_TXFORMAT_AL88 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
[ MESA_FORMAT_A_UNORM8 ] = { R200_TXFORMAT_A8 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
@@ -102,12 +102,12 @@ static const struct tx_table tx_table_le[] =
[ MESA_FORMAT_BGRA_UNORM8 ] = { R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
[ MESA_FORMAT_ARGB_UNORM8 ] = { R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
[ MESA_FORMAT_BGR_UNORM8 ] = { R200_TXFORMAT_ARGB8888, 0 },
- [ MESA_FORMAT_RGB565 ] = { R200_TXFORMAT_RGB565, 0 },
- [ MESA_FORMAT_RGB565_REV ] = { R200_TXFORMAT_RGB565, 0 },
- [ MESA_FORMAT_ARGB4444 ] = { R200_TXFORMAT_ARGB4444 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
- [ MESA_FORMAT_ARGB4444_REV ] = { R200_TXFORMAT_ARGB4444 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
- [ MESA_FORMAT_ARGB1555 ] = { R200_TXFORMAT_ARGB1555 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
- [ MESA_FORMAT_ARGB1555_REV ] = { R200_TXFORMAT_ARGB1555 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
+ [ MESA_FORMAT_B5G6R5_UNORM ] = { R200_TXFORMAT_RGB565, 0 },
+ [ MESA_FORMAT_R5G6B5_UNORM ] = { R200_TXFORMAT_RGB565, 0 },
+ [ MESA_FORMAT_B4G4R4A4_UNORM ] = { R200_TXFORMAT_ARGB4444 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
+ [ MESA_FORMAT_A4R4G4B4_UNORM ] = { R200_TXFORMAT_ARGB4444 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
+ [ MESA_FORMAT_B5G5R5A1_UNORM ] = { R200_TXFORMAT_ARGB1555 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
+ [ MESA_FORMAT_A1R5G5B5_UNORM ] = { R200_TXFORMAT_ARGB1555 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
[ MESA_FORMAT_LA_UNORM8 ] = { R200_TXFORMAT_AL88 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
[ MESA_FORMAT_AL_UNORM8 ] = { R200_TXFORMAT_AL88 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
[ MESA_FORMAT_A_UNORM8 ] = { R200_TXFORMAT_A8 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
@@ -784,9 +784,9 @@ void r200SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint texture_format
t->pp_txfilter |= tx_table_le[MESA_FORMAT_BGR_UNORM8].filter;
break;
case 2:
- texFormat = MESA_FORMAT_RGB565;
- t->pp_txformat = tx_table_le[MESA_FORMAT_RGB565].format;
- t->pp_txfilter |= tx_table_le[MESA_FORMAT_RGB565].filter;
+ texFormat = MESA_FORMAT_B5G6R5_UNORM;
+ t->pp_txformat = tx_table_le[MESA_FORMAT_B5G6R5_UNORM].format;
+ t->pp_txfilter |= tx_table_le[MESA_FORMAT_B5G6R5_UNORM].filter;
break;
}
diff --git a/src/mesa/drivers/dri/radeon/radeon_blit.c b/src/mesa/drivers/dri/radeon/radeon_blit.c
index 04605d0..55bed9a 100644
--- a/src/mesa/drivers/dri/radeon/radeon_blit.c
+++ b/src/mesa/drivers/dri/radeon/radeon_blit.c
@@ -44,9 +44,9 @@ unsigned r100_check_blit(mesa_format mesa_format, uint32_t dst_pitch)
switch (mesa_format) {
case MESA_FORMAT_BGRA_UNORM8:
case MESA_FORMAT_BGRX_UNORM8:
- case MESA_FORMAT_RGB565:
- case MESA_FORMAT_ARGB4444:
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_B5G6R5_UNORM:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
case MESA_FORMAT_A_UNORM8:
case MESA_FORMAT_L_UNORM8:
case MESA_FORMAT_I_UNORM8:
@@ -117,13 +117,13 @@ static void inline emit_tx_setup(struct r100_context *r100,
case MESA_FORMAT_BGRX_UNORM8:
txformat |= RADEON_TXFORMAT_ARGB8888;
break;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
txformat |= RADEON_TXFORMAT_RGB565;
break;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
txformat |= RADEON_TXFORMAT_ARGB4444 | RADEON_TXFORMAT_ALPHA_IN_MAP;
break;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
txformat |= RADEON_TXFORMAT_ARGB1555 | RADEON_TXFORMAT_ALPHA_IN_MAP;
break;
case MESA_FORMAT_A_UNORM8:
@@ -190,13 +190,13 @@ static inline void emit_cb_setup(struct r100_context *r100,
case MESA_FORMAT_BGRX_UNORM8:
dst_format = RADEON_COLOR_FORMAT_ARGB8888;
break;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
dst_format = RADEON_COLOR_FORMAT_RGB565;
break;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
dst_format = RADEON_COLOR_FORMAT_ARGB4444;
break;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
dst_format = RADEON_COLOR_FORMAT_ARGB1555;
break;
case MESA_FORMAT_A_UNORM8:
diff --git a/src/mesa/drivers/dri/radeon/radeon_fbo.c b/src/mesa/drivers/dri/radeon/radeon_fbo.c
index acbecf6..d5c89aa 100644
--- a/src/mesa/drivers/dri/radeon/radeon_fbo.c
+++ b/src/mesa/drivers/dri/radeon/radeon_fbo.c
@@ -310,7 +310,7 @@ radeon_map_renderbuffer(struct gl_context *ctx,
}
if ((rmesa->radeonScreen->chip_flags & RADEON_CHIPSET_DEPTH_ALWAYS_TILED) && !rrb->has_surface) {
- if (rb->Format == MESA_FORMAT_S8_Z24 || rb->Format == MESA_FORMAT_X8_Z24) {
+ if (rb->Format == MESA_FORMAT_Z24_UNORM_S8_UINT || rb->Format == MESA_FORMAT_Z24_UNORM_X8_UINT) {
radeon_map_renderbuffer_s8z24(ctx, rb, x, y, w, h,
mode, out_map, out_stride);
return;
@@ -419,7 +419,7 @@ radeon_unmap_renderbuffer(struct gl_context *ctx,
GLboolean ok;
if ((rmesa->radeonScreen->chip_flags & RADEON_CHIPSET_DEPTH_ALWAYS_TILED) && !rrb->has_surface) {
- if (rb->Format == MESA_FORMAT_S8_Z24 || rb->Format == MESA_FORMAT_X8_Z24) {
+ if (rb->Format == MESA_FORMAT_Z24_UNORM_S8_UINT || rb->Format == MESA_FORMAT_Z24_UNORM_X8_UINT) {
radeon_unmap_renderbuffer_s8z24(ctx, rb);
return;
}
@@ -507,7 +507,7 @@ radeon_alloc_renderbuffer_storage(struct gl_context * ctx, struct gl_renderbuffe
case GL_STENCIL_INDEX8_EXT:
case GL_STENCIL_INDEX16_EXT:
/* alloc a depth+stencil buffer */
- rb->Format = MESA_FORMAT_S8_Z24;
+ rb->Format = MESA_FORMAT_Z24_UNORM_S8_UINT;
cpp = 4;
break;
case GL_DEPTH_COMPONENT16:
@@ -517,12 +517,12 @@ radeon_alloc_renderbuffer_storage(struct gl_context * ctx, struct gl_renderbuffe
case GL_DEPTH_COMPONENT:
case GL_DEPTH_COMPONENT24:
case GL_DEPTH_COMPONENT32:
- rb->Format = MESA_FORMAT_X8_Z24;
+ rb->Format = MESA_FORMAT_Z24_UNORM_X8_UINT;
cpp = 4;
break;
case GL_DEPTH_STENCIL_EXT:
case GL_DEPTH24_STENCIL8_EXT:
- rb->Format = MESA_FORMAT_S8_Z24;
+ rb->Format = MESA_FORMAT_Z24_UNORM_S8_UINT;
cpp = 4;
break;
default:
diff --git a/src/mesa/drivers/dri/radeon/radeon_pixel_read.c b/src/mesa/drivers/dri/radeon/radeon_pixel_read.c
index 6981653..625603c 100644
--- a/src/mesa/drivers/dri/radeon/radeon_pixel_read.c
+++ b/src/mesa/drivers/dri/radeon/radeon_pixel_read.c
@@ -45,9 +45,9 @@ static mesa_format gl_format_and_type_to_mesa_format(GLenum format, GLenum type)
case GL_RGB:
switch (type) {
case GL_UNSIGNED_SHORT_5_6_5:
- return MESA_FORMAT_RGB565;
+ return MESA_FORMAT_B5G6R5_UNORM;
case GL_UNSIGNED_SHORT_5_6_5_REV:
- return MESA_FORMAT_RGB565_REV;
+ return MESA_FORMAT_R5G6B5_UNORM;
}
break;
case GL_RGBA:
@@ -55,7 +55,7 @@ static mesa_format gl_format_and_type_to_mesa_format(GLenum format, GLenum type)
case GL_FLOAT:
return MESA_FORMAT_RGBA_FLOAT32;
case GL_UNSIGNED_SHORT_5_5_5_1:
- return MESA_FORMAT_RGBA5551;
+ return MESA_FORMAT_A1B5G5R5_UNORM;
case GL_UNSIGNED_INT_8_8_8_8:
return MESA_FORMAT_ABGR_UNORM8;
case GL_UNSIGNED_BYTE:
@@ -66,13 +66,13 @@ static mesa_format gl_format_and_type_to_mesa_format(GLenum format, GLenum type)
case GL_BGRA:
switch (type) {
case GL_UNSIGNED_SHORT_4_4_4_4:
- return MESA_FORMAT_ARGB4444_REV;
+ return MESA_FORMAT_A4R4G4B4_UNORM;
case GL_UNSIGNED_SHORT_4_4_4_4_REV:
- return MESA_FORMAT_ARGB4444;
+ return MESA_FORMAT_B4G4R4A4_UNORM;
case GL_UNSIGNED_SHORT_5_5_5_1:
- return MESA_FORMAT_ARGB1555_REV;
+ return MESA_FORMAT_A1R5G5B5_UNORM;
case GL_UNSIGNED_SHORT_1_5_5_5_REV:
- return MESA_FORMAT_ARGB1555;
+ return MESA_FORMAT_B5G5R5A1_UNORM;
case GL_UNSIGNED_INT_8_8_8_8:
return MESA_FORMAT_ARGB_UNORM8;
case GL_UNSIGNED_BYTE:
diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c
index 1c8748e..888f347 100644
--- a/src/mesa/drivers/dri/radeon/radeon_screen.c
+++ b/src/mesa/drivers/dri/radeon/radeon_screen.c
@@ -214,7 +214,7 @@ radeon_create_image_from_name(__DRIscreen *screen,
switch (format) {
case __DRI_IMAGE_FORMAT_RGB565:
- image->format = MESA_FORMAT_RGB565;
+ image->format = MESA_FORMAT_B5G6R5_UNORM;
image->internal_format = GL_RGB;
image->data_type = GL_UNSIGNED_BYTE;
break;
@@ -314,7 +314,7 @@ radeon_create_image(__DRIscreen *screen,
switch (format) {
case __DRI_IMAGE_FORMAT_RGB565:
- image->format = MESA_FORMAT_RGB565;
+ image->format = MESA_FORMAT_B5G6R5_UNORM;
image->internal_format = GL_RGB;
image->data_type = GL_UNSIGNED_BYTE;
break;
@@ -611,7 +611,7 @@ radeonCreateBuffer( __DRIscreen *driScrnPriv,
_mesa_initialize_window_framebuffer(&rfb->base, mesaVis);
if (mesaVis->redBits == 5)
- rgbFormat = _mesa_little_endian() ? MESA_FORMAT_RGB565 : MESA_FORMAT_RGB565_REV;
+ rgbFormat = _mesa_little_endian() ? MESA_FORMAT_B5G6R5_UNORM : MESA_FORMAT_R5G6B5_UNORM;
else if (mesaVis->alphaBits == 0)
rgbFormat = _mesa_little_endian() ? MESA_FORMAT_BGRX_UNORM8 : MESA_FORMAT_XRGB_UNORM8;
else
@@ -632,14 +632,14 @@ radeonCreateBuffer( __DRIscreen *driScrnPriv,
if (mesaVis->depthBits == 24) {
if (mesaVis->stencilBits == 8) {
struct radeon_renderbuffer *depthStencilRb =
- radeon_create_renderbuffer(MESA_FORMAT_S8_Z24, driDrawPriv);
+ radeon_create_renderbuffer(MESA_FORMAT_Z24_UNORM_S8_UINT, driDrawPriv);
_mesa_add_renderbuffer(&rfb->base, BUFFER_DEPTH, &depthStencilRb->base.Base);
_mesa_add_renderbuffer(&rfb->base, BUFFER_STENCIL, &depthStencilRb->base.Base);
depthStencilRb->has_surface = screen->depthHasSurface;
} else {
/* depth renderbuffer */
struct radeon_renderbuffer *depth =
- radeon_create_renderbuffer(MESA_FORMAT_X8_Z24, driDrawPriv);
+ radeon_create_renderbuffer(MESA_FORMAT_Z24_UNORM_X8_UINT, driDrawPriv);
_mesa_add_renderbuffer(&rfb->base, BUFFER_DEPTH, &depth->base.Base);
depth->has_surface = screen->depthHasSurface;
}
@@ -709,7 +709,7 @@ static const
__DRIconfig **radeonInitScreen2(__DRIscreen *psp)
{
static const mesa_format formats[3] = {
- MESA_FORMAT_RGB565,
+ MESA_FORMAT_B5G6R5_UNORM,
MESA_FORMAT_BGRX_UNORM8,
MESA_FORMAT_BGRA_UNORM8
};
diff --git a/src/mesa/drivers/dri/radeon/radeon_state_init.c b/src/mesa/drivers/dri/radeon/radeon_state_init.c
index 8c88dd0..77298b1 100644
--- a/src/mesa/drivers/dri/radeon/radeon_state_init.c
+++ b/src/mesa/drivers/dri/radeon/radeon_state_init.c
@@ -335,13 +335,13 @@ static void ctx_emit_cs(struct gl_context *ctx, struct radeon_state_atom *atom)
if (rrb->cpp == 4)
atom->cmd[CTX_RB3D_CNTL] |= RADEON_COLOR_FORMAT_ARGB8888;
else switch (rrb->base.Base.Format) {
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
atom->cmd[CTX_RB3D_CNTL] |= RADEON_COLOR_FORMAT_RGB565;
break;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
atom->cmd[CTX_RB3D_CNTL] |= RADEON_COLOR_FORMAT_ARGB4444;
break;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
atom->cmd[CTX_RB3D_CNTL] |= RADEON_COLOR_FORMAT_ARGB1555;
break;
default:
diff --git a/src/mesa/drivers/dri/radeon/radeon_tex_copy.c b/src/mesa/drivers/dri/radeon/radeon_tex_copy.c
index 0fc2fec..d12f98a 100644
--- a/src/mesa/drivers/dri/radeon/radeon_tex_copy.c
+++ b/src/mesa/drivers/dri/radeon/radeon_tex_copy.c
@@ -108,8 +108,8 @@ do_copy_texsubimage(struct gl_context *ctx,
switch (dst_bpp) {
case 2:
- src_mesaformat = MESA_FORMAT_RGB565;
- dst_mesaformat = MESA_FORMAT_RGB565;
+ src_mesaformat = MESA_FORMAT_B5G6R5_UNORM;
+ dst_mesaformat = MESA_FORMAT_B5G6R5_UNORM;
break;
case 4:
src_mesaformat = MESA_FORMAT_BGRA_UNORM8;
diff --git a/src/mesa/drivers/dri/radeon/radeon_texstate.c b/src/mesa/drivers/dri/radeon/radeon_texstate.c
index 8ee1e51..fe69a2c 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texstate.c
+++ b/src/mesa/drivers/dri/radeon/radeon_texstate.c
@@ -79,12 +79,12 @@ static const struct tx_table tx_table[] =
[ MESA_FORMAT_BGRA_UNORM8 ] = { RADEON_TXFORMAT_ARGB8888 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
[ MESA_FORMAT_ARGB_UNORM8 ] = { RADEON_TXFORMAT_ARGB8888 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
[ MESA_FORMAT_BGR_UNORM8 ] = { RADEON_TXFORMAT_ARGB8888, 0 },
- [ MESA_FORMAT_RGB565 ] = { RADEON_TXFORMAT_RGB565, 0 },
- [ MESA_FORMAT_RGB565_REV ] = { RADEON_TXFORMAT_RGB565, 0 },
- [ MESA_FORMAT_ARGB4444 ] = { RADEON_TXFORMAT_ARGB4444 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
- [ MESA_FORMAT_ARGB4444_REV ] = { RADEON_TXFORMAT_ARGB4444 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
- [ MESA_FORMAT_ARGB1555 ] = { RADEON_TXFORMAT_ARGB1555 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
- [ MESA_FORMAT_ARGB1555_REV ] = { RADEON_TXFORMAT_ARGB1555 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
+ [ MESA_FORMAT_B5G6R5_UNORM ] = { RADEON_TXFORMAT_RGB565, 0 },
+ [ MESA_FORMAT_R5G6B5_UNORM ] = { RADEON_TXFORMAT_RGB565, 0 },
+ [ MESA_FORMAT_B4G4R4A4_UNORM ] = { RADEON_TXFORMAT_ARGB4444 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
+ [ MESA_FORMAT_A4R4G4B4_UNORM ] = { RADEON_TXFORMAT_ARGB4444 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
+ [ MESA_FORMAT_B5G5R5A1_UNORM ] = { RADEON_TXFORMAT_ARGB1555 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
+ [ MESA_FORMAT_A1R5G5B5_UNORM ] = { RADEON_TXFORMAT_ARGB1555 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
[ MESA_FORMAT_LA_UNORM8 ] = { RADEON_TXFORMAT_AL88 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
[ MESA_FORMAT_AL_UNORM8 ] = { RADEON_TXFORMAT_AL88 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
[ MESA_FORMAT_A_UNORM8 ] = { RADEON_TXFORMAT_A8 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
@@ -659,9 +659,9 @@ void radeonSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint texture_form
t->pp_txfilter |= tx_table[MESA_FORMAT_BGR_UNORM8].filter;
break;
case 2:
- texFormat = MESA_FORMAT_RGB565;
- t->pp_txformat = tx_table[MESA_FORMAT_RGB565].format;
- t->pp_txfilter |= tx_table[MESA_FORMAT_RGB565].filter;
+ texFormat = MESA_FORMAT_B5G6R5_UNORM;
+ t->pp_txformat = tx_table[MESA_FORMAT_B5G6R5_UNORM].format;
+ t->pp_txfilter |= tx_table[MESA_FORMAT_B5G6R5_UNORM].filter;
break;
}
diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c
index ae5c319..84baf4f 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texture.c
+++ b/src/mesa/drivers/dri/radeon/radeon_texture.c
@@ -433,7 +433,7 @@ mesa_format radeonChooseTextureFormat(struct gl_context * ctx,
case GL_DEPTH_COMPONENT32:
case GL_DEPTH_STENCIL_EXT:
case GL_DEPTH24_STENCIL8_EXT:
- return MESA_FORMAT_S8_Z24;
+ return MESA_FORMAT_Z24_UNORM_S8_UINT;
/* EXT_texture_sRGB */
case GL_SRGB:
@@ -513,7 +513,7 @@ unsigned radeonIsFormatRenderable(mesa_format mesa_format)
switch (mesa_format)
{
case MESA_FORMAT_Z_UNORM16:
- case MESA_FORMAT_S8_Z24:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
return 1;
default:
return 0;
@@ -594,17 +594,17 @@ radeonInitTextureFormats(void)
if (_mesa_little_endian()) {
_radeon_texformat_rgba8888 = MESA_FORMAT_ABGR_UNORM8;
_radeon_texformat_argb8888 = MESA_FORMAT_BGRA_UNORM8;
- _radeon_texformat_rgb565 = MESA_FORMAT_RGB565;
- _radeon_texformat_argb4444 = MESA_FORMAT_ARGB4444;
- _radeon_texformat_argb1555 = MESA_FORMAT_ARGB1555;
+ _radeon_texformat_rgb565 = MESA_FORMAT_B5G6R5_UNORM;
+ _radeon_texformat_argb4444 = MESA_FORMAT_B4G4R4A4_UNORM;
+ _radeon_texformat_argb1555 = MESA_FORMAT_B5G5R5A1_UNORM;
_radeon_texformat_al88 = MESA_FORMAT_LA_UNORM8;
}
else {
_radeon_texformat_rgba8888 = MESA_FORMAT_RGBA_UNORM8;
_radeon_texformat_argb8888 = MESA_FORMAT_ARGB_UNORM8;
- _radeon_texformat_rgb565 = MESA_FORMAT_RGB565_REV;
- _radeon_texformat_argb4444 = MESA_FORMAT_ARGB4444_REV;
- _radeon_texformat_argb1555 = MESA_FORMAT_ARGB1555_REV;
+ _radeon_texformat_rgb565 = MESA_FORMAT_R5G6B5_UNORM;
+ _radeon_texformat_argb4444 = MESA_FORMAT_A4R4G4B4_UNORM;
+ _radeon_texformat_argb1555 = MESA_FORMAT_A1R5G5B5_UNORM;
_radeon_texformat_al88 = MESA_FORMAT_AL_UNORM8;
}
}
diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c
index f069d19..9d40ead 100644
--- a/src/mesa/drivers/dri/swrast/swrast.c
+++ b/src/mesa/drivers/dri/swrast/swrast.c
@@ -166,7 +166,7 @@ swrastFillInModes(__DRIscreen *psp,
switch (pixel_bits) {
case 16:
- format = MESA_FORMAT_RGB565;
+ format = MESA_FORMAT_B5G6R5_UNORM;
break;
case 24:
format = MESA_FORMAT_BGRX_UNORM8;
@@ -357,13 +357,13 @@ swrast_new_renderbuffer(const struct gl_config *visual, __DRIdrawable *dPriv,
xrb->bpp = 32;
break;
case PF_R5G6B5:
- rb->Format = MESA_FORMAT_RGB565;
+ rb->Format = MESA_FORMAT_B5G6R5_UNORM;
rb->InternalFormat = GL_RGB;
rb->_BaseFormat = GL_RGB;
xrb->bpp = 16;
break;
case PF_R3G3B2:
- rb->Format = MESA_FORMAT_RGB332;
+ rb->Format = MESA_FORMAT_B2G3R3_UNORM;
rb->InternalFormat = GL_RGB;
rb->_BaseFormat = GL_RGB;
xrb->bpp = 8;
diff --git a/src/mesa/drivers/haiku/swrast/SoftwareRast.cpp b/src/mesa/drivers/haiku/swrast/SoftwareRast.cpp
index cc6392a..1f6f94d 100644
--- a/src/mesa/drivers/haiku/swrast/SoftwareRast.cpp
+++ b/src/mesa/drivers/haiku/swrast/SoftwareRast.cpp
@@ -605,11 +605,11 @@ MesaSoftwareRast::_SetupRenderBuffer(struct gl_renderbuffer* rb,
break;
case B_RGB16:
rb->_BaseFormat = GL_RGB;
- rb->Format = MESA_FORMAT_RGB565;
+ rb->Format = MESA_FORMAT_B5G6R5_UNORM;
break;
case B_RGB15:
rb->_BaseFormat = GL_RGB;
- rb->Format = MESA_FORMAT_ARGB1555;
+ rb->Format = MESA_FORMAT_B5G5R5A1_UNORM;
break;
default:
fprintf(stderr, "Unsupported screen color space %s\n",
diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c
index bd97355..a0c788f 100644
--- a/src/mesa/drivers/osmesa/osmesa.c
+++ b/src/mesa/drivers/osmesa/osmesa.c
@@ -520,7 +520,7 @@ osmesa_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
}
else if (osmesa->format == OSMESA_RGB_565) {
ASSERT(osmesa->DataType == GL_UNSIGNED_BYTE);
- rb->Format = MESA_FORMAT_RGB565;
+ rb->Format = MESA_FORMAT_B5G6R5_UNORM;
}
else {
_mesa_problem(ctx, "bad pixel format in osmesa renderbuffer_storage");
diff --git a/src/mesa/drivers/x11/xm_buffer.c b/src/mesa/drivers/x11/xm_buffer.c
index d6d3a15..a9ca7b0 100644
--- a/src/mesa/drivers/x11/xm_buffer.c
+++ b/src/mesa/drivers/x11/xm_buffer.c
@@ -352,7 +352,7 @@ xmesa_new_renderbuffer(struct gl_context *ctx, GLuint name,
xrb->Base.Base.Format = MESA_FORMAT_RGBA_UNORM8;
break;
case PF_5R6G5B:
- xrb->Base.Base.Format = MESA_FORMAT_RGB565;
+ xrb->Base.Base.Format = MESA_FORMAT_B5G6R5_UNORM;
break;
default:
_mesa_warning(ctx, "Bad pixel format in xmesa_new_renderbuffer");
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 2953d73..b5f3834 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -539,7 +539,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:;
@@ -669,7 +669,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;
}
@@ -2929,7 +2929,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 a46e439..969b980 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)
@@ -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)
@@ -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)
@@ -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
@@ -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)
@@ -1899,19 +1899,19 @@ _mesa_get_pack_ubyte_rgba_function(mesa_format format)
table[MESA_FORMAT_XRGB_UNORM8] = 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_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_LA_UNORM8] = pack_ubyte_AL88;
table[MESA_FORMAT_AL_UNORM8] = pack_ubyte_AL88_REV;
table[MESA_FORMAT_LA_UNORM16] = pack_ubyte_AL1616;
table[MESA_FORMAT_AL_UNORM16] = pack_ubyte_AL1616_REV;
- table[MESA_FORMAT_RGB332] = pack_ubyte_RGB332;
+ 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;
@@ -1926,15 +1926,15 @@ _mesa_get_pack_ubyte_rgba_function(mesa_format format)
table[MESA_FORMAT_R_UNORM16] = pack_ubyte_R16;
table[MESA_FORMAT_RG_UNORM16] = pack_ubyte_GR1616;
table[MESA_FORMAT_GR_UNORM16] = pack_ubyte_RG1616;
- table[MESA_FORMAT_ARGB2101010] = pack_ubyte_ARGB2101010;
- table[MESA_FORMAT_ABGR2101010_UINT] = pack_ubyte_ABGR2101010_UINT;
+ 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_S8_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_X8_UINT] = NULL;
+ table[MESA_FORMAT_X8Z24_UNORM] = NULL;
table[MESA_FORMAT_Z_UNORM32] = NULL;
table[MESA_FORMAT_S_UINT8] = NULL;
@@ -2009,16 +2009,16 @@ _mesa_get_pack_ubyte_rgba_function(mesa_format format)
table[MESA_FORMAT_RGBA_16] = 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_B4G4R4X4_UNORM] = pack_ubyte_XRGB4444_UNORM;
+ table[MESA_FORMAT_B5G5R5X1_UNORM] = pack_ubyte_XRGB1555_UNORM;
table[MESA_FORMAT_XBGR8888_SNORM] = NULL;
table[MESA_FORMAT_XBGR8888_SRGB] = NULL;
table[MESA_FORMAT_XBGR8888_UINT] = NULL;
table[MESA_FORMAT_XBGR8888_SINT] = NULL;
- table[MESA_FORMAT_XRGB2101010_UNORM] = pack_ubyte_XRGB2101010_UNORM;
+ table[MESA_FORMAT_B10G10R10X2_UNORM] = pack_ubyte_XRGB2101010_UNORM;
table[MESA_FORMAT_XBGR16161616_UNORM] = pack_ubyte_XBGR16161616_UNORM;
table[MESA_FORMAT_XBGR16161616_SNORM] = NULL;
table[MESA_FORMAT_XBGR16161616_FLOAT] = NULL;
@@ -2062,20 +2062,20 @@ _mesa_get_pack_float_rgba_function(mesa_format format)
table[MESA_FORMAT_XRGB_UNORM8] = 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_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_LA_UNORM8] = pack_float_AL88;
table[MESA_FORMAT_AL_UNORM8] = pack_float_AL88_REV;
table[MESA_FORMAT_LA_UNORM16] = pack_float_AL1616;
table[MESA_FORMAT_AL_UNORM16] = pack_float_AL1616_REV;
- table[MESA_FORMAT_RGB332] = pack_float_RGB332;
+ 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;
@@ -2090,15 +2090,15 @@ _mesa_get_pack_float_rgba_function(mesa_format format)
table[MESA_FORMAT_R_UNORM16] = pack_float_R16;
table[MESA_FORMAT_RG_UNORM16] = pack_float_GR1616;
table[MESA_FORMAT_GR_UNORM16] = pack_float_RG1616;
- table[MESA_FORMAT_ARGB2101010] = pack_float_ARGB2101010;
- table[MESA_FORMAT_ABGR2101010_UINT] = pack_float_ABGR2101010_UINT;
+ 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_S8_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_X8_UINT] = NULL;
+ table[MESA_FORMAT_X8Z24_UNORM] = NULL;
table[MESA_FORMAT_Z_UNORM32] = NULL;
table[MESA_FORMAT_S_UINT8] = NULL;
@@ -2169,16 +2169,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_B4G4R4X4_UNORM] = pack_float_XRGB4444_UNORM;
+ table[MESA_FORMAT_B5G5R5X1_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_XBGR8888_UINT] = NULL;
table[MESA_FORMAT_XBGR8888_SINT] = NULL;
- table[MESA_FORMAT_XRGB2101010_UNORM] = pack_float_XRGB2101010_UNORM;
+ table[MESA_FORMAT_B10G10R10X2_UNORM] = pack_float_XRGB2101010_UNORM;
table[MESA_FORMAT_XBGR16161616_UNORM] = pack_float_XBGR16161616_UNORM;
table[MESA_FORMAT_XBGR16161616_SNORM] = pack_float_XBGR16161616_SNORM;
table[MESA_FORMAT_XBGR16161616_FLOAT] = pack_float_XBGR16161616_FLOAT;
@@ -2223,8 +2223,8 @@ get_pack_float_rgba_row_function(mesa_format format)
table[MESA_FORMAT_XRGB_UNORM8] = 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 +2256,8 @@ get_pack_ubyte_rgba_row_function(mesa_format format)
table[MESA_FORMAT_XRGB_UNORM8] = 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 +2426,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_S8_UINT:
+ case MESA_FORMAT_Z24_UNORM_X8_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 +2511,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_S8_UINT:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
return pack_uint_z_S8_Z24;
case MESA_FORMAT_Z_UNORM16:
return pack_uint_z_Z16;
@@ -2523,7 +2523,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 +2575,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_S8_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 +2597,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 +2612,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_S8_UINT:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
{
/* don't disturb the stencil values */
GLuint *d = ((GLuint *) dst);
@@ -2650,7 +2650,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 +2673,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 +2686,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_S8_UINT:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
{
/* don't disturb the stencil values */
GLuint *d = ((GLuint *) dst);
@@ -2723,7 +2723,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 +2746,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 +2758,7 @@ _mesa_pack_ubyte_stencil_row(mesa_format format, GLuint n,
}
}
break;
- case MESA_FORMAT_S8_Z24:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
{
/* don't disturb the Z values */
GLuint *d = ((GLuint *) dst);
@@ -2773,7 +2773,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 +2796,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_S8_UINT:
{
GLuint *d = ((GLuint *) dst);
GLuint i;
@@ -2810,7 +2810,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 6752367..d621d63 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_XRGB_UNORM8] = 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_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_LA_UNORM8] = unpack_AL88;
table[MESA_FORMAT_AL_UNORM8] = unpack_AL88_REV;
table[MESA_FORMAT_LA_UNORM16] = unpack_AL1616;
table[MESA_FORMAT_AL_UNORM16] = unpack_AL1616_REV;
- table[MESA_FORMAT_RGB332] = unpack_RGB332;
+ 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;
@@ -2356,14 +2356,14 @@ get_unpack_rgba_function(mesa_format format)
table[MESA_FORMAT_R_UNORM16] = unpack_R16;
table[MESA_FORMAT_RG_UNORM16] = unpack_GR1616;
table[MESA_FORMAT_GR_UNORM16] = 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_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_S8_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_X8_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_SBGR_UNORM8] = unpack_SRGB8;
@@ -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_B4G4R4X4_UNORM] = unpack_XRGB4444_UNORM;
+ table[MESA_FORMAT_B5G5R5X1_UNORM] = unpack_XRGB1555_UNORM;
table[MESA_FORMAT_XBGR8888_SNORM] = unpack_XBGR8888_SNORM;
table[MESA_FORMAT_XBGR8888_SRGB] = unpack_XBGR8888_SRGB;
table[MESA_FORMAT_XBGR8888_UINT] = unpack_XBGR8888_UINT;
table[MESA_FORMAT_XBGR8888_SINT] = unpack_XBGR8888_SINT;
- table[MESA_FORMAT_XRGB2101010_UNORM] = unpack_XRGB2101010_UNORM;
+ table[MESA_FORMAT_B10G10R10X2_UNORM] = unpack_XRGB2101010_UNORM;
table[MESA_FORMAT_XBGR16161616_UNORM] = unpack_XBGR16161616_UNORM;
table[MESA_FORMAT_XBGR16161616_SNORM] = unpack_XBGR16161616_SNORM;
table[MESA_FORMAT_XBGR16161616_FLOAT] = unpack_XBGR16161616_FLOAT;
@@ -2947,28 +2947,28 @@ _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_LA_UNORM8:
@@ -2977,7 +2977,7 @@ _mesa_unpack_ubyte_rgba_row(mesa_format format, GLuint n,
case MESA_FORMAT_AL_UNORM8:
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:
@@ -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;
@@ -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_S8_UINT:
+ case MESA_FORMAT_Z24_UNORM_X8_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_S8_UINT:
+ case MESA_FORMAT_Z24_UNORM_X8_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_S8_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_S8_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 4eac938..aa39e1a 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 */
@@ -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 */
@@ -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_S8_UINT, /* Name */
+ "MESA_FORMAT_Z24_UNORM_S8_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_X8_UINT, /* Name */
+ "MESA_FORMAT_Z24_UNORM_X8_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 */
@@ -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,
@@ -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,
@@ -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;
}
@@ -2376,37 +2376,37 @@ _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;
@@ -2435,7 +2435,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;
@@ -2455,12 +2455,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_S8_UINT:
*datatype = GL_UNSIGNED_INT_8_24_REV_MESA;
*comps = 2;
return;
@@ -2470,12 +2470,12 @@ _mesa_format_to_type_and_comps(mesa_format format,
*comps = 1;
return;
- case MESA_FORMAT_X8_Z24:
+ case MESA_FORMAT_Z24_UNORM_X8_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;
@@ -2490,7 +2490,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;
@@ -2803,18 +2803,18 @@ _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;
@@ -2831,7 +2831,7 @@ _mesa_format_to_type_and_comps(mesa_format format,
*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;
@@ -3020,35 +3020,35 @@ _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_LA_UNORM8:
case MESA_FORMAT_SLA_UNORM8:
@@ -3061,7 +3061,7 @@ _mesa_format_matches_format_and_type(mesa_format mesa_format,
case MESA_FORMAT_AL_UNORM16:
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:
@@ -3103,22 +3103,22 @@ _mesa_format_matches_format_and_type(mesa_format mesa_format,
case MESA_FORMAT_GR_UNORM16:
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_S8_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_X8_UINT:
return GL_FALSE;
case MESA_FORMAT_Z_UNORM32:
@@ -3383,38 +3383,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_B4G4R4X4_UNORM:
+ case MESA_FORMAT_B5G5R5X1_UNORM:
case MESA_FORMAT_XBGR8888_SNORM:
case MESA_FORMAT_XBGR8888_SRGB:
case MESA_FORMAT_XBGR8888_UINT:
case MESA_FORMAT_XBGR8888_SINT:
- case MESA_FORMAT_XRGB2101010_UNORM:
+ case MESA_FORMAT_B10G10R10X2_UNORM:
case MESA_FORMAT_XBGR16161616_UNORM:
case MESA_FORMAT_XBGR16161616_SNORM:
case MESA_FORMAT_XBGR16161616_FLOAT:
diff --git a/src/mesa/main/formats.h b/src/mesa/main/formats.h
index 348d2f4..fb43c83 100644
--- a/src/mesa/main/formats.h
+++ b/src/mesa/main/formats.h
@@ -182,14 +182,14 @@ typedef enum
MESA_FORMAT_RGB_UNORM8,
/* 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_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, /* ARRR RRGG GGGB BBBB */
+ MESA_FORMAT_B5G5R5A1_UNORM, /* BBBB BGGG GGRR RRRA */
+ MESA_FORMAT_A1R5G5B5_UNORM, /* ARRR RRGG GGGB BBBB */
+ MESA_FORMAT_L4A4_UNORM, /* LLLL AAAA */
/* Type A Luminance Alpha formats */
MESA_FORMAT_LA_UNORM8, /* uchar[i * 2 + 0] = L, uchar[i * 2 + 1] = A */
@@ -198,7 +198,7 @@ typedef enum
MESA_FORMAT_AL_UNORM16,
/* Type P format */
- MESA_FORMAT_RGB332, /* RRRG GGBB */
+ MESA_FORMAT_B2G3R3_UNORM, /* BBGG GRRR */
/* Type A formats */
MESA_FORMAT_A_UNORM8,
@@ -221,16 +221,16 @@ typedef enum
MESA_FORMAT_GR_UNORM16,
/* Type P formats */
- 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_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_S8_UINT, /* ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ SSSS SSSS */
/* Type A format */
MESA_FORMAT_Z_UNORM16,
/* 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_X8_UINT, /* ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ xxxx xxxx */
+ MESA_FORMAT_X8Z24_UNORM, /* xxxx xxxx ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ */
/* Type A formats */
MESA_FORMAT_Z_UNORM32, /* ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ */
@@ -405,20 +405,20 @@ typedef enum
MESA_FORMAT_SIGNED_I16, /* IIII IIII IIII IIII */
/* Type P formats */
- MESA_FORMAT_RGB9_E5_FLOAT,
- MESA_FORMAT_R11_G11_B10_FLOAT,
+ MESA_FORMAT_R9G9B9E5_FLOAT,
+ MESA_FORMAT_R11G11B10_FLOAT,
/* Type A format */
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_B4G4R4X4_UNORM, /* BBBB GGGG RRRR xxxx */
+ MESA_FORMAT_B5G5R5X1_UNORM, /* BBBB BGGG GGRR RRRx */
/* Type A formats */
MESA_FORMAT_XBGR8888_SNORM, /* xxxx xxxx BBBB BBBB GGGG GGGG RRRR RRRR */
@@ -427,7 +427,7 @@ typedef enum
MESA_FORMAT_XBGR8888_SINT, /* xxxx xxxx BBBB BBBB GGGG GGGG RRRR RRRR */
/* Type P format */
- MESA_FORMAT_XRGB2101010_UNORM, /* xxRR RRRR RRRR GGGG GGGG GGBB BBBB BBBB */
+ MESA_FORMAT_B10G10R10X2_UNORM, /* BBBB BBBB BBGG GGGG GGGG RRRR RRRR RRxx */
/* Type A formats */
MESA_FORMAT_XBGR16161616_UNORM,/* ushort[3]=x, [2]=B, [1]=G, [0]=R */
diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
index 0291a83..d45eea7 100644
--- a/src/mesa/main/framebuffer.c
+++ b/src/mesa/main/framebuffer.c
@@ -814,7 +814,7 @@ _mesa_get_color_read_format(struct gl_context *ctx)
if (format == MESA_FORMAT_BGRA_UNORM8)
return GL_BGRA;
- else if (format == MESA_FORMAT_RGB565)
+ else if (format == MESA_FORMAT_B5G6R5_UNORM)
return GL_BGR;
switch (data_type) {
@@ -847,7 +847,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 6721d47..27c3432 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_S8_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 60ce40c..4bd0303 100644
--- a/src/mesa/main/shaderimage.c
+++ b/src/mesa/main/shaderimage.c
@@ -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;
@@ -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:
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c
index 42cf4fb..a7d9bce 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_ABGR_UNORM8);
RETURN_IF_SUPPORTED(MESA_FORMAT_BGRA_UNORM8);
@@ -85,19 +85,19 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
RETURN_IF_SUPPORTED(MESA_FORMAT_BGRA_UNORM8);
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_BGRA_UNORM8);
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_BGRA_UNORM8);
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_BGRX_UNORM8);
RETURN_IF_SUPPORTED(MESA_FORMAT_BGRA_UNORM8);
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,7 +175,7 @@ _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_L4A4_UNORM);
RETURN_IF_SUPPORTED(MESA_FORMAT_LA_UNORM8);
break;
@@ -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_X8_UINT);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_Z24_UNORM_S8_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_X8_UINT);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_Z24_UNORM_S8_UINT);
break;
case GL_COMPRESSED_ALPHA_ARB:
@@ -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_S8_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:
@@ -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/texparam.c b/src/mesa/main/texparam.c
index 8145a65..e915ddd 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 c92a3e4..f08b2ed 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_X8_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);
{
@@ -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_S8_UINT);
ASSERT(srcFormat == GL_DEPTH_STENCIL_EXT ||
srcFormat == GL_DEPTH_COMPONENT ||
srcFormat == GL_STENCIL_INDEX);
@@ -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);
{
@@ -3670,19 +3670,19 @@ _mesa_get_texstore_func(mesa_format format)
table[MESA_FORMAT_XRGB_UNORM8] = _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_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_LA_UNORM8] = _mesa_texstore_unorm88;
table[MESA_FORMAT_AL_UNORM8] = _mesa_texstore_unorm88;
table[MESA_FORMAT_LA_UNORM16] = _mesa_texstore_unorm1616;
table[MESA_FORMAT_AL_UNORM16] = _mesa_texstore_unorm1616;
- table[MESA_FORMAT_RGB332] = store_ubyte_texture;
+ 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;
@@ -3697,12 +3697,12 @@ _mesa_get_texstore_func(mesa_format format)
table[MESA_FORMAT_R_UNORM16] = _mesa_texstore_unorm16;
table[MESA_FORMAT_RG_UNORM16] = _mesa_texstore_unorm1616;
table[MESA_FORMAT_GR_UNORM16] = _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_B10G10R10A2_UNORM] = _mesa_texstore_argb2101010;
+ table[MESA_FORMAT_S8_UINT_Z24_UNORM] = _mesa_texstore_z24_s8;
+ table[MESA_FORMAT_Z24_UNORM_S8_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_X8_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_SBGR_UNORM8] = _mesa_texstore_srgb8;
@@ -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_B4G4R4X4_UNORM] = store_ubyte_texture;
+ table[MESA_FORMAT_B5G5R5X1_UNORM] = store_ubyte_texture;
table[MESA_FORMAT_XBGR8888_SNORM] = _mesa_texstore_signed_rgbx8888;
table[MESA_FORMAT_XBGR8888_SRGB] = _mesa_texstore_srgba8;
table[MESA_FORMAT_XBGR8888_UINT] = _mesa_texstore_rgba_uint8;
table[MESA_FORMAT_XBGR8888_SINT] = _mesa_texstore_rgba_int8;
- table[MESA_FORMAT_XRGB2101010_UNORM] = _mesa_texstore_argb2101010;
+ table[MESA_FORMAT_B10G10R10X2_UNORM] = _mesa_texstore_argb2101010;
table[MESA_FORMAT_XBGR16161616_UNORM] = _mesa_texstore_rgba_16;
table[MESA_FORMAT_XBGR16161616_SNORM] = _mesa_texstore_signed_rgba_16;
table[MESA_FORMAT_XBGR16161616_FLOAT] = _mesa_texstore_rgba_float16;
diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c
index 73c4704..1041214 100644
--- a/src/mesa/state_tracker/st_format.c
+++ b/src/mesa/state_tracker/st_format.c
@@ -73,17 +73,17 @@ st_mesa_format_to_pipe_format(mesa_format mesaFormat)
return PIPE_FORMAT_BGRX8888_UNORM;
case MESA_FORMAT_XRGB_UNORM8:
return PIPE_FORMAT_XRGB8888_UNORM;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
return PIPE_FORMAT_B5G5R5A1_UNORM;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
return PIPE_FORMAT_B4G4R4A4_UNORM;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
return PIPE_FORMAT_B5G6R5_UNORM;
- case MESA_FORMAT_RGB332:
+ case MESA_FORMAT_B2G3R3_UNORM:
return PIPE_FORMAT_B2G3R3_UNORM;
- case MESA_FORMAT_ARGB2101010:
+ case MESA_FORMAT_B10G10R10A2_UNORM:
return PIPE_FORMAT_B10G10R10A2_UNORM;
- case MESA_FORMAT_AL44:
+ case MESA_FORMAT_L4A4_UNORM:
return PIPE_FORMAT_L4A4_UNORM;
case MESA_FORMAT_LA_UNORM8:
return PIPE_FORMAT_L8A8_UNORM;
@@ -105,19 +105,19 @@ st_mesa_format_to_pipe_format(mesa_format mesaFormat)
return PIPE_FORMAT_Z16_UNORM;
case MESA_FORMAT_Z_UNORM32:
return PIPE_FORMAT_Z32_UNORM;
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
return PIPE_FORMAT_S8_UINT_Z24_UNORM;
- case MESA_FORMAT_S8_Z24:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
return PIPE_FORMAT_Z24_UNORM_S8_UINT;
- case MESA_FORMAT_Z24_X8:
+ case MESA_FORMAT_X8Z24_UNORM:
return PIPE_FORMAT_X8Z24_UNORM;
- case MESA_FORMAT_X8_Z24:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
return PIPE_FORMAT_Z24X8_UNORM;
case MESA_FORMAT_S_UINT8:
return PIPE_FORMAT_S8_UINT;
case MESA_FORMAT_Z_FLOAT32:
return PIPE_FORMAT_Z32_FLOAT;
- case MESA_FORMAT_Z32_FLOAT_X24S8:
+ case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
return PIPE_FORMAT_Z32_FLOAT_S8X24_UINT;
case MESA_FORMAT_YCBCR:
return PIPE_FORMAT_UYVY;
@@ -353,16 +353,16 @@ st_mesa_format_to_pipe_format(mesa_format mesaFormat)
case MESA_FORMAT_SIGNED_I16:
return PIPE_FORMAT_I16_SNORM;
- case MESA_FORMAT_RGB9_E5_FLOAT:
+ case MESA_FORMAT_R9G9B9E5_FLOAT:
return PIPE_FORMAT_R9G9B9E5_FLOAT;
- case MESA_FORMAT_R11_G11_B10_FLOAT:
+ case MESA_FORMAT_R11G11B10_FLOAT:
return PIPE_FORMAT_R11G11B10_FLOAT;
- case MESA_FORMAT_ARGB2101010_UINT:
+ case MESA_FORMAT_B10G10R10A2_UINT:
return PIPE_FORMAT_B10G10R10A2_UINT;
- case MESA_FORMAT_XRGB4444_UNORM:
+ case MESA_FORMAT_B4G4R4X4_UNORM:
return PIPE_FORMAT_B4G4R4X4_UNORM;
- case MESA_FORMAT_XRGB1555_UNORM:
+ case MESA_FORMAT_B5G5R5X1_UNORM:
return PIPE_FORMAT_B5G5R5X1_UNORM;
case MESA_FORMAT_XBGR8888_SNORM:
return PIPE_FORMAT_R8G8B8X8_SNORM;
@@ -372,7 +372,7 @@ st_mesa_format_to_pipe_format(mesa_format mesaFormat)
return PIPE_FORMAT_R8G8B8X8_UINT;
case MESA_FORMAT_XBGR8888_SINT:
return PIPE_FORMAT_R8G8B8X8_SINT;
- case MESA_FORMAT_XRGB2101010_UNORM:
+ case MESA_FORMAT_B10G10R10X2_UNORM:
return PIPE_FORMAT_B10G10R10X2_UNORM;
case MESA_FORMAT_XBGR16161616_UNORM:
return PIPE_FORMAT_R16G16B16X16_UNORM;
@@ -421,17 +421,17 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
case PIPE_FORMAT_XRGB8888_UNORM:
return MESA_FORMAT_XRGB_UNORM8;
case PIPE_FORMAT_B5G5R5A1_UNORM:
- return MESA_FORMAT_ARGB1555;
+ return MESA_FORMAT_B5G5R5A1_UNORM;
case PIPE_FORMAT_B4G4R4A4_UNORM:
- return MESA_FORMAT_ARGB4444;
+ return MESA_FORMAT_B4G4R4A4_UNORM;
case PIPE_FORMAT_B5G6R5_UNORM:
- return MESA_FORMAT_RGB565;
+ return MESA_FORMAT_B5G6R5_UNORM;
case PIPE_FORMAT_B2G3R3_UNORM:
- return MESA_FORMAT_RGB332;
+ return MESA_FORMAT_B2G3R3_UNORM;
case PIPE_FORMAT_B10G10R10A2_UNORM:
- return MESA_FORMAT_ARGB2101010;
+ return MESA_FORMAT_B10G10R10A2_UNORM;
case PIPE_FORMAT_L4A4_UNORM:
- return MESA_FORMAT_AL44;
+ return MESA_FORMAT_L4A4_UNORM;
case PIPE_FORMAT_L8A8_UNORM:
return MESA_FORMAT_LA_UNORM8;
case PIPE_FORMAT_L16A16_UNORM:
@@ -459,17 +459,17 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
case PIPE_FORMAT_Z32_UNORM:
return MESA_FORMAT_Z_UNORM32;
case PIPE_FORMAT_S8_UINT_Z24_UNORM:
- return MESA_FORMAT_Z24_S8;
+ return MESA_FORMAT_S8_UINT_Z24_UNORM;
case PIPE_FORMAT_X8Z24_UNORM:
- return MESA_FORMAT_Z24_X8;
+ return MESA_FORMAT_X8Z24_UNORM;
case PIPE_FORMAT_Z24X8_UNORM:
- return MESA_FORMAT_X8_Z24;
+ return MESA_FORMAT_Z24_UNORM_X8_UINT;
case PIPE_FORMAT_Z24_UNORM_S8_UINT:
- return MESA_FORMAT_S8_Z24;
+ return MESA_FORMAT_Z24_UNORM_S8_UINT;
case PIPE_FORMAT_Z32_FLOAT:
return MESA_FORMAT_Z_FLOAT32;
case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
- return MESA_FORMAT_Z32_FLOAT_X24S8;
+ return MESA_FORMAT_Z32_FLOAT_S8X24_UINT;
case PIPE_FORMAT_UYVY:
return MESA_FORMAT_YCBCR;
@@ -706,17 +706,17 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
return MESA_FORMAT_SIGNED_I16;
case PIPE_FORMAT_R9G9B9E5_FLOAT:
- return MESA_FORMAT_RGB9_E5_FLOAT;
+ return MESA_FORMAT_R9G9B9E5_FLOAT;
case PIPE_FORMAT_R11G11B10_FLOAT:
- return MESA_FORMAT_R11_G11_B10_FLOAT;
+ return MESA_FORMAT_R11G11B10_FLOAT;
case PIPE_FORMAT_B10G10R10A2_UINT:
- return MESA_FORMAT_ARGB2101010_UINT;
+ return MESA_FORMAT_B10G10R10A2_UINT;
case PIPE_FORMAT_B4G4R4X4_UNORM:
- return MESA_FORMAT_XRGB4444_UNORM;
+ return MESA_FORMAT_B4G4R4X4_UNORM;
case PIPE_FORMAT_B5G5R5X1_UNORM:
- return MESA_FORMAT_XRGB1555_UNORM;
+ return MESA_FORMAT_B5G5R5X1_UNORM;
case PIPE_FORMAT_R8G8B8X8_SNORM:
return MESA_FORMAT_XBGR8888_SNORM;
case PIPE_FORMAT_R8G8B8X8_SRGB:
@@ -726,7 +726,7 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
case PIPE_FORMAT_R8G8B8X8_SINT:
return MESA_FORMAT_XBGR8888_SINT;
case PIPE_FORMAT_B10G10R10X2_UNORM:
- return MESA_FORMAT_XRGB2101010_UNORM;
+ return MESA_FORMAT_B10G10R10X2_UNORM;
case PIPE_FORMAT_R16G16B16X16_UNORM:
return MESA_FORMAT_XBGR16161616_UNORM;
case PIPE_FORMAT_R16G16B16X16_SNORM:
diff --git a/src/mesa/swrast/s_blit.c b/src/mesa/swrast/s_blit.c
index aadcd95..1ba188c 100644
--- a/src/mesa/swrast/s_blit.c
+++ b/src/mesa/swrast/s_blit.c
@@ -167,7 +167,7 @@ blit_nearest(struct gl_context *ctx,
* masking for things like DEPTH copies of Z24S8.
*/
if (readRb->Format == MESA_FORMAT_Z_FLOAT32 ||
- readRb->Format == MESA_FORMAT_Z32_FLOAT_X24S8) {
+ readRb->Format == MESA_FORMAT_Z32_FLOAT_S8X24_UINT) {
mode = UNPACK_Z_FLOAT;
} else {
mode = UNPACK_Z_INT;
diff --git a/src/mesa/swrast/s_depth.c b/src/mesa/swrast/s_depth.c
index 85734a5..c3f08cb 100644
--- a/src/mesa/swrast/s_depth.c
+++ b/src/mesa/swrast/s_depth.c
@@ -552,10 +552,10 @@ _swrast_clear_depth_buffer(struct gl_context *ctx)
height = ctx->DrawBuffer->_Ymax - ctx->DrawBuffer->_Ymin;
mapMode = GL_MAP_WRITE_BIT;
- if (rb->Format == MESA_FORMAT_S8_Z24 ||
- rb->Format == MESA_FORMAT_X8_Z24 ||
- rb->Format == MESA_FORMAT_Z24_S8 ||
- rb->Format == MESA_FORMAT_Z24_X8) {
+ if (rb->Format == MESA_FORMAT_Z24_UNORM_S8_UINT ||
+ rb->Format == MESA_FORMAT_Z24_UNORM_X8_UINT ||
+ rb->Format == MESA_FORMAT_S8_UINT_Z24_UNORM ||
+ rb->Format == MESA_FORMAT_X8Z24_UNORM) {
mapMode |= GL_MAP_READ_BIT;
}
@@ -602,17 +602,17 @@ _swrast_clear_depth_buffer(struct gl_context *ctx)
}
}
break;
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_X8_Z24:
- case MESA_FORMAT_Z24_S8:
- case MESA_FORMAT_Z24_X8:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
+ case MESA_FORMAT_X8Z24_UNORM:
{
GLfloat clear = (GLfloat) ctx->Depth.Clear;
GLuint clearVal = 0;
GLuint mask;
- if (rb->Format == MESA_FORMAT_S8_Z24 ||
- rb->Format == MESA_FORMAT_X8_Z24)
+ if (rb->Format == MESA_FORMAT_Z24_UNORM_S8_UINT ||
+ rb->Format == MESA_FORMAT_Z24_UNORM_X8_UINT)
mask = 0xff000000;
else
mask = 0xff;
@@ -628,7 +628,7 @@ _swrast_clear_depth_buffer(struct gl_context *ctx)
}
break;
- case MESA_FORMAT_Z32_FLOAT_X24S8:
+ case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
/* XXX untested */
{
GLfloat clearVal = (GLfloat) ctx->Depth.Clear;
@@ -692,15 +692,15 @@ _swrast_clear_depth_stencil_buffer(struct gl_context *ctx)
}
switch (rb->Format) {
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
{
GLfloat zClear = (GLfloat) ctx->Depth.Clear;
GLuint clear = 0, mask;
_mesa_pack_float_z_row(rb->Format, 1, &zClear, &clear);
- if (rb->Format == MESA_FORMAT_S8_Z24) {
+ if (rb->Format == MESA_FORMAT_Z24_UNORM_S8_UINT) {
mask = ((~writeMask) & 0xff) << 24;
clear |= (ctx->Stencil.Clear & writeMask & 0xff) << 24;
}
@@ -725,7 +725,7 @@ _swrast_clear_depth_stencil_buffer(struct gl_context *ctx)
}
}
break;
- case MESA_FORMAT_Z32_FLOAT_X24S8:
+ case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
/* XXX untested */
{
const GLfloat zClear = (GLfloat) ctx->Depth.Clear;
diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c
index d17009a..6b91369 100644
--- a/src/mesa/swrast/s_drawpix.c
+++ b/src/mesa/swrast/s_drawpix.c
@@ -500,7 +500,7 @@ draw_rgba_pixels( struct gl_context *ctx, GLint x, GLint y,
/**
- * Draw depth+stencil values into a MESA_FORAMT_Z24_S8 or MESA_FORMAT_S8_Z24
+ * Draw depth+stencil values into a MESA_FORAMT_Z24_S8 or MESA_FORMAT_Z24_UNORM_S8_UINT
* renderbuffer. No masking, zooming, scaling, etc.
*/
static void
@@ -572,8 +572,8 @@ draw_depth_stencil_pixels(struct gl_context *ctx, GLint x, GLint y,
ASSERT(stencilRb);
if (depthRb == stencilRb &&
- (depthRb->Format == MESA_FORMAT_Z24_S8 ||
- depthRb->Format == MESA_FORMAT_S8_Z24) &&
+ (depthRb->Format == MESA_FORMAT_S8_UINT_Z24_UNORM ||
+ depthRb->Format == MESA_FORMAT_Z24_UNORM_S8_UINT) &&
type == GL_UNSIGNED_INT_24_8 &&
!scaleOrBias &&
!zoom &&
diff --git a/src/mesa/swrast/s_renderbuffer.c b/src/mesa/swrast/s_renderbuffer.c
index a6d2a5b..25ec2ca 100644
--- a/src/mesa/swrast/s_renderbuffer.c
+++ b/src/mesa/swrast/s_renderbuffer.c
@@ -102,14 +102,14 @@ soft_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
rb->Format = MESA_FORMAT_Z_UNORM16;
break;
case GL_DEPTH_COMPONENT24:
- rb->Format = MESA_FORMAT_X8_Z24;
+ rb->Format = MESA_FORMAT_Z24_UNORM_X8_UINT;
break;
case GL_DEPTH_COMPONENT32:
rb->Format = MESA_FORMAT_Z_UNORM32;
break;
case GL_DEPTH_STENCIL_EXT:
case GL_DEPTH24_STENCIL8_EXT:
- rb->Format = MESA_FORMAT_Z24_S8;
+ rb->Format = MESA_FORMAT_S8_UINT_Z24_UNORM;
break;
default:
/* unsupported format */
diff --git a/src/mesa/swrast/s_stencil.c b/src/mesa/swrast/s_stencil.c
index 8b30469..eba9da8 100644
--- a/src/mesa/swrast/s_stencil.c
+++ b/src/mesa/swrast/s_stencil.c
@@ -614,7 +614,7 @@ _swrast_clear_stencil_buffer(struct gl_context *ctx)
}
}
break;
- case MESA_FORMAT_S8_Z24:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
{
GLuint clear = (ctx->Stencil.Clear & writeMask & 0xff) << 24;
GLuint mask = (((~writeMask) & 0xff) << 24) | 0xffffff;
@@ -627,7 +627,7 @@ _swrast_clear_stencil_buffer(struct gl_context *ctx)
}
}
break;
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
{
GLuint clear = ctx->Stencil.Clear & writeMask & 0xff;
GLuint mask = 0xffffff00 | ((~writeMask) & 0xff);
diff --git a/src/mesa/swrast/s_texfetch.c b/src/mesa/swrast/s_texfetch.c
index 01b6fcb..54c0817 100644
--- a/src/mesa/swrast/s_texfetch.c
+++ b/src/mesa/swrast/s_texfetch.c
@@ -209,49 +209,49 @@ texfetch_funcs[] =
fetch_texel_3d_f_bgr888
},
{
- MESA_FORMAT_RGB565,
+ MESA_FORMAT_B5G6R5_UNORM,
fetch_texel_1d_f_rgb565,
fetch_texel_2d_f_rgb565,
fetch_texel_3d_f_rgb565
},
{
- MESA_FORMAT_RGB565_REV,
+ MESA_FORMAT_R5G6B5_UNORM,
fetch_texel_1d_f_rgb565_rev,
fetch_texel_2d_f_rgb565_rev,
fetch_texel_3d_f_rgb565_rev
},
{
- MESA_FORMAT_ARGB4444,
+ MESA_FORMAT_B4G4R4A4_UNORM,
fetch_texel_1d_f_argb4444,
fetch_texel_2d_f_argb4444,
fetch_texel_3d_f_argb4444
},
{
- MESA_FORMAT_ARGB4444_REV,
+ MESA_FORMAT_A4R4G4B4_UNORM,
fetch_texel_1d_f_argb4444_rev,
fetch_texel_2d_f_argb4444_rev,
fetch_texel_3d_f_argb4444_rev
},
{
- MESA_FORMAT_RGBA5551,
+ MESA_FORMAT_A1B5G5R5_UNORM,
fetch_texel_1d_f_rgba5551,
fetch_texel_2d_f_rgba5551,
fetch_texel_3d_f_rgba5551
},
{
- MESA_FORMAT_ARGB1555,
+ MESA_FORMAT_B5G5R5A1_UNORM,
fetch_texel_1d_f_argb1555,
fetch_texel_2d_f_argb1555,
fetch_texel_3d_f_argb1555
},
{
- MESA_FORMAT_ARGB1555_REV,
+ MESA_FORMAT_A1R5G5B5_UNORM,
fetch_texel_1d_f_argb1555_rev,
fetch_texel_2d_f_argb1555_rev,
fetch_texel_3d_f_argb1555_rev
},
{
- MESA_FORMAT_AL44,
+ MESA_FORMAT_L4A4_UNORM,
fetch_texel_1d_f_al44,
fetch_texel_2d_f_al44,
fetch_texel_3d_f_al44
@@ -281,7 +281,7 @@ texfetch_funcs[] =
fetch_texel_3d_f_al1616_rev
},
{
- MESA_FORMAT_RGB332,
+ MESA_FORMAT_B2G3R3_UNORM,
fetch_texel_1d_f_rgb332,
fetch_texel_2d_f_rgb332,
fetch_texel_3d_f_rgb332
@@ -371,19 +371,19 @@ texfetch_funcs[] =
fetch_texel_3d_f_rg1616_rev
},
{
- MESA_FORMAT_ARGB2101010,
+ MESA_FORMAT_B10G10R10A2_UNORM,
fetch_texel_1d_f_argb2101010,
fetch_texel_2d_f_argb2101010,
fetch_texel_3d_f_argb2101010
},
{
- MESA_FORMAT_Z24_S8,
+ MESA_FORMAT_S8_UINT_Z24_UNORM,
fetch_texel_1d_f_z24_s8,
fetch_texel_2d_f_z24_s8,
fetch_texel_3d_f_z24_s8
},
{
- MESA_FORMAT_S8_Z24,
+ MESA_FORMAT_Z24_UNORM_S8_UINT,
fetch_texel_1d_f_s8_z24,
fetch_texel_2d_f_s8_z24,
fetch_texel_3d_f_s8_z24
@@ -395,13 +395,13 @@ texfetch_funcs[] =
fetch_texel_3d_f_z16
},
{
- MESA_FORMAT_X8_Z24,
+ MESA_FORMAT_Z24_UNORM_X8_UINT,
fetch_texel_1d_f_s8_z24,
fetch_texel_2d_f_s8_z24,
fetch_texel_3d_f_s8_z24
},
{
- MESA_FORMAT_Z24_X8,
+ MESA_FORMAT_X8Z24_UNORM,
fetch_texel_1d_f_z24_s8,
fetch_texel_2d_f_z24_s8,
fetch_texel_3d_f_z24_s8
@@ -1161,13 +1161,13 @@ texfetch_funcs[] =
fetch_texel_3d_signed_i16
},
{
- MESA_FORMAT_RGB9_E5_FLOAT,
+ MESA_FORMAT_R9G9B9E5_FLOAT,
fetch_texel_1d_rgb9_e5,
fetch_texel_2d_rgb9_e5,
fetch_texel_3d_rgb9_e5
},
{
- MESA_FORMAT_R11_G11_B10_FLOAT,
+ MESA_FORMAT_R11G11B10_FLOAT,
fetch_texel_1d_r11_g11_b10f,
fetch_texel_2d_r11_g11_b10f,
fetch_texel_3d_r11_g11_b10f
@@ -1179,31 +1179,31 @@ texfetch_funcs[] =
fetch_texel_3d_f_r_f32
},
{
- MESA_FORMAT_Z32_FLOAT_X24S8,
+ MESA_FORMAT_Z32_FLOAT_S8X24_UINT,
fetch_texel_1d_z32f_x24s8,
fetch_texel_2d_z32f_x24s8,
fetch_texel_3d_z32f_x24s8
},
{
- MESA_FORMAT_ARGB2101010_UINT,
+ MESA_FORMAT_B10G10R10A2_UINT,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_ABGR2101010_UINT,
+ MESA_FORMAT_R10G10B10A2_UINT,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_XRGB4444_UNORM,
+ MESA_FORMAT_B4G4R4X4_UNORM,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_XRGB1555_UNORM,
+ MESA_FORMAT_B5G5R5X1_UNORM,
NULL,
NULL,
NULL
@@ -1233,7 +1233,7 @@ texfetch_funcs[] =
NULL
},
{
- MESA_FORMAT_XRGB2101010_UNORM,
+ MESA_FORMAT_B10G10R10X2_UNORM,
NULL,
NULL,
NULL
diff --git a/src/mesa/swrast/s_texfetch_tmp.h b/src/mesa/swrast/s_texfetch_tmp.h
index f09332a..13b7291 100644
--- a/src/mesa/swrast/s_texfetch_tmp.h
+++ b/src/mesa/swrast/s_texfetch_tmp.h
@@ -553,7 +553,7 @@ static void FETCH(f_bgr888)( const struct swrast_texture_image *texImage,
/* use color expansion like (g << 2) | (g >> 4) (does somewhat random rounding)
instead of slow (g << 2) * 255 / 252 (always rounds down) */
-/* MESA_FORMAT_RGB565 ********************************************************/
+/* MESA_FORMAT_B5G6R5_UNORM ********************************************************/
/* Fetch texel from 1D, 2D or 3D rgb565 texture, return 4 GLchans */
static void FETCH(f_rgb565)( const struct swrast_texture_image *texImage,
@@ -570,7 +570,7 @@ static void FETCH(f_rgb565)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_RGB565_REV ****************************************************/
+/* MESA_FORMAT_R5G6B5_UNORM ****************************************************/
/* Fetch texel from 1D, 2D or 3D rgb565_rev texture, return 4 GLchans */
static void FETCH(f_rgb565_rev)( const struct swrast_texture_image *texImage,
@@ -587,7 +587,7 @@ static void FETCH(f_rgb565_rev)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_ARGB4444 ******************************************************/
+/* MESA_FORMAT_B4G4R4A4_UNORM ******************************************************/
/* Fetch texel from 1D, 2D or 3D argb444 texture, return 4 GLchans */
static void FETCH(f_argb4444)( const struct swrast_texture_image *texImage,
@@ -604,7 +604,7 @@ static void FETCH(f_argb4444)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_ARGB4444_REV **************************************************/
+/* MESA_FORMAT_A4R4G4B4_UNORM **************************************************/
/* Fetch texel from 1D, 2D or 3D argb4444_rev texture, return 4 GLchans */
static void FETCH(f_argb4444_rev)( const struct swrast_texture_image *texImage,
@@ -619,7 +619,7 @@ static void FETCH(f_argb4444_rev)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_RGBA5551 ******************************************************/
+/* MESA_FORMAT_A1B5G5R5_UNORM ******************************************************/
/* Fetch texel from 1D, 2D or 3D argb1555 texture, return 4 GLchans */
static void FETCH(f_rgba5551)( const struct swrast_texture_image *texImage,
@@ -635,7 +635,7 @@ static void FETCH(f_rgba5551)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_ARGB1555 ******************************************************/
+/* MESA_FORMAT_B5G5R5A1_UNORM ******************************************************/
/* Fetch texel from 1D, 2D or 3D argb1555 texture, return 4 GLchans */
static void FETCH(f_argb1555)( const struct swrast_texture_image *texImage,
@@ -652,7 +652,7 @@ static void FETCH(f_argb1555)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_ARGB1555_REV **************************************************/
+/* MESA_FORMAT_A1R5G5B5_UNORM **************************************************/
/* Fetch texel from 1D, 2D or 3D argb1555_rev texture, return 4 GLchans */
static void FETCH(f_argb1555_rev)( const struct swrast_texture_image *texImage,
@@ -669,7 +669,7 @@ static void FETCH(f_argb1555_rev)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_ARGB2101010 ***************************************************/
+/* MESA_FORMAT_B10G10R10A2_UNORM ***************************************************/
/* Fetch texel from 1D, 2D or 3D argb2101010 texture, return 4 GLchans */
static void FETCH(f_argb2101010)( const struct swrast_texture_image *texImage,
@@ -718,7 +718,7 @@ static void FETCH(f_rg88)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_AL44 **********************************************************/
+/* MESA_FORMAT_L4A4_UNORM **********************************************************/
/* Fetch texel from 1D, 2D or 3D al44 texture, return 4 GLchans */
static void FETCH(f_al44)( const struct swrast_texture_image *texImage,
@@ -862,7 +862,7 @@ static void FETCH(f_al1616_rev)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_RGB332 ********************************************************/
+/* MESA_FORMAT_B2G3R3_UNORM ********************************************************/
/* Fetch texel from 1D, 2D or 3D rgb332 texture, return 4 GLchans */
static void FETCH(f_rgb332)( const struct swrast_texture_image *texImage,
@@ -1538,8 +1538,8 @@ static void FETCH(f_z24_s8)( const struct swrast_texture_image *texImage,
const GLuint *src = TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
const GLdouble scale = 1.0 / (GLdouble) 0xffffff;
texel[0] = (GLfloat) (((*src) >> 8) * scale);
- ASSERT(texImage->Base.TexFormat == MESA_FORMAT_Z24_S8 ||
- texImage->Base.TexFormat == MESA_FORMAT_Z24_X8);
+ ASSERT(texImage->Base.TexFormat == MESA_FORMAT_S8_UINT_Z24_UNORM ||
+ texImage->Base.TexFormat == MESA_FORMAT_X8Z24_UNORM);
ASSERT(texel[0] >= 0.0F);
ASSERT(texel[0] <= 1.0F);
}
@@ -1556,8 +1556,8 @@ static void FETCH(f_s8_z24)( const struct swrast_texture_image *texImage,
const GLuint *src = TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
const GLdouble scale = 1.0 / (GLdouble) 0xffffff;
texel[0] = (GLfloat) (((*src) & 0x00ffffff) * scale);
- ASSERT(texImage->Base.TexFormat == MESA_FORMAT_S8_Z24 ||
- texImage->Base.TexFormat == MESA_FORMAT_X8_Z24);
+ ASSERT(texImage->Base.TexFormat == MESA_FORMAT_Z24_UNORM_S8_UINT ||
+ texImage->Base.TexFormat == MESA_FORMAT_Z24_UNORM_X8_UINT);
ASSERT(texel[0] >= 0.0F);
ASSERT(texel[0] <= 1.0F);
}
@@ -1578,7 +1578,7 @@ static void FETCH(rgb9_e5)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_R11_G11_B10_FLOAT *********************************************/
+/* MESA_FORMAT_R11G11B10_FLOAT *********************************************/
static void FETCH(r11_g11_b10f)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
@@ -1591,7 +1591,7 @@ static void FETCH(r11_g11_b10f)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_Z32_FLOAT_X24S8 ***********************************************/
+/* MESA_FORMAT_Z32_FLOAT_S8X24_UINT ***********************************************/
static void FETCH(z32f_x24s8)(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel)
--
1.8.3.1
More information about the mesa-dev
mailing list