[Mesa-dev] [PATCH 1/1] mesa: Add some convention to MESA_FORMATs with attention to PIPE_FORMATs
Mark Mueller
markkmueller at gmail.com
Wed Dec 18 20:44:36 PST 2013
Though a large patch, this is simply a series of global search
and replace operations. Please refer to formats.h for the core
deltas. In summary this change adds UNORM, and UINT to formats
where no type is given, as necessary; replaces the SIGNED designation
inside the named format with an appened SNORM qualifier; and replaces
*_INT with *_SINT, thus making MESA_FORMATs more consistent
with PIPE_FORMATs. This is the first and most intrusive change
in a crusade to clean up and conventionalize MESA_FORMATs to
meet needs of contemporary drivers.
No regressions were observed with piglit testing on i965.
There were no build regressions on gallium ilo, nouveau, r300,
or r600 after the change.
Signed-off-by: Mark Mueller <MarkKMueller at gmail.com>
---
src/gallium/state_trackers/dri/common/dri_screen.c | 6 +-
src/mesa/drivers/dri/common/dri_util.c | 32 +-
src/mesa/drivers/dri/common/utils.c | 16 +-
src/mesa/drivers/dri/i915/i830_texstate.c | 18 +-
src/mesa/drivers/dri/i915/i830_vtbl.c | 20 +-
src/mesa/drivers/dri/i915/i915_context.c | 24 +-
src/mesa/drivers/dri/i915/i915_texstate.c | 26 +-
src/mesa/drivers/dri/i915/i915_vtbl.c | 20 +-
src/mesa/drivers/dri/i915/intel_blit.c | 24 +-
src/mesa/drivers/dri/i915/intel_fbo.c | 4 +-
src/mesa/drivers/dri/i915/intel_pixel_bitmap.c | 6 +-
src/mesa/drivers/dri/i915/intel_screen.c | 22 +-
src/mesa/drivers/dri/i915/intel_tex_image.c | 6 +-
src/mesa/drivers/dri/i965/brw_blorp.cpp | 10 +-
src/mesa/drivers/dri/i965/brw_blorp.h | 4 +-
src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 16 +-
src/mesa/drivers/dri/i965/brw_clear.c | 4 +-
src/mesa/drivers/dri/i965/brw_context.c | 2 +-
src/mesa/drivers/dri/i965/brw_misc_state.c | 14 +-
src/mesa/drivers/dri/i965/brw_surface_formats.c | 188 +++---
src/mesa/drivers/dri/i965/brw_tex_layout.c | 6 +-
src/mesa/drivers/dri/i965/intel_blit.c | 12 +-
src/mesa/drivers/dri/i965/intel_fbo.c | 8 +-
src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 36 +-
src/mesa/drivers/dri/i965/intel_mipmap_tree.h | 4 +-
src/mesa/drivers/dri/i965/intel_pixel_bitmap.c | 6 +-
src/mesa/drivers/dri/i965/intel_screen.c | 26 +-
src/mesa/drivers/dri/i965/intel_tex_image.c | 6 +-
src/mesa/drivers/dri/i965/intel_tex_subimage.c | 6 +-
src/mesa/drivers/dri/nouveau/nouveau_fbo.c | 10 +-
src/mesa/drivers/dri/nouveau/nouveau_screen.c | 6 +-
src/mesa/drivers/dri/nouveau/nouveau_texture.c | 26 +-
src/mesa/drivers/dri/nouveau/nouveau_util.h | 20 +-
src/mesa/drivers/dri/nouveau/nv04_context.c | 6 +-
src/mesa/drivers/dri/nouveau/nv04_state_fb.c | 6 +-
src/mesa/drivers/dri/nouveau/nv04_state_frag.c | 6 +-
src/mesa/drivers/dri/nouveau/nv04_state_raster.c | 2 +-
src/mesa/drivers/dri/nouveau/nv04_state_tex.c | 16 +-
src/mesa/drivers/dri/nouveau/nv04_surface.c | 176 +++---
src/mesa/drivers/dri/nouveau/nv10_state_fb.c | 10 +-
src/mesa/drivers/dri/nouveau/nv10_state_frag.c | 8 +-
src/mesa/drivers/dri/nouveau/nv10_state_tex.c | 30 +-
src/mesa/drivers/dri/nouveau/nv10_state_tnl.c | 2 +-
src/mesa/drivers/dri/nouveau/nv20_state_fb.c | 12 +-
src/mesa/drivers/dri/nouveau/nv20_state_tex.c | 32 +-
src/mesa/drivers/dri/nouveau/nv20_state_tnl.c | 2 +-
src/mesa/drivers/dri/r200/r200_blit.c | 82 +--
src/mesa/drivers/dri/r200/r200_state_init.c | 6 +-
src/mesa/drivers/dri/r200/r200_texstate.c | 16 +-
src/mesa/drivers/dri/radeon/radeon_blit.c | 52 +-
src/mesa/drivers/dri/radeon/radeon_fbo.c | 16 +-
src/mesa/drivers/dri/radeon/radeon_pixel_read.c | 22 +-
src/mesa/drivers/dri/radeon/radeon_screen.c | 30 +-
src/mesa/drivers/dri/radeon/radeon_state_init.c | 6 +-
src/mesa/drivers/dri/radeon/radeon_tex_copy.c | 12 +-
src/mesa/drivers/dri/radeon/radeon_texstate.c | 12 +-
src/mesa/drivers/dri/radeon/radeon_texture.c | 40 +-
src/mesa/drivers/dri/swrast/swrast.c | 20 +-
src/mesa/drivers/haiku/swrast/SoftwareRast.cpp | 8 +-
src/mesa/drivers/osmesa/osmesa.c | 24 +-
src/mesa/drivers/x11/xm_buffer.c | 10 +-
src/mesa/main/accum.c | 8 +-
src/mesa/main/debug.c | 14 +-
src/mesa/main/fbobject.c | 4 +-
src/mesa/main/format_pack.c | 454 +++++++-------
src/mesa/main/format_unpack.c | 294 ++++-----
src/mesa/main/formats.c | 680 ++++++++++-----------
src/mesa/main/formats.h | 170 +++---
src/mesa/main/framebuffer.c | 6 +-
src/mesa/main/readpix.c | 8 +-
src/mesa/main/texformat.c | 284 ++++-----
src/mesa/main/teximage.c | 66 +-
src/mesa/main/texobj.c | 2 +-
src/mesa/main/texstore.c | 390 ++++++------
src/mesa/state_tracker/st_format.c | 276 ++++-----
src/mesa/swrast/s_depth.c | 40 +-
src/mesa/swrast/s_drawpix.c | 14 +-
src/mesa/swrast/s_renderbuffer.c | 16 +-
src/mesa/swrast/s_stencil.c | 8 +-
src/mesa/swrast/s_texfetch.c | 160 ++---
src/mesa/swrast/s_texfetch_tmp.h | 114 ++--
src/mesa/swrast/s_texfilter.c | 8 +-
src/mesa/swrast/s_triangle.c | 20 +-
83 files changed, 2167 insertions(+), 2167 deletions(-)
diff --git a/src/gallium/state_trackers/dri/common/dri_screen.c b/src/gallium/state_trackers/dri/common/dri_screen.c
index 7410dbe..a026eb9 100644
--- a/src/gallium/state_trackers/dri/common/dri_screen.c
+++ b/src/gallium/state_trackers/dri/common/dri_screen.c
@@ -82,9 +82,9 @@ static const __DRIconfig **
dri_fill_in_modes(struct dri_screen *screen)
{
static const gl_format mesa_formats[3] = {
- MESA_FORMAT_ARGB8888,
- MESA_FORMAT_XRGB8888,
- MESA_FORMAT_RGB565,
+ MESA_FORMAT_ARGB8888_UNORM,
+ MESA_FORMAT_XRGB8888_UNORM,
+ MESA_FORMAT_RGB565_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 d648211..e7a0aef 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -809,23 +809,23 @@ uint32_t
driGLFormatToImageFormat(gl_format format)
{
switch (format) {
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_RGB565_UNORM:
return __DRI_IMAGE_FORMAT_RGB565;
- case MESA_FORMAT_XRGB8888:
+ case MESA_FORMAT_XRGB8888_UNORM:
return __DRI_IMAGE_FORMAT_XRGB8888;
- case MESA_FORMAT_ARGB2101010:
+ case MESA_FORMAT_ARGB2101010_UNORM:
return __DRI_IMAGE_FORMAT_ARGB2101010;
case MESA_FORMAT_XRGB2101010_UNORM:
return __DRI_IMAGE_FORMAT_XRGB2101010;
- case MESA_FORMAT_ARGB8888:
+ case MESA_FORMAT_ARGB8888_UNORM:
return __DRI_IMAGE_FORMAT_ARGB8888;
- case MESA_FORMAT_RGBA8888_REV:
+ case MESA_FORMAT_RGBA8888_REV_UNORM:
return __DRI_IMAGE_FORMAT_ABGR8888;
- case MESA_FORMAT_RGBX8888_REV:
+ case MESA_FORMAT_RGBX8888_REV_UNORM:
return __DRI_IMAGE_FORMAT_XBGR8888;
- case MESA_FORMAT_R8:
+ case MESA_FORMAT_R8_UNORM:
return __DRI_IMAGE_FORMAT_R8;
- case MESA_FORMAT_GR88:
+ case MESA_FORMAT_GR88_UNORM:
return __DRI_IMAGE_FORMAT_GR88;
case MESA_FORMAT_NONE:
return __DRI_IMAGE_FORMAT_NONE;
@@ -841,23 +841,23 @@ driImageFormatToGLFormat(uint32_t image_format)
{
switch (image_format) {
case __DRI_IMAGE_FORMAT_RGB565:
- return MESA_FORMAT_RGB565;
+ return MESA_FORMAT_RGB565_UNORM;
case __DRI_IMAGE_FORMAT_XRGB8888:
- return MESA_FORMAT_XRGB8888;
+ return MESA_FORMAT_XRGB8888_UNORM;
case __DRI_IMAGE_FORMAT_ARGB2101010:
- return MESA_FORMAT_ARGB2101010;
+ return MESA_FORMAT_ARGB2101010_UNORM;
case __DRI_IMAGE_FORMAT_XRGB2101010:
return MESA_FORMAT_XRGB2101010_UNORM;
case __DRI_IMAGE_FORMAT_ARGB8888:
- return MESA_FORMAT_ARGB8888;
+ return MESA_FORMAT_ARGB8888_UNORM;
case __DRI_IMAGE_FORMAT_ABGR8888:
- return MESA_FORMAT_RGBA8888_REV;
+ return MESA_FORMAT_RGBA8888_REV_UNORM;
case __DRI_IMAGE_FORMAT_XBGR8888:
- return MESA_FORMAT_RGBX8888_REV;
+ return MESA_FORMAT_RGBX8888_REV_UNORM;
case __DRI_IMAGE_FORMAT_R8:
- return MESA_FORMAT_R8;
+ return MESA_FORMAT_R8_UNORM;
case __DRI_IMAGE_FORMAT_GR88:
- return MESA_FORMAT_GR88;
+ return MESA_FORMAT_GR88_UNORM;
case __DRI_IMAGE_FORMAT_SARGB8:
return MESA_FORMAT_SARGB8;
case __DRI_IMAGE_FORMAT_NONE:
diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c
index 9c94832..396e4ab 100644
--- a/src/mesa/drivers/dri/common/utils.c
+++ b/src/mesa/drivers/dri/common/utils.c
@@ -184,15 +184,15 @@ driCreateConfigs(gl_format format,
GLboolean enable_accum)
{
static const uint32_t masks_table[][4] = {
- /* MESA_FORMAT_RGB565 */
+ /* MESA_FORMAT_RGB565_UNORM */
{ 0x0000F800, 0x000007E0, 0x0000001F, 0x00000000 },
- /* MESA_FORMAT_XRGB8888 */
+ /* MESA_FORMAT_XRGB8888_UNORM */
{ 0x00FF0000, 0x0000FF00, 0x000000FF, 0x00000000 },
- /* MESA_FORMAT_ARGB8888 */
+ /* MESA_FORMAT_ARGB8888_UNORM */
{ 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000 },
/* MESA_FORMAT_XRGB2101010_UNORM */
{ 0x3FF00000, 0x000FFC00, 0x000003FF, 0x00000000 },
- /* MESA_FORMAT_ARGB2101010 */
+ /* MESA_FORMAT_ARGB2101010_UNORM */
{ 0x3FF00000, 0x000FFC00, 0x000003FF, 0xC0000000 },
};
@@ -209,20 +209,20 @@ driCreateConfigs(gl_format format,
bool is_srgb;
switch (format) {
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_RGB565_UNORM:
masks = masks_table[0];
break;
- case MESA_FORMAT_XRGB8888:
+ case MESA_FORMAT_XRGB8888_UNORM:
masks = masks_table[1];
break;
- case MESA_FORMAT_ARGB8888:
+ case MESA_FORMAT_ARGB8888_UNORM:
case MESA_FORMAT_SARGB8:
masks = masks_table[2];
break;
case MESA_FORMAT_XRGB2101010_UNORM:
masks = masks_table[3];
break;
- case MESA_FORMAT_ARGB2101010:
+ case MESA_FORMAT_ARGB2101010_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 f186fac..631d129 100644
--- a/src/mesa/drivers/dri/i915/i830_texstate.c
+++ b/src/mesa/drivers/dri/i915/i830_texstate.c
@@ -43,23 +43,23 @@ static GLuint
translate_texture_format(GLuint mesa_format)
{
switch (mesa_format) {
- case MESA_FORMAT_L8:
+ case MESA_FORMAT_L8_UNORM:
return MAPSURF_8BIT | MT_8BIT_L8;
- case MESA_FORMAT_I8:
+ case MESA_FORMAT_I8_UNORM:
return MAPSURF_8BIT | MT_8BIT_I8;
- case MESA_FORMAT_A8:
+ case MESA_FORMAT_A8_UNORM:
return MAPSURF_8BIT | MT_8BIT_I8; /* Kludge! */
- case MESA_FORMAT_AL88:
+ case MESA_FORMAT_AL88_UNORM:
return MAPSURF_16BIT | MT_16BIT_AY88;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_RGB565_UNORM:
return MAPSURF_16BIT | MT_16BIT_RGB565;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_ARGB1555_UNORM:
return MAPSURF_16BIT | MT_16BIT_ARGB1555;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_ARGB4444_UNORM:
return MAPSURF_16BIT | MT_16BIT_ARGB4444;
- case MESA_FORMAT_ARGB8888:
+ case MESA_FORMAT_ARGB8888_UNORM:
return MAPSURF_32BIT | MT_32BIT_ARGB8888;
- case MESA_FORMAT_XRGB8888:
+ case MESA_FORMAT_XRGB8888_UNORM:
return MAPSURF_32BIT | MT_32BIT_XRGB8888;
case MESA_FORMAT_YCBCR_REV:
return (MAPSURF_422 | MT_422_YCRCB_NORMAL);
diff --git a/src/mesa/drivers/dri/i915/i830_vtbl.c b/src/mesa/drivers/dri/i915/i830_vtbl.c
index f988a83..504ed26 100644
--- a/src/mesa/drivers/dri/i915/i830_vtbl.c
+++ b/src/mesa/drivers/dri/i915/i830_vtbl.c
@@ -582,11 +582,11 @@ i830_destroy_context(struct intel_context *intel)
static uint32_t i830_render_target_format_for_mesa_format[MESA_FORMAT_COUNT] =
{
- [MESA_FORMAT_ARGB8888] = DV_PF_8888,
- [MESA_FORMAT_XRGB8888] = DV_PF_8888,
- [MESA_FORMAT_RGB565] = DV_PF_565,
- [MESA_FORMAT_ARGB1555] = DV_PF_1555,
- [MESA_FORMAT_ARGB4444] = DV_PF_4444,
+ [MESA_FORMAT_ARGB8888_UNORM] = DV_PF_8888,
+ [MESA_FORMAT_XRGB8888_UNORM] = DV_PF_8888,
+ [MESA_FORMAT_RGB565_UNORM] = DV_PF_565,
+ [MESA_FORMAT_ARGB1555_UNORM] = DV_PF_1555,
+ [MESA_FORMAT_ARGB4444_UNORM] = DV_PF_4444,
};
static bool
@@ -595,9 +595,9 @@ i830_render_target_supported(struct intel_context *intel,
{
gl_format format = rb->Format;
- if (format == MESA_FORMAT_S8_Z24 ||
- format == MESA_FORMAT_X8_Z24 ||
- format == MESA_FORMAT_Z16) {
+ if (format == MESA_FORMAT_S8_UINT_Z24_UNORM ||
+ format == MESA_FORMAT_X8_Z24_UNORM ||
+ format == MESA_FORMAT_Z16_UNORM) {
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_S8_UINT_Z24_UNORM);
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_S8_UINT_Z24_UNORM) {
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 2389043..e23ba18 100644
--- a/src/mesa/drivers/dri/i915/i915_context.c
+++ b/src/mesa/drivers/dri/i915/i915_context.c
@@ -99,23 +99,23 @@ intel_init_texture_formats(struct gl_context *ctx)
struct intel_context *intel = intel_context(ctx);
struct intel_screen *intel_screen = intel->intelScreen;
- ctx->TextureFormatSupported[MESA_FORMAT_ARGB8888] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_ARGB8888_UNORM] = true;
if (intel_screen->deviceID != PCI_CHIP_I830_M &&
intel_screen->deviceID != PCI_CHIP_845_G)
- ctx->TextureFormatSupported[MESA_FORMAT_XRGB8888] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_XRGB8888_UNORM] = true;
if (intel->gen == 3)
ctx->TextureFormatSupported[MESA_FORMAT_SARGB8] = true;
- ctx->TextureFormatSupported[MESA_FORMAT_ARGB4444] = true;
- ctx->TextureFormatSupported[MESA_FORMAT_ARGB1555] = true;
- ctx->TextureFormatSupported[MESA_FORMAT_RGB565] = true;
- ctx->TextureFormatSupported[MESA_FORMAT_L8] = true;
- ctx->TextureFormatSupported[MESA_FORMAT_A8] = true;
- ctx->TextureFormatSupported[MESA_FORMAT_I8] = true;
- ctx->TextureFormatSupported[MESA_FORMAT_AL88] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_ARGB4444_UNORM] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_ARGB1555_UNORM] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_RGB565_UNORM] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_L8_UNORM] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_A8_UNORM] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_I8_UNORM] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_AL88_UNORM] = true;
/* Depth and stencil */
- ctx->TextureFormatSupported[MESA_FORMAT_S8_Z24] = true;
- ctx->TextureFormatSupported[MESA_FORMAT_X8_Z24] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_S8_UINT_Z24_UNORM] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_X8_Z24_UNORM] = true;
/*
* This was disabled in initial FBO enabling to avoid combinations
@@ -124,7 +124,7 @@ intel_init_texture_formats(struct gl_context *ctx)
* combo that actually works, so this can probably be re-enabled.
*/
/*
- ctx->TextureFormatSupported[MESA_FORMAT_Z16] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_Z16_UNORM] = true;
ctx->TextureFormatSupported[MESA_FORMAT_Z24] = true;
*/
diff --git a/src/mesa/drivers/dri/i915/i915_texstate.c b/src/mesa/drivers/dri/i915/i915_texstate.c
index 43c802b..9dda99d 100644
--- a/src/mesa/drivers/dri/i915/i915_texstate.c
+++ b/src/mesa/drivers/dri/i915/i915_texstate.c
@@ -42,26 +42,26 @@ static GLuint
translate_texture_format(gl_format mesa_format, GLenum DepthMode)
{
switch (mesa_format) {
- case MESA_FORMAT_L8:
+ case MESA_FORMAT_L8_UNORM:
return MAPSURF_8BIT | MT_8BIT_L8;
- case MESA_FORMAT_I8:
+ case MESA_FORMAT_I8_UNORM:
return MAPSURF_8BIT | MT_8BIT_I8;
- case MESA_FORMAT_A8:
+ case MESA_FORMAT_A8_UNORM:
return MAPSURF_8BIT | MT_8BIT_A8;
- case MESA_FORMAT_AL88:
+ case MESA_FORMAT_AL88_UNORM:
return MAPSURF_16BIT | MT_16BIT_AY88;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_RGB565_UNORM:
return MAPSURF_16BIT | MT_16BIT_RGB565;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_ARGB1555_UNORM:
return MAPSURF_16BIT | MT_16BIT_ARGB1555;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_ARGB4444_UNORM:
return MAPSURF_16BIT | MT_16BIT_ARGB4444;
case MESA_FORMAT_SARGB8:
- case MESA_FORMAT_ARGB8888:
+ case MESA_FORMAT_ARGB8888_UNORM:
return MAPSURF_32BIT | MT_32BIT_ARGB8888;
- case MESA_FORMAT_XRGB8888:
+ case MESA_FORMAT_XRGB8888_UNORM:
return MAPSURF_32BIT | MT_32BIT_XRGB8888;
- case MESA_FORMAT_RGBA8888_REV:
+ case MESA_FORMAT_RGBA8888_REV_UNORM:
return MAPSURF_32BIT | MT_32BIT_ABGR8888;
case MESA_FORMAT_YCBCR_REV:
return (MAPSURF_422 | MT_422_YCRCB_NORMAL);
@@ -70,7 +70,7 @@ translate_texture_format(gl_format mesa_format, GLenum DepthMode)
case MESA_FORMAT_RGB_FXT1:
case MESA_FORMAT_RGBA_FXT1:
return (MAPSURF_COMPRESSED | MT_COMPRESS_FXT1);
- case MESA_FORMAT_Z16:
+ case MESA_FORMAT_Z16_UNORM:
if (DepthMode == GL_ALPHA)
return (MAPSURF_16BIT | MT_16BIT_A16);
else if (DepthMode == GL_INTENSITY)
@@ -88,8 +88,8 @@ translate_texture_format(gl_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_S8_UINT_Z24_UNORM:
+ case MESA_FORMAT_X8_Z24_UNORM:
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 3368fe4..07c1648 100644
--- a/src/mesa/drivers/dri/i915/i915_vtbl.c
+++ b/src/mesa/drivers/dri/i915/i915_vtbl.c
@@ -549,11 +549,11 @@ i915_set_buf_info_for_region(uint32_t *state, struct intel_region *region,
static uint32_t i915_render_target_format_for_mesa_format[MESA_FORMAT_COUNT] =
{
- [MESA_FORMAT_ARGB8888] = DV_PF_8888,
- [MESA_FORMAT_XRGB8888] = 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_ARGB8888_UNORM] = DV_PF_8888,
+ [MESA_FORMAT_XRGB8888_UNORM] = DV_PF_8888,
+ [MESA_FORMAT_RGB565_UNORM] = DV_PF_565 | DITHER_FULL_ALWAYS,
+ [MESA_FORMAT_ARGB1555_UNORM] = DV_PF_1555 | DITHER_FULL_ALWAYS,
+ [MESA_FORMAT_ARGB4444_UNORM] = DV_PF_4444 | DITHER_FULL_ALWAYS,
};
static bool
@@ -562,9 +562,9 @@ i915_render_target_supported(struct intel_context *intel,
{
gl_format format = rb->Format;
- if (format == MESA_FORMAT_S8_Z24 ||
- format == MESA_FORMAT_X8_Z24 ||
- format == MESA_FORMAT_Z16) {
+ if (format == MESA_FORMAT_S8_UINT_Z24_UNORM ||
+ format == MESA_FORMAT_X8_Z24_UNORM ||
+ format == MESA_FORMAT_Z16_UNORM) {
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_S8_UINT_Z24_UNORM);
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_S8_UINT_Z24_UNORM) {
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 5147d8e..c1ebfb0 100644
--- a/src/mesa/drivers/dri/i915/intel_blit.c
+++ b/src/mesa/drivers/dri/i915/intel_blit.c
@@ -129,10 +129,10 @@ intel_miptree_blit(struct intel_context *intel,
* channel to 1.0 at the end.
*/
if (src_format != dst_format &&
- ((src_format != MESA_FORMAT_ARGB8888 &&
- src_format != MESA_FORMAT_XRGB8888) ||
- (dst_format != MESA_FORMAT_ARGB8888 &&
- dst_format != MESA_FORMAT_XRGB8888))) {
+ ((src_format != MESA_FORMAT_ARGB8888_UNORM &&
+ src_format != MESA_FORMAT_XRGB8888_UNORM) ||
+ (dst_format != MESA_FORMAT_ARGB8888_UNORM &&
+ dst_format != MESA_FORMAT_XRGB8888_UNORM))) {
perf_debug("%s: Can't use hardware blitter from %s to %s, "
"falling back.\n", __FUNCTION__,
_mesa_get_format_name(src_format),
@@ -201,8 +201,8 @@ intel_miptree_blit(struct intel_context *intel,
return false;
}
- if (src_mt->format == MESA_FORMAT_XRGB8888 &&
- dst_mt->format == MESA_FORMAT_ARGB8888) {
+ if (src_mt->format == MESA_FORMAT_XRGB8888_UNORM &&
+ dst_mt->format == MESA_FORMAT_ARGB8888_UNORM) {
intel_miptree_set_alpha_to_one(intel, dst_mt,
dst_x, dst_y,
width, height);
@@ -450,23 +450,23 @@ intelClearWithBlit(struct gl_context *ctx, GLbitfield mask)
_mesa_unclamped_float_rgba_to_ubyte(clear, color);
switch (intel_rb_format(irb)) {
- case MESA_FORMAT_ARGB8888:
- case MESA_FORMAT_XRGB8888:
+ case MESA_FORMAT_ARGB8888_UNORM:
+ case MESA_FORMAT_XRGB8888_UNORM:
clear_val = PACK_COLOR_8888(clear[3], clear[0],
clear[1], clear[2]);
break;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_RGB565_UNORM:
clear_val = PACK_COLOR_565(clear[0], clear[1], clear[2]);
break;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_ARGB4444_UNORM:
clear_val = PACK_COLOR_4444(clear[3], clear[0],
clear[1], clear[2]);
break;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_ARGB1555_UNORM:
clear_val = PACK_COLOR_1555(clear[3], clear[0],
clear[1], clear[2]);
break;
- case MESA_FORMAT_A8:
+ case MESA_FORMAT_A8_UNORM:
clear_val = PACK_COLOR_8888(clear[3], clear[3],
clear[3], clear[3]);
break;
diff --git a/src/mesa/drivers/dri/i915/intel_fbo.c b/src/mesa/drivers/dri/i915/intel_fbo.c
index 36b22ca..7f0faf0 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_S8_UINT_Z24_UNORM;
break;
}
@@ -238,7 +238,7 @@ intel_image_target_renderbuffer_storage(struct gl_context *ctx,
/* __DRIimage is opaque to the core so it has to be checked here */
switch (image->format) {
- case MESA_FORMAT_RGBA8888_REV:
+ case MESA_FORMAT_RGBA8888_REV_UNORM:
_mesa_error(&intel->ctx, GL_INVALID_OPERATION,
"glEGLImageTargetRenderbufferStorage(unsupported image format");
return;
diff --git a/src/mesa/drivers/dri/i915/intel_pixel_bitmap.c b/src/mesa/drivers/dri/i915/intel_pixel_bitmap.c
index c82253a..c17405e 100644
--- a/src/mesa/drivers/dri/i915/intel_pixel_bitmap.c
+++ b/src/mesa/drivers/dri/i915/intel_pixel_bitmap.c
@@ -228,11 +228,11 @@ do_blit_bitmap( struct gl_context *ctx,
UNCLAMPED_FLOAT_TO_UBYTE(ubcolor[3], tmpColor[3]);
switch (irb->mt->format) {
- case MESA_FORMAT_ARGB8888:
- case MESA_FORMAT_XRGB8888:
+ case MESA_FORMAT_ARGB8888_UNORM:
+ case MESA_FORMAT_XRGB8888_UNORM:
color = PACK_COLOR_8888(ubcolor[3], ubcolor[0], ubcolor[1], ubcolor[2]);
break;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_RGB565_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 d607f47..b667945 100644
--- a/src/mesa/drivers/dri/i915/intel_screen.c
+++ b/src/mesa/drivers/dri/i915/intel_screen.c
@@ -124,8 +124,8 @@ aub_dump_bmp(struct gl_context *ctx)
enum aub_dump_bmp_format format;
switch (irb->Base.Base.Format) {
- case MESA_FORMAT_ARGB8888:
- case MESA_FORMAT_XRGB8888:
+ case MESA_FORMAT_ARGB8888_UNORM:
+ case MESA_FORMAT_XRGB8888_UNORM:
format = AUB_DUMP_BMP_FORMAT_ARGB_8888;
break;
default:
@@ -857,13 +857,13 @@ intelCreateBuffer(__DRIscreen * driScrnPriv,
_mesa_initialize_window_framebuffer(fb, mesaVis);
if (mesaVis->redBits == 5)
- rgbFormat = MESA_FORMAT_RGB565;
+ rgbFormat = MESA_FORMAT_RGB565_UNORM;
else if (mesaVis->sRGBCapable)
rgbFormat = MESA_FORMAT_SARGB8;
else if (mesaVis->alphaBits == 0)
- rgbFormat = MESA_FORMAT_XRGB8888;
+ rgbFormat = MESA_FORMAT_XRGB8888_UNORM;
else
- rgbFormat = MESA_FORMAT_ARGB8888;
+ rgbFormat = MESA_FORMAT_ARGB8888_UNORM;
/* setup the hardware-based renderbuffers */
rb = intel_create_renderbuffer(rgbFormat);
@@ -886,13 +886,13 @@ 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_S8_UINT_Z24_UNORM);
_mesa_add_renderbuffer(fb, BUFFER_DEPTH, &rb->Base.Base);
_mesa_add_renderbuffer(fb, BUFFER_STENCIL, &rb->Base.Base);
}
else if (mesaVis->depthBits == 16) {
assert(mesaVis->stencilBits == 0);
- rb = intel_create_private_renderbuffer(MESA_FORMAT_Z16);
+ rb = intel_create_private_renderbuffer(MESA_FORMAT_Z16_UNORM);
_mesa_add_renderbuffer(fb, BUFFER_DEPTH, &rb->Base.Base);
}
else {
@@ -1043,8 +1043,8 @@ static __DRIconfig**
intel_screen_make_configs(__DRIscreen *dri_screen)
{
static const gl_format formats[] = {
- MESA_FORMAT_RGB565,
- MESA_FORMAT_ARGB8888
+ MESA_FORMAT_RGB565_UNORM,
+ MESA_FORMAT_ARGB8888_UNORM
};
/* GLX_SWAP_COPY_OML is not supported due to page flipping. */
@@ -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_RGB565_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_RGB565_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 975e77a..d09d557 100644
--- a/src/mesa/drivers/dri/i915/intel_tex_image.c
+++ b/src/mesa/drivers/dri/i915/intel_tex_image.c
@@ -309,15 +309,15 @@ intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
if (rb->mt->cpp == 4) {
if (texture_format == __DRI_TEXTURE_FORMAT_RGB) {
internalFormat = GL_RGB;
- texFormat = MESA_FORMAT_XRGB8888;
+ texFormat = MESA_FORMAT_XRGB8888_UNORM;
}
else {
internalFormat = GL_RGBA;
- texFormat = MESA_FORMAT_ARGB8888;
+ texFormat = MESA_FORMAT_ARGB8888_UNORM;
}
} else if (rb->mt->cpp == 2) {
internalFormat = GL_RGB;
- texFormat = MESA_FORMAT_RGB565;
+ texFormat = MESA_FORMAT_RGB565_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 ab3e75c..311c8d5 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp.cpp
+++ b/src/mesa/drivers/dri/i965/brw_blorp.cpp
@@ -87,7 +87,7 @@ brw_blorp_surface_info::set(struct brw_context *brw,
this->msaa_layout = mt->msaa_layout;
switch (mt->format) {
- case MESA_FORMAT_S8:
+ case MESA_FORMAT_S8_UNORM:
/* The miptree is a W-tiled stencil buffer. Surface states can't be set
* up for W tiling, so we'll need to use Y tiling and have the WM
* program swizzle the coordinates.
@@ -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_X8_Z24_UNORM:
/* 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.
@@ -111,7 +111,7 @@ brw_blorp_surface_info::set(struct brw_context *brw,
case MESA_FORMAT_Z32_FLOAT:
this->brw_surfaceformat = BRW_SURFACEFORMAT_R32_FLOAT;
break;
- case MESA_FORMAT_Z16:
+ case MESA_FORMAT_Z16_UNORM:
this->brw_surfaceformat = BRW_SURFACEFORMAT_R16_UNORM;
break;
default: {
@@ -327,9 +327,9 @@ brw_hiz_op_params::brw_hiz_op_params(struct intel_mipmap_tree *mt,
assert(intel_miptree_slice_has_hiz(mt, level, layer));
switch (mt->format) {
- case MESA_FORMAT_Z16: depth_format = BRW_DEPTHFORMAT_D16_UNORM; break;
+ case MESA_FORMAT_Z16_UNORM: depth_format = BRW_DEPTHFORMAT_D16_UNORM; break;
case MESA_FORMAT_Z32_FLOAT: depth_format = BRW_DEPTHFORMAT_D32_FLOAT; break;
- case MESA_FORMAT_X8_Z24: depth_format = BRW_DEPTHFORMAT_D24_UNORM_X8_UINT; break;
+ case MESA_FORMAT_X8_Z24_UNORM: depth_format = BRW_DEPTHFORMAT_D24_UNORM_X8_UINT; break;
default: assert(0); break;
}
}
diff --git a/src/mesa/drivers/dri/i965/brw_blorp.h b/src/mesa/drivers/dri/i965/brw_blorp.h
index 1030e4e..4ee4366 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp.h
+++ b/src/mesa/drivers/dri/i965/brw_blorp.h
@@ -134,11 +134,11 @@ public:
/* Setting this flag indicates that the buffer's contents are W-tiled
* stencil data, but the surface state should be set up for Y tiled
- * MESA_FORMAT_R8 data (this is necessary because surface states don't
+ * MESA_FORMAT_R8_UNORM data (this is necessary because surface states don't
* support W tiling).
*
* Since W tiles are 64 pixels wide by 64 pixels high, whereas Y tiles of
- * MESA_FORMAT_R8 data are 128 pixels wide by 32 pixels high, the width and
+ * MESA_FORMAT_R8_UNORM data are 128 pixels wide by 32 pixels high, the width and
* pitch stored in the surface state will be multiplied by 2, and the
* height will be halved. Also, since W and Y tiles store their data in a
* different order, the width and height will be rounded up to a multiple
diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
index 51a3bef..9d1948c 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
+++ b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
@@ -209,10 +209,10 @@ color_formats_match(gl_format src_format, gl_format dst_format)
* (overriding alpha to 1.0 via blending).
*/
return linear_src_format == linear_dst_format ||
- (linear_src_format == MESA_FORMAT_XRGB8888 &&
- linear_dst_format == MESA_FORMAT_ARGB8888) ||
- (linear_src_format == MESA_FORMAT_ARGB8888 &&
- linear_dst_format == MESA_FORMAT_XRGB8888);
+ (linear_src_format == MESA_FORMAT_XRGB8888_UNORM &&
+ linear_dst_format == MESA_FORMAT_ARGB8888_UNORM) ||
+ (linear_src_format == MESA_FORMAT_ARGB8888_UNORM &&
+ linear_dst_format == MESA_FORMAT_XRGB8888_UNORM);
}
static bool
@@ -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_X8_Z24_UNORM and MESA_FORMAT_S8_UINT_Z24_UNORM), and we can blit
* between those formats.
*/
gl_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_X8_Z24_UNORM) !=
+ (dst_mt->format == MESA_FORMAT_X8_Z24_UNORM)) {
return false;
}
@@ -2135,7 +2135,7 @@ brw_blorp_blit_params::brw_blorp_blit_params(struct brw_context *brw,
wm_prog_key.texture_data_type = BRW_REGISTER_TYPE_F;
break;
case GL_UNSIGNED_INT:
- if (src_mt->format == MESA_FORMAT_S8) {
+ if (src_mt->format == MESA_FORMAT_S8_UNORM) {
/* We process stencil as though it's an unsigned normalized color */
wm_prog_key.texture_data_type = BRW_REGISTER_TYPE_F;
} else {
diff --git a/src/mesa/drivers/dri/i965/brw_clear.c b/src/mesa/drivers/dri/i965/brw_clear.c
index 1cac996..6341939 100644
--- a/src/mesa/drivers/dri/i965/brw_clear.c
+++ b/src/mesa/drivers/dri/i965/brw_clear.c
@@ -130,7 +130,7 @@ 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_S8_UINT_Z24_UNORM:
/* From the Sandy Bridge PRM, volume 2 part 1, page 314:
*
* "[DevSNB+]: Several cases exist where Depth Buffer Clear cannot be
@@ -145,7 +145,7 @@ brw_fast_clear_depth(struct gl_context *ctx)
depth_clear_value = float_as_int(ctx->Depth.Clear);
break;
- case MESA_FORMAT_Z16:
+ case MESA_FORMAT_Z16_UNORM:
/* 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_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 688091f..c54ea63 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -882,7 +882,7 @@ intel_gles3_srgb_workaround(struct brw_context *brw,
for (int i = 0; i < BUFFER_COUNT; i++) {
if (fb->Attachment[i].Renderbuffer &&
fb->Attachment[i].Renderbuffer->Format == MESA_FORMAT_SARGB8) {
- fb->Attachment[i].Renderbuffer->Format = MESA_FORMAT_ARGB8888;
+ fb->Attachment[i].Renderbuffer->Format = MESA_FORMAT_ARGB8888_UNORM;
}
}
}
diff --git a/src/mesa/drivers/dri/i965/brw_misc_state.c b/src/mesa/drivers/dri/i965/brw_misc_state.c
index 3c908c8..6544c70 100644
--- a/src/mesa/drivers/dri/i965/brw_misc_state.c
+++ b/src/mesa/drivers/dri/i965/brw_misc_state.c
@@ -142,7 +142,7 @@ 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_S8_UINT_Z24_UNORM ||
intel_rb_format(srb) == MESA_FORMAT_Z32_FLOAT_X24S8)) {
drb = srb;
}
@@ -151,11 +151,11 @@ brw_depthbuffer_format(struct brw_context *brw)
return BRW_DEPTHFORMAT_D32_FLOAT;
switch (drb->mt->format) {
- case MESA_FORMAT_Z16:
+ case MESA_FORMAT_Z16_UNORM:
return BRW_DEPTHFORMAT_D16_UNORM;
case MESA_FORMAT_Z32_FLOAT:
return BRW_DEPTHFORMAT_D32_FLOAT;
- case MESA_FORMAT_X8_Z24:
+ case MESA_FORMAT_X8_Z24_UNORM:
if (brw->gen >= 6) {
return BRW_DEPTHFORMAT_D24_UNORM_X8_UINT;
} else {
@@ -173,7 +173,7 @@ brw_depthbuffer_format(struct brw_context *brw)
*/
return BRW_DEPTHFORMAT_D24_UNORM_S8_UINT;
}
- case MESA_FORMAT_S8_Z24:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
return BRW_DEPTHFORMAT_D24_UNORM_S8_UINT;
case MESA_FORMAT_Z32_FLOAT_X24S8:
return BRW_DEPTHFORMAT_D32_FLOAT_S8X24_UINT;
@@ -230,7 +230,7 @@ brw_get_depthstencil_tile_masks(struct intel_mipmap_tree *depth_mt,
if (stencil_mt->stencil_mt)
stencil_mt = stencil_mt->stencil_mt;
- if (stencil_mt->format == MESA_FORMAT_S8) {
+ if (stencil_mt->format == MESA_FORMAT_S8_UNORM) {
/* Separate stencil buffer uses 64x64 tiles. */
tile_mask_x |= 63;
tile_mask_y |= 63;
@@ -494,7 +494,7 @@ brw_workaround_depthstencil_alignment(struct brw_context *brw,
stencil_mt = get_stencil_miptree(stencil_irb);
brw->depthstencil.stencil_mt = stencil_mt;
- if (stencil_mt->format == MESA_FORMAT_S8) {
+ if (stencil_mt->format == MESA_FORMAT_S8_UNORM) {
/* Note: we can't compute the stencil offset using
* intel_region_get_aligned_offset(), because stencil_region claims
* that the region is untiled even though it's W tiled.
@@ -526,7 +526,7 @@ brw_emit_depthbuffer(struct brw_context *brw)
uint32_t width = 1, height = 1;
if (stencil_mt) {
- separate_stencil = stencil_mt->format == MESA_FORMAT_S8;
+ separate_stencil = stencil_mt->format == MESA_FORMAT_S8_UNORM;
/* Gen7 supports only separate stencil */
assert(separate_stencil || brw->gen < 7);
diff --git a/src/mesa/drivers/dri/i965/brw_surface_formats.c b/src/mesa/drivers/dri/i965/brw_surface_formats.c
index 90e43a7..c26f596 100644
--- a/src/mesa/drivers/dri/i965/brw_surface_formats.c
+++ b/src/mesa/drivers/dri/i965/brw_surface_formats.c
@@ -319,51 +319,51 @@ brw_format_for_mesa_format(gl_format mesa_format)
*/
static const uint32_t table[MESA_FORMAT_COUNT] =
{
- [MESA_FORMAT_RGBA8888] = 0,
- [MESA_FORMAT_RGBA8888_REV] = BRW_SURFACEFORMAT_R8G8B8A8_UNORM,
- [MESA_FORMAT_ARGB8888] = BRW_SURFACEFORMAT_B8G8R8A8_UNORM,
- [MESA_FORMAT_ARGB8888_REV] = 0,
- [MESA_FORMAT_RGBX8888] = 0,
- [MESA_FORMAT_RGBX8888_REV] = BRW_SURFACEFORMAT_R8G8B8X8_UNORM,
- [MESA_FORMAT_XRGB8888] = BRW_SURFACEFORMAT_B8G8R8X8_UNORM,
- [MESA_FORMAT_XRGB8888_REV] = 0,
+ [MESA_FORMAT_RGBA8888_UNORM] = 0,
+ [MESA_FORMAT_RGBA8888_REV_UNORM] = BRW_SURFACEFORMAT_R8G8B8A8_UNORM,
+ [MESA_FORMAT_ARGB8888_UNORM] = BRW_SURFACEFORMAT_B8G8R8A8_UNORM,
+ [MESA_FORMAT_ARGB8888_REV_UNORM] = 0,
+ [MESA_FORMAT_RGBX8888_UNORM] = 0,
+ [MESA_FORMAT_RGBX8888_REV_UNORM] = BRW_SURFACEFORMAT_R8G8B8X8_UNORM,
+ [MESA_FORMAT_XRGB8888_UNORM] = BRW_SURFACEFORMAT_B8G8R8X8_UNORM,
+ [MESA_FORMAT_XRGB8888_REV_UNORM] = 0,
[MESA_FORMAT_RGB888] = 0,
[MESA_FORMAT_BGR888] = 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_AL88] = BRW_SURFACEFORMAT_L8A8_UNORM,
- [MESA_FORMAT_AL88_REV] = 0,
- [MESA_FORMAT_AL1616] = BRW_SURFACEFORMAT_L16A16_UNORM,
- [MESA_FORMAT_AL1616_REV] = 0,
- [MESA_FORMAT_RGB332] = 0,
- [MESA_FORMAT_A8] = BRW_SURFACEFORMAT_A8_UNORM,
- [MESA_FORMAT_A16] = BRW_SURFACEFORMAT_A16_UNORM,
- [MESA_FORMAT_L8] = BRW_SURFACEFORMAT_L8_UNORM,
- [MESA_FORMAT_L16] = BRW_SURFACEFORMAT_L16_UNORM,
- [MESA_FORMAT_I8] = BRW_SURFACEFORMAT_I8_UNORM,
- [MESA_FORMAT_I16] = BRW_SURFACEFORMAT_I16_UNORM,
+ [MESA_FORMAT_RGB565_UNORM] = BRW_SURFACEFORMAT_B5G6R5_UNORM,
+ [MESA_FORMAT_RGB565_REV_UNORM] = 0,
+ [MESA_FORMAT_ARGB4444_UNORM] = BRW_SURFACEFORMAT_B4G4R4A4_UNORM,
+ [MESA_FORMAT_ARGB4444_REV_UNORM] = 0,
+ [MESA_FORMAT_RGBA5551_UNORM] = 0,
+ [MESA_FORMAT_ARGB1555_UNORM] = BRW_SURFACEFORMAT_B5G5R5A1_UNORM,
+ [MESA_FORMAT_ARGB1555_REV_UNORM] = 0,
+ [MESA_FORMAT_AL44_UNORM] = 0,
+ [MESA_FORMAT_AL88_UNORM] = BRW_SURFACEFORMAT_L8A8_UNORM,
+ [MESA_FORMAT_AL88_REV_UNORM] = 0,
+ [MESA_FORMAT_AL1616_UNORM] = BRW_SURFACEFORMAT_L16A16_UNORM,
+ [MESA_FORMAT_AL1616_REV_UNORM] = 0,
+ [MESA_FORMAT_RGB332_UNORM] = 0,
+ [MESA_FORMAT_A8_UNORM] = BRW_SURFACEFORMAT_A8_UNORM,
+ [MESA_FORMAT_A16_UNORM] = BRW_SURFACEFORMAT_A16_UNORM,
+ [MESA_FORMAT_L8_UNORM] = BRW_SURFACEFORMAT_L8_UNORM,
+ [MESA_FORMAT_L16_UNORM] = BRW_SURFACEFORMAT_L16_UNORM,
+ [MESA_FORMAT_I8_UNORM] = BRW_SURFACEFORMAT_I8_UNORM,
+ [MESA_FORMAT_I16_UNORM] = BRW_SURFACEFORMAT_I16_UNORM,
[MESA_FORMAT_YCBCR_REV] = BRW_SURFACEFORMAT_YCRCB_NORMAL,
[MESA_FORMAT_YCBCR] = BRW_SURFACEFORMAT_YCRCB_SWAPUVY,
- [MESA_FORMAT_R8] = BRW_SURFACEFORMAT_R8_UNORM,
- [MESA_FORMAT_GR88] = BRW_SURFACEFORMAT_R8G8_UNORM,
- [MESA_FORMAT_RG88] = 0,
- [MESA_FORMAT_R16] = BRW_SURFACEFORMAT_R16_UNORM,
- [MESA_FORMAT_GR1616] = BRW_SURFACEFORMAT_R16G16_UNORM,
- [MESA_FORMAT_RG1616] = 0,
- [MESA_FORMAT_ARGB2101010] = BRW_SURFACEFORMAT_B10G10R10A2_UNORM,
- [MESA_FORMAT_Z24_S8] = 0,
- [MESA_FORMAT_S8_Z24] = 0,
- [MESA_FORMAT_Z16] = 0,
- [MESA_FORMAT_X8_Z24] = 0,
- [MESA_FORMAT_Z24_X8] = 0,
- [MESA_FORMAT_Z32] = 0,
- [MESA_FORMAT_S8] = 0,
+ [MESA_FORMAT_R8_UNORM] = BRW_SURFACEFORMAT_R8_UNORM,
+ [MESA_FORMAT_GR88_UNORM] = BRW_SURFACEFORMAT_R8G8_UNORM,
+ [MESA_FORMAT_RG88_UNORM] = 0,
+ [MESA_FORMAT_R16_UNORM] = BRW_SURFACEFORMAT_R16_UNORM,
+ [MESA_FORMAT_GR1616_UNORM] = BRW_SURFACEFORMAT_R16G16_UNORM,
+ [MESA_FORMAT_RG1616_UNORM] = 0,
+ [MESA_FORMAT_ARGB2101010_UNORM] = BRW_SURFACEFORMAT_B10G10R10A2_UNORM,
+ [MESA_FORMAT_Z24_UNORM_S8_UINT] = 0,
+ [MESA_FORMAT_S8_UINT_Z24_UNORM] = 0,
+ [MESA_FORMAT_Z16_UNORM] = 0,
+ [MESA_FORMAT_X8_Z24_UNORM] = 0,
+ [MESA_FORMAT_Z24_X8_UNORM] = 0,
+ [MESA_FORMAT_Z32_UNORM] = 0,
+ [MESA_FORMAT_S8_UNORM] = 0,
[MESA_FORMAT_SRGB8] = 0,
[MESA_FORMAT_SRGBA8] = 0,
@@ -402,43 +402,43 @@ brw_format_for_mesa_format(gl_format mesa_format)
[MESA_FORMAT_ALPHA_UINT8] = 0,
[MESA_FORMAT_ALPHA_UINT16] = 0,
[MESA_FORMAT_ALPHA_UINT32] = 0,
- [MESA_FORMAT_ALPHA_INT8] = 0,
- [MESA_FORMAT_ALPHA_INT16] = 0,
+ [MESA_FORMAT_ALPHA_SINT8] = 0,
+ [MESA_FORMAT_ALPHA_SINT16] = 0,
[MESA_FORMAT_ALPHA_INT32] = 0,
[MESA_FORMAT_INTENSITY_UINT8] = 0,
[MESA_FORMAT_INTENSITY_UINT16] = 0,
[MESA_FORMAT_INTENSITY_UINT32] = 0,
- [MESA_FORMAT_INTENSITY_INT8] = 0,
- [MESA_FORMAT_INTENSITY_INT16] = 0,
- [MESA_FORMAT_INTENSITY_INT32] = 0,
+ [MESA_FORMAT_INTENSITY_SINT8] = 0,
+ [MESA_FORMAT_INTENSITY_SINT16] = 0,
+ [MESA_FORMAT_INTENSITY_SINT32] = 0,
[MESA_FORMAT_LUMINANCE_UINT8] = 0,
[MESA_FORMAT_LUMINANCE_UINT16] = 0,
[MESA_FORMAT_LUMINANCE_UINT32] = 0,
- [MESA_FORMAT_LUMINANCE_INT8] = 0,
+ [MESA_FORMAT_LUMINANCE_SINT8] = 0,
[MESA_FORMAT_LUMINANCE_INT16] = 0,
[MESA_FORMAT_LUMINANCE_INT32] = 0,
[MESA_FORMAT_LUMINANCE_ALPHA_UINT8] = 0,
[MESA_FORMAT_LUMINANCE_ALPHA_UINT16] = 0,
[MESA_FORMAT_LUMINANCE_ALPHA_UINT32] = 0,
- [MESA_FORMAT_LUMINANCE_ALPHA_INT8] = 0,
- [MESA_FORMAT_LUMINANCE_ALPHA_INT16] = 0,
- [MESA_FORMAT_LUMINANCE_ALPHA_INT32] = 0,
-
- [MESA_FORMAT_R_INT8] = BRW_SURFACEFORMAT_R8_SINT,
- [MESA_FORMAT_RG_INT8] = BRW_SURFACEFORMAT_R8G8_SINT,
- [MESA_FORMAT_RGB_INT8] = BRW_SURFACEFORMAT_R8G8B8_SINT,
- [MESA_FORMAT_RGBA_INT8] = BRW_SURFACEFORMAT_R8G8B8A8_SINT,
- [MESA_FORMAT_R_INT16] = BRW_SURFACEFORMAT_R16_SINT,
- [MESA_FORMAT_RG_INT16] = BRW_SURFACEFORMAT_R16G16_SINT,
- [MESA_FORMAT_RGB_INT16] = BRW_SURFACEFORMAT_R16G16B16_SINT,
- [MESA_FORMAT_RGBA_INT16] = BRW_SURFACEFORMAT_R16G16B16A16_SINT,
- [MESA_FORMAT_R_INT32] = BRW_SURFACEFORMAT_R32_SINT,
- [MESA_FORMAT_RG_INT32] = BRW_SURFACEFORMAT_R32G32_SINT,
- [MESA_FORMAT_RGB_INT32] = BRW_SURFACEFORMAT_R32G32B32_SINT,
- [MESA_FORMAT_RGBA_INT32] = BRW_SURFACEFORMAT_R32G32B32A32_SINT,
+ [MESA_FORMAT_LUMINANCE_ALPHA_SINT8] = 0,
+ [MESA_FORMAT_LUMINANCE_ALPHA_SINT16] = 0,
+ [MESA_FORMAT_LUMINANCE_ALPHA_SINT32] = 0,
+
+ [MESA_FORMAT_R_SINT8] = BRW_SURFACEFORMAT_R8_SINT,
+ [MESA_FORMAT_RG_SINT8] = BRW_SURFACEFORMAT_R8G8_SINT,
+ [MESA_FORMAT_RGB_SINT8] = BRW_SURFACEFORMAT_R8G8B8_SINT,
+ [MESA_FORMAT_RGBA_SINT8] = BRW_SURFACEFORMAT_R8G8B8A8_SINT,
+ [MESA_FORMAT_R_SINT16] = BRW_SURFACEFORMAT_R16_SINT,
+ [MESA_FORMAT_RG_SINT16] = BRW_SURFACEFORMAT_R16G16_SINT,
+ [MESA_FORMAT_RGB_SINT16] = BRW_SURFACEFORMAT_R16G16B16_SINT,
+ [MESA_FORMAT_RGBA_SINT16] = BRW_SURFACEFORMAT_R16G16B16A16_SINT,
+ [MESA_FORMAT_R_SINT32] = BRW_SURFACEFORMAT_R32_SINT,
+ [MESA_FORMAT_RG_SINT32] = BRW_SURFACEFORMAT_R32G32_SINT,
+ [MESA_FORMAT_RGB_SINT32] = BRW_SURFACEFORMAT_R32G32B32_SINT,
+ [MESA_FORMAT_RGBA_SINT32] = BRW_SURFACEFORMAT_R32G32B32A32_SINT,
[MESA_FORMAT_R_UINT8] = BRW_SURFACEFORMAT_R8_UINT,
[MESA_FORMAT_RG_UINT8] = BRW_SURFACEFORMAT_R8G8_UINT,
@@ -454,16 +454,16 @@ brw_format_for_mesa_format(gl_format mesa_format)
[MESA_FORMAT_RGBA_UINT32] = BRW_SURFACEFORMAT_R32G32B32A32_UINT,
[MESA_FORMAT_DUDV8] = BRW_SURFACEFORMAT_R8G8_SNORM,
- [MESA_FORMAT_SIGNED_R8] = BRW_SURFACEFORMAT_R8_SNORM,
- [MESA_FORMAT_SIGNED_RG88_REV] = BRW_SURFACEFORMAT_R8G8_SNORM,
- [MESA_FORMAT_SIGNED_RGBX8888] = 0,
- [MESA_FORMAT_SIGNED_RGBA8888] = 0,
- [MESA_FORMAT_SIGNED_RGBA8888_REV] = BRW_SURFACEFORMAT_R8G8B8A8_SNORM,
- [MESA_FORMAT_SIGNED_R16] = BRW_SURFACEFORMAT_R16_SNORM,
- [MESA_FORMAT_SIGNED_GR1616] = BRW_SURFACEFORMAT_R16G16_SNORM,
- [MESA_FORMAT_SIGNED_RGB_16] = BRW_SURFACEFORMAT_R16G16B16_SNORM,
- [MESA_FORMAT_SIGNED_RGBA_16] = BRW_SURFACEFORMAT_R16G16B16A16_SNORM,
- [MESA_FORMAT_RGBA_16] = BRW_SURFACEFORMAT_R16G16B16A16_UNORM,
+ [MESA_FORMAT_R8_SNORM] = BRW_SURFACEFORMAT_R8_SNORM,
+ [MESA_FORMAT_RG88_REV_SNORM] = BRW_SURFACEFORMAT_R8G8_SNORM,
+ [MESA_FORMAT_RGBX8888_SNORM] = 0,
+ [MESA_FORMAT_RGBA8888_SNORM] = 0,
+ [MESA_FORMAT_RGBA8888_REV_SNORM] = BRW_SURFACEFORMAT_R8G8B8A8_SNORM,
+ [MESA_FORMAT_R16_SNORM] = BRW_SURFACEFORMAT_R16_SNORM,
+ [MESA_FORMAT_GR1616_SNORM] = BRW_SURFACEFORMAT_R16G16_SNORM,
+ [MESA_FORMAT_RGB_16_SNORM] = BRW_SURFACEFORMAT_R16G16B16_SNORM,
+ [MESA_FORMAT_RGBA_16_SNORM] = BRW_SURFACEFORMAT_R16G16B16A16_SNORM,
+ [MESA_FORMAT_RGBA_16_UNORM] = BRW_SURFACEFORMAT_R16G16B16A16_UNORM,
[MESA_FORMAT_RED_RGTC1] = BRW_SURFACEFORMAT_BC4_UNORM,
[MESA_FORMAT_SIGNED_RED_RGTC1] = BRW_SURFACEFORMAT_BC4_SNORM,
@@ -487,14 +487,14 @@ brw_format_for_mesa_format(gl_format mesa_format)
[MESA_FORMAT_ETC2_RGB8_PUNCHTHROUGH_ALPHA1] = BRW_SURFACEFORMAT_ETC2_RGB8_PTA,
[MESA_FORMAT_ETC2_SRGB8_PUNCHTHROUGH_ALPHA1] = BRW_SURFACEFORMAT_ETC2_SRGB8_PTA,
- [MESA_FORMAT_SIGNED_A8] = 0,
- [MESA_FORMAT_SIGNED_L8] = 0,
- [MESA_FORMAT_SIGNED_AL88] = 0,
- [MESA_FORMAT_SIGNED_I8] = 0,
- [MESA_FORMAT_SIGNED_A16] = 0,
- [MESA_FORMAT_SIGNED_L16] = 0,
- [MESA_FORMAT_SIGNED_AL1616] = 0,
- [MESA_FORMAT_SIGNED_I16] = 0,
+ [MESA_FORMAT_A8_SNORM] = 0,
+ [MESA_FORMAT_L8_SNORM] = 0,
+ [MESA_FORMAT_AL88_SNORM] = 0,
+ [MESA_FORMAT_I8_SNORM] = 0,
+ [MESA_FORMAT_A16_SNORM] = 0,
+ [MESA_FORMAT_L16_SNORM] = 0,
+ [MESA_FORMAT_AL1616_SNORM] = 0,
+ [MESA_FORMAT_I16_SNORM] = 0,
[MESA_FORMAT_RGB9_E5_FLOAT] = BRW_SURFACEFORMAT_R9G9B9E5_SHAREDEXP,
[MESA_FORMAT_R11_G11_B10_FLOAT] = BRW_SURFACEFORMAT_R11G11B10_FLOAT,
@@ -600,18 +600,18 @@ 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_S8] = true;
- brw->format_supported_as_render_target[MESA_FORMAT_Z16] = true;
+ brw->format_supported_as_render_target[MESA_FORMAT_S8_UINT_Z24_UNORM] = true;
+ brw->format_supported_as_render_target[MESA_FORMAT_X8_Z24_UNORM] = true;
+ brw->format_supported_as_render_target[MESA_FORMAT_S8_UNORM] = true;
+ brw->format_supported_as_render_target[MESA_FORMAT_Z16_UNORM] = true;
brw->format_supported_as_render_target[MESA_FORMAT_Z32_FLOAT] = true;
brw->format_supported_as_render_target[MESA_FORMAT_Z32_FLOAT_X24S8] = 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_S8_UINT_Z24_UNORM] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_X8_Z24_UNORM] = true;
ctx->TextureFormatSupported[MESA_FORMAT_Z32_FLOAT] = true;
ctx->TextureFormatSupported[MESA_FORMAT_Z32_FLOAT_X24S8] = true;
@@ -627,7 +627,7 @@ brw_init_surface_formats(struct brw_context *brw)
* asking for DEPTH_COMPONENT16, so we have to respect that.
*/
if (_mesa_is_desktop_gl(ctx))
- ctx->TextureFormatSupported[MESA_FORMAT_Z16] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_Z16_UNORM] = true;
/* On hardware that lacks support for ETC1, we map ETC1 to RGBX
* during glCompressedTexImage2D(). See intel_mipmap_tree::wraps_etc1.
@@ -695,11 +695,11 @@ translate_tex_format(struct brw_context *brw,
switch( mesa_format ) {
- case MESA_FORMAT_Z16:
+ case MESA_FORMAT_Z16_UNORM:
return BRW_SURFACEFORMAT_I16_UNORM;
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_X8_Z24:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
+ case MESA_FORMAT_X8_Z24_UNORM:
return BRW_SURFACEFORMAT_I24X8_UNORM;
case MESA_FORMAT_Z32_FLOAT:
@@ -741,9 +741,9 @@ brw_is_hiz_depth_format(struct brw_context *brw, gl_format format)
switch (format) {
case MESA_FORMAT_Z32_FLOAT:
case MESA_FORMAT_Z32_FLOAT_X24S8:
- case MESA_FORMAT_X8_Z24:
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_Z16:
+ case MESA_FORMAT_X8_Z24_UNORM:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
+ case MESA_FORMAT_Z16_UNORM:
return true;
default:
return false;
diff --git a/src/mesa/drivers/dri/i965/brw_tex_layout.c b/src/mesa/drivers/dri/i965/brw_tex_layout.c
index 16af19f..b0e5762 100644
--- a/src/mesa/drivers/dri/i965/brw_tex_layout.c
+++ b/src/mesa/drivers/dri/i965/brw_tex_layout.c
@@ -75,10 +75,10 @@ intel_horizontal_texture_alignment_unit(struct brw_context *brw,
return i;
}
- if (format == MESA_FORMAT_S8)
+ if (format == MESA_FORMAT_S8_UNORM)
return 8;
- if (brw->gen >= 7 && format == MESA_FORMAT_Z16)
+ if (brw->gen >= 7 && format == MESA_FORMAT_Z16_UNORM)
return 8;
return 4;
@@ -114,7 +114,7 @@ intel_vertical_texture_alignment_unit(struct brw_context *brw,
if (_mesa_is_format_compressed(format))
return 4;
- if (format == MESA_FORMAT_S8)
+ if (format == MESA_FORMAT_S8_UNORM)
return brw->gen >= 7 ? 8 : 4;
/* Broadwell only supports VALIGN of 4, 8, and 16. The BSpec says 4
diff --git a/src/mesa/drivers/dri/i965/intel_blit.c b/src/mesa/drivers/dri/i965/intel_blit.c
index 7bc289f..add1b9a 100644
--- a/src/mesa/drivers/dri/i965/intel_blit.c
+++ b/src/mesa/drivers/dri/i965/intel_blit.c
@@ -170,10 +170,10 @@ intel_miptree_blit(struct brw_context *brw,
* channel to 1.0 at the end.
*/
if (src_format != dst_format &&
- ((src_format != MESA_FORMAT_ARGB8888 &&
- src_format != MESA_FORMAT_XRGB8888) ||
- (dst_format != MESA_FORMAT_ARGB8888 &&
- dst_format != MESA_FORMAT_XRGB8888))) {
+ ((src_format != MESA_FORMAT_ARGB8888_UNORM &&
+ src_format != MESA_FORMAT_XRGB8888_UNORM) ||
+ (dst_format != MESA_FORMAT_ARGB8888_UNORM &&
+ dst_format != MESA_FORMAT_XRGB8888_UNORM))) {
perf_debug("%s: Can't use hardware blitter from %s to %s, "
"falling back.\n", __FUNCTION__,
_mesa_get_format_name(src_format),
@@ -250,8 +250,8 @@ intel_miptree_blit(struct brw_context *brw,
return false;
}
- if (src_mt->format == MESA_FORMAT_XRGB8888 &&
- dst_mt->format == MESA_FORMAT_ARGB8888) {
+ if (src_mt->format == MESA_FORMAT_XRGB8888_UNORM &&
+ dst_mt->format == MESA_FORMAT_ARGB8888_UNORM) {
intel_miptree_set_alpha_to_one(brw, dst_mt,
dst_x, dst_y,
width, height);
diff --git a/src/mesa/drivers/dri/i965/intel_fbo.c b/src/mesa/drivers/dri/i965/intel_fbo.c
index d3b9dcf..e7ccbbc 100644
--- a/src/mesa/drivers/dri/i965/intel_fbo.c
+++ b/src/mesa/drivers/dri/i965/intel_fbo.c
@@ -206,10 +206,10 @@ intel_alloc_renderbuffer_storage(struct gl_context * ctx, struct gl_renderbuffer
case GL_STENCIL_INDEX16_EXT:
/* These aren't actual texture formats, so force them here. */
if (brw->has_separate_stencil) {
- rb->Format = MESA_FORMAT_S8;
+ rb->Format = MESA_FORMAT_S8_UNORM;
} else {
assert(!brw->must_use_separate_stencil);
- rb->Format = MESA_FORMAT_S8_Z24;
+ rb->Format = MESA_FORMAT_S8_UINT_Z24_UNORM;
}
break;
}
@@ -269,7 +269,7 @@ intel_image_target_renderbuffer_storage(struct gl_context *ctx,
/* __DRIimage is opaque to the core so it has to be checked here */
switch (image->format) {
- case MESA_FORMAT_RGBA8888_REV:
+ case MESA_FORMAT_RGBA8888_REV_UNORM:
_mesa_error(ctx, GL_INVALID_OPERATION,
"glEGLImageTargetRenderbufferStorage(unsupported image format");
return;
@@ -609,7 +609,7 @@ intel_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb)
fbo_incomplete(fb, "FBO incomplete: separate stencil "
"unsupported\n");
}
- if (stencil_mt->format != MESA_FORMAT_S8) {
+ if (stencil_mt->format != MESA_FORMAT_S8_UNORM) {
fbo_incomplete(fb, "FBO incomplete: separate stencil is %s "
"instead of S8\n",
_mesa_get_format_name(stencil_mt->format));
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index a96c7ea..dff1752 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -353,7 +353,7 @@ intel_miptree_create_layout(struct brw_context *brw,
(brw->has_separate_stencil && brw_is_hiz_depth_format(brw, format)))) {
mt->stencil_mt = intel_miptree_create(brw,
mt->target,
- MESA_FORMAT_S8,
+ MESA_FORMAT_S8_UNORM,
mt->first_level,
mt->last_level,
mt->logical_width0,
@@ -370,8 +370,8 @@ 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;
+ if (mt->format == MESA_FORMAT_S8_UINT_Z24_UNORM) {
+ mt->format = MESA_FORMAT_X8_Z24_UNORM;
} else if (mt->format == MESA_FORMAT_Z32_FLOAT_X24S8) {
mt->format = MESA_FORMAT_Z32_FLOAT;
mt->cpp = 4;
@@ -397,7 +397,7 @@ intel_miptree_choose_tiling(struct brw_context *brw,
enum intel_miptree_tiling_mode requested,
struct intel_mipmap_tree *mt)
{
- if (format == MESA_FORMAT_S8) {
+ if (format == MESA_FORMAT_S8_UNORM) {
/* The stencil buffer is W tiled. However, we request from the kernel a
* non-tiled buffer because the GTT is incapable of W fencing.
*/
@@ -503,10 +503,10 @@ intel_miptree_create(struct brw_context *brw,
if (!brw->is_baytrail) {
switch (format) {
case MESA_FORMAT_ETC1_RGB8:
- format = MESA_FORMAT_RGBX8888_REV;
+ format = MESA_FORMAT_RGBX8888_REV_UNORM;
break;
case MESA_FORMAT_ETC2_RGB8:
- format = MESA_FORMAT_RGBX8888_REV;
+ format = MESA_FORMAT_RGBX8888_REV_UNORM;
break;
case MESA_FORMAT_ETC2_SRGB8:
case MESA_FORMAT_ETC2_SRGB8_ALPHA8_EAC:
@@ -515,19 +515,19 @@ intel_miptree_create(struct brw_context *brw,
break;
case MESA_FORMAT_ETC2_RGBA8_EAC:
case MESA_FORMAT_ETC2_RGB8_PUNCHTHROUGH_ALPHA1:
- format = MESA_FORMAT_RGBA8888_REV;
+ format = MESA_FORMAT_RGBA8888_REV_UNORM;
break;
case MESA_FORMAT_ETC2_R11_EAC:
- format = MESA_FORMAT_R16;
+ format = MESA_FORMAT_R16_UNORM;
break;
case MESA_FORMAT_ETC2_SIGNED_R11_EAC:
- format = MESA_FORMAT_SIGNED_R16;
+ format = MESA_FORMAT_R16_SNORM;
break;
case MESA_FORMAT_ETC2_RG11_EAC:
- format = MESA_FORMAT_GR1616;
+ format = MESA_FORMAT_GR1616_UNORM;
break;
case MESA_FORMAT_ETC2_SIGNED_RG11_EAC:
- format = MESA_FORMAT_SIGNED_GR1616;
+ format = MESA_FORMAT_GR1616_SNORM;
break;
default:
/* Non ETC1 / ETC2 format */
@@ -552,7 +552,7 @@ intel_miptree_create(struct brw_context *brw,
total_width = mt->total_width;
total_height = mt->total_height;
- if (format == MESA_FORMAT_S8) {
+ if (format == MESA_FORMAT_S8_UNORM) {
/* Align to size of W tile, 64x64. */
total_width = ALIGN(total_width, 64);
total_height = ALIGN(total_height, 64);
@@ -913,8 +913,8 @@ intel_miptree_match_image(struct intel_mipmap_tree *mt,
assert(target_to_target(image->TexObject->Target) == mt->target);
gl_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_X8_Z24_UNORM && mt->stencil_mt)
+ mt_format = MESA_FORMAT_S8_UINT_Z24_UNORM;
if (mt->format == MESA_FORMAT_Z32_FLOAT && mt->stencil_mt)
mt_format = MESA_FORMAT_Z32_FLOAT_X24S8;
if (mt->etc_format != MESA_FORMAT_NONE)
@@ -1216,7 +1216,7 @@ intel_miptree_alloc_mcs(struct brw_context *brw,
/* 8 bits/pixel are required for MCS data when using 4x MSAA (2 bits for
* each sample).
*/
- format = MESA_FORMAT_R8;
+ format = MESA_FORMAT_R8_UNORM;
break;
case 8:
/* 32 bits/pixel are required for MCS data when using 8x MSAA (3 bits
@@ -1999,7 +1999,7 @@ intel_miptree_map_etc(struct brw_context *brw,
{
assert(mt->etc_format != MESA_FORMAT_NONE);
if (mt->etc_format == MESA_FORMAT_ETC1_RGB8) {
- assert(mt->format == MESA_FORMAT_RGBX8888_REV);
+ assert(mt->format == MESA_FORMAT_RGBX8888_REV_UNORM);
}
assert(map->mode & GL_MAP_WRITE_BIT);
@@ -2258,7 +2258,7 @@ intel_miptree_map_singlesample(struct brw_context *brw,
intel_miptree_slice_set_needs_hiz_resolve(mt, level, slice);
}
- if (mt->format == MESA_FORMAT_S8) {
+ if (mt->format == MESA_FORMAT_S8_UNORM) {
intel_miptree_map_s8(brw, mt, map, level, slice);
} else if (mt->etc_format != MESA_FORMAT_NONE &&
!(mode & BRW_MAP_DIRECT_BIT)) {
@@ -2309,7 +2309,7 @@ intel_miptree_unmap_singlesample(struct brw_context *brw,
DBG("%s: mt %p (%s) level %d slice %d\n", __FUNCTION__,
mt, _mesa_get_format_name(mt->format), level, slice);
- if (mt->format == MESA_FORMAT_S8) {
+ if (mt->format == MESA_FORMAT_S8_UNORM) {
intel_miptree_unmap_s8(brw, mt, map, level, slice);
} else if (mt->etc_format != MESA_FORMAT_NONE &&
!(map->mode & BRW_MAP_DIRECT_BIT)) {
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
index cde702c..34dea81 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
@@ -279,8 +279,8 @@ struct intel_mipmap_tree
* 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_Z32_FLOAT, otherwise for MESA_FORMAT_S8_Z24 objects it will be
- * MESA_FORMAT_X8_Z24.
+ * MESA_FORMAT_Z32_FLOAT, otherwise for MESA_FORMAT_S8_UINT_Z24_UNORM objects it will be
+ * MESA_FORMAT_X8_Z24_UNORM.
*
* 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 6858c7d..13b1099 100644
--- a/src/mesa/drivers/dri/i965/intel_pixel_bitmap.c
+++ b/src/mesa/drivers/dri/i965/intel_pixel_bitmap.c
@@ -229,11 +229,11 @@ do_blit_bitmap( struct gl_context *ctx,
UNCLAMPED_FLOAT_TO_UBYTE(ubcolor[3], tmpColor[3]);
switch (_mesa_get_render_format(ctx, intel_rb_format(irb))) {
- case MESA_FORMAT_ARGB8888:
- case MESA_FORMAT_XRGB8888:
+ case MESA_FORMAT_ARGB8888_UNORM:
+ case MESA_FORMAT_XRGB8888_UNORM:
color = PACK_COLOR_8888(ubcolor[3], ubcolor[0], ubcolor[1], ubcolor[2]);
break;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_RGB565_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 4373685..f684a9d 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -135,8 +135,8 @@ aub_dump_bmp(struct gl_context *ctx)
enum aub_dump_bmp_format format;
switch (irb->Base.Base.Format) {
- case MESA_FORMAT_ARGB8888:
- case MESA_FORMAT_XRGB8888:
+ case MESA_FORMAT_ARGB8888_UNORM:
+ case MESA_FORMAT_XRGB8888_UNORM:
format = AUB_DUMP_BMP_FORMAT_ARGB_8888;
break;
default:
@@ -976,11 +976,11 @@ intelCreateBuffer(__DRIscreen * driScrnPriv,
_mesa_initialize_window_framebuffer(fb, mesaVis);
if (mesaVis->redBits == 5)
- rgbFormat = MESA_FORMAT_RGB565;
+ rgbFormat = MESA_FORMAT_RGB565_UNORM;
else if (mesaVis->sRGBCapable)
rgbFormat = MESA_FORMAT_SARGB8;
else if (mesaVis->alphaBits == 0)
- rgbFormat = MESA_FORMAT_XRGB8888;
+ rgbFormat = MESA_FORMAT_XRGB8888_UNORM;
else {
rgbFormat = MESA_FORMAT_SARGB8;
fb->Visual.sRGBCapable = true;
@@ -1004,10 +1004,10 @@ 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_X8_Z24_UNORM,
num_samples);
_mesa_add_renderbuffer(fb, BUFFER_DEPTH, &rb->Base.Base);
- rb = intel_create_private_renderbuffer(MESA_FORMAT_S8,
+ rb = intel_create_private_renderbuffer(MESA_FORMAT_S8_UNORM,
num_samples);
_mesa_add_renderbuffer(fb, BUFFER_STENCIL, &rb->Base.Base);
} else {
@@ -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_S8_UINT_Z24_UNORM,
num_samples);
_mesa_add_renderbuffer(fb, BUFFER_DEPTH, &rb->Base.Base);
_mesa_add_renderbuffer(fb, BUFFER_STENCIL, &rb->Base.Base);
@@ -1023,7 +1023,7 @@ intelCreateBuffer(__DRIscreen * driScrnPriv,
}
else if (mesaVis->depthBits == 16) {
assert(mesaVis->stencilBits == 0);
- rb = intel_create_private_renderbuffer(MESA_FORMAT_Z16,
+ rb = intel_create_private_renderbuffer(MESA_FORMAT_Z16_UNORM,
num_samples);
_mesa_add_renderbuffer(fb, BUFFER_DEPTH, &rb->Base.Base);
}
@@ -1125,8 +1125,8 @@ static __DRIconfig**
intel_screen_make_configs(__DRIscreen *dri_screen)
{
static const gl_format formats[] = {
- MESA_FORMAT_RGB565,
- MESA_FORMAT_ARGB8888
+ MESA_FORMAT_RGB565_UNORM,
+ MESA_FORMAT_ARGB8888_UNORM
};
/* GLX_SWAP_COPY_OML is not supported due to page flipping. */
@@ -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_RGB565_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_RGB565_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_RGB565_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 cc50f84..93f0786 100644
--- a/src/mesa/drivers/dri/i965/intel_tex_image.c
+++ b/src/mesa/drivers/dri/i965/intel_tex_image.c
@@ -300,15 +300,15 @@ intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
if (rb->mt->cpp == 4) {
if (texture_format == __DRI_TEXTURE_FORMAT_RGB) {
internalFormat = GL_RGB;
- texFormat = MESA_FORMAT_XRGB8888;
+ texFormat = MESA_FORMAT_XRGB8888_UNORM;
}
else {
internalFormat = GL_RGBA;
- texFormat = MESA_FORMAT_ARGB8888;
+ texFormat = MESA_FORMAT_ARGB8888_UNORM;
}
} else if (rb->mt->cpp == 2) {
internalFormat = GL_RGB;
- texFormat = MESA_FORMAT_RGB565;
+ texFormat = MESA_FORMAT_RGB565_UNORM;
}
_mesa_lock_texture(&brw->ctx, texObj);
diff --git a/src/mesa/drivers/dri/i965/intel_tex_subimage.c b/src/mesa/drivers/dri/i965/intel_tex_subimage.c
index a72d313..8bee491 100644
--- a/src/mesa/drivers/dri/i965/intel_tex_subimage.c
+++ b/src/mesa/drivers/dri/i965/intel_tex_subimage.c
@@ -573,11 +573,11 @@ intel_texsubimage_tiled_memcpy(struct gl_context * ctx,
packing->Invert)
return false;
- if ((texImage->TexFormat == MESA_FORMAT_L8 && format == GL_LUMINANCE) ||
- (texImage->TexFormat == MESA_FORMAT_A8 && format == GL_ALPHA)) {
+ if ((texImage->TexFormat == MESA_FORMAT_L8_UNORM && format == GL_LUMINANCE) ||
+ (texImage->TexFormat == MESA_FORMAT_A8_UNORM && format == GL_ALPHA)) {
cpp = 1;
mem_copy = memcpy;
- } else if (texImage->TexFormat == MESA_FORMAT_ARGB8888) {
+ } else if (texImage->TexFormat == MESA_FORMAT_ARGB8888_UNORM) {
cpp = 4;
if (format == GL_BGRA) {
mem_copy = memcpy;
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fbo.c b/src/mesa/drivers/dri/nouveau/nouveau_fbo.c
index 25543e4..35d241d 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_fbo.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_fbo.c
@@ -44,23 +44,23 @@ set_renderbuffer_format(struct gl_renderbuffer *rb, GLenum internalFormat)
case GL_RGB:
case GL_RGB8:
rb->_BaseFormat = GL_RGB;
- rb->Format = MESA_FORMAT_XRGB8888;
+ rb->Format = MESA_FORMAT_XRGB8888_UNORM;
s->cpp = 4;
break;
case GL_RGBA:
case GL_RGBA8:
rb->_BaseFormat = GL_RGBA;
- rb->Format = MESA_FORMAT_ARGB8888;
+ rb->Format = MESA_FORMAT_ARGB8888_UNORM;
s->cpp = 4;
break;
case GL_RGB5:
rb->_BaseFormat = GL_RGB;
- rb->Format = MESA_FORMAT_RGB565;
+ rb->Format = MESA_FORMAT_RGB565_UNORM;
s->cpp = 2;
break;
case GL_DEPTH_COMPONENT16:
rb->_BaseFormat = GL_DEPTH_COMPONENT;
- rb->Format = MESA_FORMAT_Z16;
+ rb->Format = MESA_FORMAT_Z16_UNORM;
s->cpp = 2;
break;
case GL_DEPTH_COMPONENT:
@@ -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_Z24_UNORM_S8_UINT;
s->cpp = 4;
break;
default:
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_screen.c b/src/mesa/drivers/dri/nouveau/nouveau_screen.c
index ce98242..7069b02 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_screen.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_screen.c
@@ -53,9 +53,9 @@ nouveau_get_configs(void)
const uint8_t msaa_samples[] = { 0 };
static const gl_format formats[3] = {
- MESA_FORMAT_RGB565,
- MESA_FORMAT_ARGB8888,
- MESA_FORMAT_XRGB8888,
+ MESA_FORMAT_RGB565_UNORM,
+ MESA_FORMAT_ARGB8888_UNORM,
+ MESA_FORMAT_XRGB8888_UNORM,
};
const GLenum back_buffer_modes[] = {
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_texture.c b/src/mesa/drivers/dri/nouveau/nouveau_texture.c
index 8904389..51fdc26 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_texture.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_texture.c
@@ -175,9 +175,9 @@ nouveau_choose_tex_format(struct gl_context *ctx, GLenum target,
case GL_RGBA16:
case GL_RGB10_A2:
case GL_COMPRESSED_RGBA:
- return MESA_FORMAT_ARGB8888;
+ return MESA_FORMAT_ARGB8888_UNORM;
case GL_RGB5_A1:
- return MESA_FORMAT_ARGB1555;
+ return MESA_FORMAT_ARGB1555_UNORM;
case GL_RGB:
case GL_RGB8:
@@ -185,12 +185,12 @@ nouveau_choose_tex_format(struct gl_context *ctx, GLenum target,
case GL_RGB12:
case GL_RGB16:
case GL_COMPRESSED_RGB:
- return MESA_FORMAT_XRGB8888;
+ return MESA_FORMAT_XRGB8888_UNORM;
case 3:
case GL_R3_G3_B2:
case GL_RGB4:
case GL_RGB5:
- return MESA_FORMAT_RGB565;
+ return MESA_FORMAT_RGB565_UNORM;
case 2:
case GL_LUMINANCE_ALPHA:
@@ -201,7 +201,7 @@ nouveau_choose_tex_format(struct gl_context *ctx, GLenum target,
case GL_LUMINANCE16_ALPHA16:
case GL_LUMINANCE8_ALPHA8:
case GL_COMPRESSED_LUMINANCE_ALPHA:
- return MESA_FORMAT_ARGB8888;
+ return MESA_FORMAT_ARGB8888_UNORM;
case 1:
case GL_LUMINANCE:
@@ -210,7 +210,7 @@ nouveau_choose_tex_format(struct gl_context *ctx, GLenum target,
case GL_LUMINANCE16:
case GL_LUMINANCE8:
case GL_COMPRESSED_LUMINANCE:
- return MESA_FORMAT_L8;
+ return MESA_FORMAT_L8_UNORM;
case GL_ALPHA:
case GL_ALPHA4:
@@ -218,14 +218,14 @@ nouveau_choose_tex_format(struct gl_context *ctx, GLenum target,
case GL_ALPHA16:
case GL_ALPHA8:
case GL_COMPRESSED_ALPHA:
- return MESA_FORMAT_A8;
+ return MESA_FORMAT_A8_UNORM;
case GL_INTENSITY:
case GL_INTENSITY4:
case GL_INTENSITY12:
case GL_INTENSITY16:
case GL_INTENSITY8:
- return MESA_FORMAT_I8;
+ return MESA_FORMAT_I8_UNORM;
case GL_RGB_S3TC:
case GL_RGB4_S3TC:
@@ -398,9 +398,9 @@ nouveau_texture_reallocate(struct gl_context *ctx, struct gl_texture_object *t)
static unsigned
get_teximage_placement(struct gl_texture_image *ti)
{
- if (ti->TexFormat == MESA_FORMAT_A8 ||
- ti->TexFormat == MESA_FORMAT_L8 ||
- ti->TexFormat == MESA_FORMAT_I8)
+ if (ti->TexFormat == MESA_FORMAT_A8_UNORM ||
+ ti->TexFormat == MESA_FORMAT_L8_UNORM ||
+ ti->TexFormat == MESA_FORMAT_I8_UNORM)
/* 1 cpp formats will have to be swizzled by the CPU,
* so leave them in system RAM for now. */
return NOUVEAU_BO_MAP;
@@ -589,9 +589,9 @@ get_texbuffer_format(struct gl_renderbuffer *rb, GLint format)
if (s->cpp < 4)
return s->format;
else if (format == __DRI_TEXTURE_FORMAT_RGBA)
- return MESA_FORMAT_ARGB8888;
+ return MESA_FORMAT_ARGB8888_UNORM;
else
- return MESA_FORMAT_XRGB8888;
+ return MESA_FORMAT_XRGB8888_UNORM;
}
void
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_util.h b/src/mesa/drivers/dri/nouveau/nouveau_util.h
index 17d6965..fa89c0d 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_util.h
+++ b/src/mesa/drivers/dri/nouveau/nouveau_util.h
@@ -34,19 +34,19 @@ static inline unsigned
pack_rgba_i(gl_format f, uint8_t c[])
{
switch (f) {
- case MESA_FORMAT_ARGB8888:
+ case MESA_FORMAT_ARGB8888_UNORM:
return PACK_COLOR_8888(c[ACOMP], c[RCOMP], c[GCOMP], c[BCOMP]);
- case MESA_FORMAT_ARGB8888_REV:
+ case MESA_FORMAT_ARGB8888_REV_UNORM:
return PACK_COLOR_8888(c[BCOMP], c[GCOMP], c[RCOMP], c[ACOMP]);
- case MESA_FORMAT_XRGB8888:
+ case MESA_FORMAT_XRGB8888_UNORM:
return PACK_COLOR_8888(0, c[RCOMP], c[GCOMP], c[BCOMP]);
- case MESA_FORMAT_XRGB8888_REV:
+ case MESA_FORMAT_XRGB8888_REV_UNORM:
return PACK_COLOR_8888(c[BCOMP], c[GCOMP], c[RCOMP], 0);
- case MESA_FORMAT_RGBA8888:
+ case MESA_FORMAT_RGBA8888_UNORM:
return PACK_COLOR_8888(c[RCOMP], c[GCOMP], c[BCOMP], c[ACOMP]);
- case MESA_FORMAT_RGBA8888_REV:
+ case MESA_FORMAT_RGBA8888_REV_UNORM:
return PACK_COLOR_8888(c[ACOMP], c[BCOMP], c[GCOMP], c[RCOMP]);
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_RGB565_UNORM:
return PACK_COLOR_565(c[RCOMP], c[GCOMP], c[BCOMP]);
default:
assert(0);
@@ -57,11 +57,11 @@ static inline unsigned
pack_zs_i(gl_format f, uint32_t z, uint8_t s)
{
switch (f) {
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
return (z & 0xffffff00) | (s & 0xff);
- case MESA_FORMAT_Z24_X8:
+ case MESA_FORMAT_Z24_X8_UNORM:
return (z & 0xffffff00);
- case MESA_FORMAT_Z16:
+ case MESA_FORMAT_Z16_UNORM:
return (z & 0xffff0000) >> 16;
default:
assert(0);
diff --git a/src/mesa/drivers/dri/nouveau/nv04_context.c b/src/mesa/drivers/dri/nouveau/nv04_context.c
index c198c03..4739305 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_context.c
+++ b/src/mesa/drivers/dri/nouveau/nv04_context.c
@@ -37,8 +37,8 @@ texunit_needs_combiners(struct gl_texture_unit *u)
struct gl_texture_object *t = u->_Current;
struct gl_texture_image *ti = t->Image[0][t->BaseLevel];
- return ti->TexFormat == MESA_FORMAT_A8 ||
- ti->TexFormat == MESA_FORMAT_L8 ||
+ return ti->TexFormat == MESA_FORMAT_A8_UNORM ||
+ ti->TexFormat == MESA_FORMAT_L8_UNORM ||
u->EnvMode == GL_COMBINE ||
u->EnvMode == GL_COMBINE4_NV ||
u->EnvMode == GL_BLEND ||
@@ -114,7 +114,7 @@ init_dummy_texture(struct gl_context *ctx)
nouveau_surface_alloc(ctx, s, SWIZZLED,
NOUVEAU_BO_MAP | NOUVEAU_BO_VRAM,
- MESA_FORMAT_ARGB8888, 1, 1);
+ MESA_FORMAT_ARGB8888_UNORM, 1, 1);
nouveau_bo_map(s->bo, NOUVEAU_BO_WR, context_client(ctx));
*(uint32_t *)s->bo->map = 0xffffffff;
diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_fb.c b/src/mesa/drivers/dri/nouveau/nv04_state_fb.c
index 6129b6d..afeb70f 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_state_fb.c
+++ b/src/mesa/drivers/dri/nouveau/nv04_state_fb.c
@@ -35,11 +35,11 @@ static inline unsigned
get_rt_format(gl_format format)
{
switch (format) {
- case MESA_FORMAT_XRGB8888:
+ case MESA_FORMAT_XRGB8888_UNORM:
return NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_X8R8G8B8_X8R8G8B8;
- case MESA_FORMAT_ARGB8888:
+ case MESA_FORMAT_ARGB8888_UNORM:
return NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_A8R8G8B8;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_RGB565_UNORM:
return NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_R5G6B5;
default:
assert(0);
diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_frag.c b/src/mesa/drivers/dri/nouveau/nv04_state_frag.c
index 85d8166..4245c16 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_state_frag.c
+++ b/src/mesa/drivers/dri/nouveau/nv04_state_frag.c
@@ -141,13 +141,13 @@ get_input_arg(struct combiner_state *rc, int arg, int flags)
struct gl_texture_object *t = rc->ctx->Texture.Unit[i]._Current;
gl_format format = t->Image[0][t->BaseLevel]->TexFormat;
- if (format == MESA_FORMAT_A8) {
+ if (format == MESA_FORMAT_A8_UNORM) {
/* Emulated using I8. */
if (is_color_operand(operand))
return COMBINER_SOURCE(ZERO) |
get_input_mapping(rc, operand, flags);
- } else if (format == MESA_FORMAT_L8) {
+ } else if (format == MESA_FORMAT_L8_UNORM) {
/* Emulated using I8. */
if (!is_color_operand(operand))
return COMBINER_SOURCE(ZERO) |
@@ -294,6 +294,6 @@ nv04_emit_tex_env(struct gl_context *ctx, int emit)
/* update calculated multitex state */
nv04->alpha[i] = rc_a.hw;
nv04->color[i] = rc_c.hw;
- nv04->factor = pack_rgba_f(MESA_FORMAT_ARGB8888,
+ nv04->factor = pack_rgba_f(MESA_FORMAT_ARGB8888_UNORM,
ctx->Texture.Unit[0].EnvColor);
}
diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_raster.c b/src/mesa/drivers/dri/nouveau/nv04_state_raster.c
index ed21e54..c69900c 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_state_raster.c
+++ b/src/mesa/drivers/dri/nouveau/nv04_state_raster.c
@@ -222,6 +222,6 @@ nv04_emit_blend(struct gl_context *ctx, int emit)
/* Fog. */
if (ctx->Fog.Enabled) {
nv04->blend |= NV04_TEXTURED_TRIANGLE_BLEND_FOG_ENABLE;
- nv04->fog = pack_rgba_f(MESA_FORMAT_ARGB8888, ctx->Fog.Color);
+ nv04->fog = pack_rgba_f(MESA_FORMAT_ARGB8888_UNORM, ctx->Fog.Color);
}
}
diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_tex.c b/src/mesa/drivers/dri/nouveau/nv04_state_tex.c
index e4d695a..8ca9dc0 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_state_tex.c
+++ b/src/mesa/drivers/dri/nouveau/nv04_state_tex.c
@@ -38,19 +38,19 @@ static uint32_t
get_tex_format(struct gl_texture_image *ti)
{
switch (ti->TexFormat) {
- case MESA_FORMAT_A8:
- case MESA_FORMAT_L8:
- case MESA_FORMAT_I8:
+ case MESA_FORMAT_A8_UNORM:
+ case MESA_FORMAT_L8_UNORM:
+ case MESA_FORMAT_I8_UNORM:
return NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_Y8;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_ARGB1555_UNORM:
return NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_A1R5G5B5;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_ARGB4444_UNORM:
return NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_A4R4G4B4;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_RGB565_UNORM:
return NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_R5G6B5;
- case MESA_FORMAT_ARGB8888:
+ case MESA_FORMAT_ARGB8888_UNORM:
return NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_A8R8G8B8;
- case MESA_FORMAT_XRGB8888:
+ case MESA_FORMAT_XRGB8888_UNORM:
return NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_X8R8G8B8;
default:
assert(0);
diff --git a/src/mesa/drivers/dri/nouveau/nv04_surface.c b/src/mesa/drivers/dri/nouveau/nv04_surface.c
index 103453f..25dbf3e 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_surface.c
+++ b/src/mesa/drivers/dri/nouveau/nv04_surface.c
@@ -37,34 +37,34 @@ static inline int
swzsurf_format(gl_format format)
{
switch (format) {
- case MESA_FORMAT_A8:
- case MESA_FORMAT_L8:
- case MESA_FORMAT_I8:
- case MESA_FORMAT_RGB332:
+ case MESA_FORMAT_A8_UNORM:
+ case MESA_FORMAT_L8_UNORM:
+ case MESA_FORMAT_I8_UNORM:
+ case MESA_FORMAT_RGB332_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_AL88:
- case MESA_FORMAT_AL88_REV:
+ case MESA_FORMAT_RGB565_UNORM:
+ case MESA_FORMAT_RGB565_REV_UNORM:
+ case MESA_FORMAT_ARGB4444_UNORM:
+ case MESA_FORMAT_ARGB4444_REV_UNORM:
+ case MESA_FORMAT_ARGB1555_UNORM:
+ case MESA_FORMAT_RGBA5551_UNORM:
+ case MESA_FORMAT_ARGB1555_REV_UNORM:
+ case MESA_FORMAT_AL88_UNORM:
+ case MESA_FORMAT_AL88_REV_UNORM:
case MESA_FORMAT_YCBCR:
case MESA_FORMAT_YCBCR_REV:
- case MESA_FORMAT_Z16:
+ case MESA_FORMAT_Z16_UNORM:
return NV04_SWIZZLED_SURFACE_FORMAT_COLOR_R5G6B5;
- case MESA_FORMAT_RGBA8888:
- case MESA_FORMAT_RGBA8888_REV:
- case MESA_FORMAT_XRGB8888:
- case MESA_FORMAT_ARGB8888:
- case MESA_FORMAT_ARGB8888_REV:
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_Z24_S8:
- case MESA_FORMAT_Z32:
+ case MESA_FORMAT_RGBA8888_UNORM:
+ case MESA_FORMAT_RGBA8888_REV_UNORM:
+ case MESA_FORMAT_XRGB8888_UNORM:
+ case MESA_FORMAT_ARGB8888_UNORM:
+ case MESA_FORMAT_ARGB8888_REV_UNORM:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
+ case MESA_FORMAT_Z32_UNORM:
return NV04_SWIZZLED_SURFACE_FORMAT_COLOR_A8R8G8B8;
default:
@@ -76,34 +76,34 @@ static inline int
surf2d_format(gl_format format)
{
switch (format) {
- case MESA_FORMAT_A8:
- case MESA_FORMAT_L8:
- case MESA_FORMAT_I8:
- case MESA_FORMAT_RGB332:
+ case MESA_FORMAT_A8_UNORM:
+ case MESA_FORMAT_L8_UNORM:
+ case MESA_FORMAT_I8_UNORM:
+ case MESA_FORMAT_RGB332_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_AL88:
- case MESA_FORMAT_AL88_REV:
+ case MESA_FORMAT_RGB565_UNORM:
+ case MESA_FORMAT_RGB565_REV_UNORM:
+ case MESA_FORMAT_ARGB4444_UNORM:
+ case MESA_FORMAT_ARGB4444_REV_UNORM:
+ case MESA_FORMAT_ARGB1555_UNORM:
+ case MESA_FORMAT_RGBA5551_UNORM:
+ case MESA_FORMAT_ARGB1555_REV_UNORM:
+ case MESA_FORMAT_AL88_UNORM:
+ case MESA_FORMAT_AL88_REV_UNORM:
case MESA_FORMAT_YCBCR:
case MESA_FORMAT_YCBCR_REV:
- case MESA_FORMAT_Z16:
+ case MESA_FORMAT_Z16_UNORM:
return NV04_CONTEXT_SURFACES_2D_FORMAT_R5G6B5;
- case MESA_FORMAT_RGBA8888:
- case MESA_FORMAT_RGBA8888_REV:
- case MESA_FORMAT_XRGB8888:
- case MESA_FORMAT_ARGB8888:
- case MESA_FORMAT_ARGB8888_REV:
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_Z24_S8:
- case MESA_FORMAT_Z32:
+ case MESA_FORMAT_RGBA8888_UNORM:
+ case MESA_FORMAT_RGBA8888_REV_UNORM:
+ case MESA_FORMAT_XRGB8888_UNORM:
+ case MESA_FORMAT_ARGB8888_UNORM:
+ case MESA_FORMAT_ARGB8888_REV_UNORM:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
+ case MESA_FORMAT_Z32_UNORM:
return NV04_CONTEXT_SURFACES_2D_FORMAT_Y32;
default:
@@ -115,34 +115,34 @@ static inline int
rect_format(gl_format format)
{
switch (format) {
- case MESA_FORMAT_A8:
- case MESA_FORMAT_L8:
- case MESA_FORMAT_I8:
- case MESA_FORMAT_RGB332:
+ case MESA_FORMAT_A8_UNORM:
+ case MESA_FORMAT_L8_UNORM:
+ case MESA_FORMAT_I8_UNORM:
+ case MESA_FORMAT_RGB332_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_AL88:
- case MESA_FORMAT_AL88_REV:
+ case MESA_FORMAT_RGB565_UNORM:
+ case MESA_FORMAT_RGB565_REV_UNORM:
+ case MESA_FORMAT_ARGB4444_UNORM:
+ case MESA_FORMAT_ARGB4444_REV_UNORM:
+ case MESA_FORMAT_ARGB1555_UNORM:
+ case MESA_FORMAT_RGBA5551_UNORM:
+ case MESA_FORMAT_ARGB1555_REV_UNORM:
+ case MESA_FORMAT_AL88_UNORM:
+ case MESA_FORMAT_AL88_REV_UNORM:
case MESA_FORMAT_YCBCR:
case MESA_FORMAT_YCBCR_REV:
- case MESA_FORMAT_Z16:
+ case MESA_FORMAT_Z16_UNORM:
return NV04_GDI_RECTANGLE_TEXT_COLOR_FORMAT_A16R5G6B5;
- case MESA_FORMAT_RGBA8888:
- case MESA_FORMAT_RGBA8888_REV:
- case MESA_FORMAT_XRGB8888:
- case MESA_FORMAT_ARGB8888:
- case MESA_FORMAT_ARGB8888_REV:
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_Z24_S8:
- case MESA_FORMAT_Z32:
+ case MESA_FORMAT_RGBA8888_UNORM:
+ case MESA_FORMAT_RGBA8888_REV_UNORM:
+ case MESA_FORMAT_XRGB8888_UNORM:
+ case MESA_FORMAT_ARGB8888_UNORM:
+ case MESA_FORMAT_ARGB8888_REV_UNORM:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
+ case MESA_FORMAT_Z32_UNORM:
return NV04_GDI_RECTANGLE_TEXT_COLOR_FORMAT_A8R8G8B8;
default:
@@ -154,34 +154,34 @@ static inline int
sifm_format(gl_format format)
{
switch (format) {
- case MESA_FORMAT_A8:
- case MESA_FORMAT_L8:
- case MESA_FORMAT_I8:
- case MESA_FORMAT_RGB332:
+ case MESA_FORMAT_A8_UNORM:
+ case MESA_FORMAT_L8_UNORM:
+ case MESA_FORMAT_I8_UNORM:
+ case MESA_FORMAT_RGB332_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_AL88:
- case MESA_FORMAT_AL88_REV:
+ case MESA_FORMAT_RGB565_UNORM:
+ case MESA_FORMAT_RGB565_REV_UNORM:
+ case MESA_FORMAT_ARGB4444_UNORM:
+ case MESA_FORMAT_ARGB4444_REV_UNORM:
+ case MESA_FORMAT_ARGB1555_UNORM:
+ case MESA_FORMAT_RGBA5551_UNORM:
+ case MESA_FORMAT_ARGB1555_REV_UNORM:
+ case MESA_FORMAT_AL88_UNORM:
+ case MESA_FORMAT_AL88_REV_UNORM:
case MESA_FORMAT_YCBCR:
case MESA_FORMAT_YCBCR_REV:
- case MESA_FORMAT_Z16:
+ case MESA_FORMAT_Z16_UNORM:
return NV03_SCALED_IMAGE_FROM_MEMORY_COLOR_FORMAT_R5G6B5;
- case MESA_FORMAT_RGBA8888:
- case MESA_FORMAT_RGBA8888_REV:
- case MESA_FORMAT_XRGB8888:
- case MESA_FORMAT_ARGB8888:
- case MESA_FORMAT_ARGB8888_REV:
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_Z24_S8:
- case MESA_FORMAT_Z32:
+ case MESA_FORMAT_RGBA8888_UNORM:
+ case MESA_FORMAT_RGBA8888_REV_UNORM:
+ case MESA_FORMAT_XRGB8888_UNORM:
+ case MESA_FORMAT_ARGB8888_UNORM:
+ case MESA_FORMAT_ARGB8888_REV_UNORM:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
+ case MESA_FORMAT_Z32_UNORM:
return NV03_SCALED_IMAGE_FROM_MEMORY_COLOR_FORMAT_A8R8G8B8;
default:
diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_fb.c b/src/mesa/drivers/dri/nouveau/nv10_state_fb.c
index 87ae1d6..9c2111c 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_state_fb.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_state_fb.c
@@ -36,15 +36,15 @@ static inline unsigned
get_rt_format(gl_format format)
{
switch (format) {
- case MESA_FORMAT_XRGB8888:
+ case MESA_FORMAT_XRGB8888_UNORM:
return NV10_3D_RT_FORMAT_COLOR_X8R8G8B8;
- case MESA_FORMAT_ARGB8888:
+ case MESA_FORMAT_ARGB8888_UNORM:
return NV10_3D_RT_FORMAT_COLOR_A8R8G8B8;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_RGB565_UNORM:
return NV10_3D_RT_FORMAT_COLOR_R5G6B5;
- case MESA_FORMAT_Z16:
+ case MESA_FORMAT_Z16_UNORM:
return NV10_3D_RT_FORMAT_DEPTH_Z16;
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
return NV10_3D_RT_FORMAT_DEPTH_Z24S8;
default:
assert(0);
diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_frag.c b/src/mesa/drivers/dri/nouveau/nv10_state_frag.c
index 467b762..e79ad9b 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_state_frag.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_state_frag.c
@@ -172,20 +172,20 @@ get_input_arg(struct combiner_state *rc, int arg, int flags)
struct gl_texture_object *t = rc->ctx->Texture.Unit[i]._Current;
gl_format format = t->Image[0][t->BaseLevel]->TexFormat;
- if (format == MESA_FORMAT_A8) {
+ if (format == MESA_FORMAT_A8_UNORM) {
/* Emulated using I8. */
if (is_color_operand(operand))
return RC_IN_SOURCE(ZERO) |
get_input_mapping(rc, operand, flags);
- } else if (format == MESA_FORMAT_L8) {
+ } else if (format == MESA_FORMAT_L8_UNORM) {
/* Sometimes emulated using I8. */
if (!is_color_operand(operand))
return RC_IN_SOURCE(ZERO) |
get_input_mapping(rc, operand,
flags ^ INVERT);
- } else if (format == MESA_FORMAT_XRGB8888) {
+ } else if (format == MESA_FORMAT_XRGB8888_UNORM) {
/* Sometimes emulated using ARGB8888. */
if (!is_color_operand(operand))
return RC_IN_SOURCE(ZERO) |
@@ -319,7 +319,7 @@ nv10_get_general_combiner(struct gl_context *ctx, int i,
rc_a.in = rc_a.out = rc_c.in = rc_c.out = 0;
}
- *k = pack_rgba_f(MESA_FORMAT_ARGB8888,
+ *k = pack_rgba_f(MESA_FORMAT_ARGB8888_UNORM,
ctx->Texture.Unit[i].EnvColor);
*a_in = rc_a.in;
*a_out = rc_a.out;
diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_tex.c b/src/mesa/drivers/dri/nouveau/nv10_state_tex.c
index 3b76d66..7213c59 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_state_tex.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_state_tex.c
@@ -90,26 +90,26 @@ static uint32_t
get_tex_format_pot(struct gl_texture_image *ti)
{
switch (ti->TexFormat) {
- case MESA_FORMAT_ARGB8888:
+ case MESA_FORMAT_ARGB8888_UNORM:
return NV10_3D_TEX_FORMAT_FORMAT_A8R8G8B8;
- case MESA_FORMAT_XRGB8888:
+ case MESA_FORMAT_XRGB8888_UNORM:
return NV10_3D_TEX_FORMAT_FORMAT_X8R8G8B8;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_ARGB1555_UNORM:
return NV10_3D_TEX_FORMAT_FORMAT_A1R5G5B5;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_ARGB4444_UNORM:
return NV10_3D_TEX_FORMAT_FORMAT_A4R4G4B4;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_RGB565_UNORM:
return NV10_3D_TEX_FORMAT_FORMAT_R5G6B5;
- case MESA_FORMAT_A8:
- case MESA_FORMAT_I8:
+ case MESA_FORMAT_A8_UNORM:
+ case MESA_FORMAT_I8_UNORM:
return NV10_3D_TEX_FORMAT_FORMAT_I8;
- case MESA_FORMAT_L8:
+ case MESA_FORMAT_L8_UNORM:
return NV10_3D_TEX_FORMAT_FORMAT_L8;
case MESA_FORMAT_RGB_DXT1:
@@ -131,19 +131,19 @@ static uint32_t
get_tex_format_rect(struct gl_texture_image *ti)
{
switch (ti->TexFormat) {
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_ARGB1555_UNORM:
return NV10_3D_TEX_FORMAT_FORMAT_A1R5G5B5_RECT;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_RGB565_UNORM:
return NV10_3D_TEX_FORMAT_FORMAT_R5G6B5_RECT;
- case MESA_FORMAT_ARGB8888:
- case MESA_FORMAT_XRGB8888:
+ case MESA_FORMAT_ARGB8888_UNORM:
+ case MESA_FORMAT_XRGB8888_UNORM:
return NV10_3D_TEX_FORMAT_FORMAT_A8R8G8B8_RECT;
- case MESA_FORMAT_A8:
- case MESA_FORMAT_L8:
- case MESA_FORMAT_I8:
+ case MESA_FORMAT_A8_UNORM:
+ case MESA_FORMAT_L8_UNORM:
+ case MESA_FORMAT_I8_UNORM:
return NV10_3D_TEX_FORMAT_FORMAT_I8_RECT;
default:
diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_tnl.c b/src/mesa/drivers/dri/nouveau/nv10_state_tnl.c
index 06155fe..07596a4 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_state_tnl.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_state_tnl.c
@@ -144,7 +144,7 @@ nv10_emit_fog(struct gl_context *ctx, int emit)
PUSH_DATA (push, get_fog_mode(f->Mode));
PUSH_DATA (push, get_fog_source(source, f->FogDistanceMode));
PUSH_DATAb(push, f->Enabled);
- PUSH_DATA (push, pack_rgba_f(MESA_FORMAT_RGBA8888_REV, f->Color));
+ PUSH_DATA (push, pack_rgba_f(MESA_FORMAT_RGBA8888_REV_UNORM, f->Color));
BEGIN_NV04(push, NV10_3D(FOG_COEFF(0)), 3);
PUSH_DATAp(push, k, 3);
diff --git a/src/mesa/drivers/dri/nouveau/nv20_state_fb.c b/src/mesa/drivers/dri/nouveau/nv20_state_fb.c
index 9d8b1d1..8186d4f 100644
--- a/src/mesa/drivers/dri/nouveau/nv20_state_fb.c
+++ b/src/mesa/drivers/dri/nouveau/nv20_state_fb.c
@@ -36,15 +36,15 @@ static inline unsigned
get_rt_format(gl_format format)
{
switch (format) {
- case MESA_FORMAT_XRGB8888:
+ case MESA_FORMAT_XRGB8888_UNORM:
return NV20_3D_RT_FORMAT_COLOR_X8R8G8B8;
- case MESA_FORMAT_ARGB8888:
+ case MESA_FORMAT_ARGB8888_UNORM:
return NV20_3D_RT_FORMAT_COLOR_A8R8G8B8;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_RGB565_UNORM:
return NV20_3D_RT_FORMAT_COLOR_R5G6B5;
- case MESA_FORMAT_Z16:
+ case MESA_FORMAT_Z16_UNORM:
return NV20_3D_RT_FORMAT_DEPTH_Z16;
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
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_Z24_UNORM_S8_UINT);
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 ffbc2df..2115d50 100644
--- a/src/mesa/drivers/dri/nouveau/nv20_state_tex.c
+++ b/src/mesa/drivers/dri/nouveau/nv20_state_tex.c
@@ -87,26 +87,26 @@ static uint32_t
get_tex_format_pot(struct gl_texture_image *ti)
{
switch (ti->TexFormat) {
- case MESA_FORMAT_ARGB8888:
+ case MESA_FORMAT_ARGB8888_UNORM:
return NV20_3D_TEX_FORMAT_FORMAT_A8R8G8B8;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_ARGB1555_UNORM:
return NV20_3D_TEX_FORMAT_FORMAT_A1R5G5B5;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_ARGB4444_UNORM:
return NV20_3D_TEX_FORMAT_FORMAT_A4R4G4B4;
- case MESA_FORMAT_XRGB8888:
+ case MESA_FORMAT_XRGB8888_UNORM:
return NV20_3D_TEX_FORMAT_FORMAT_X8R8G8B8;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_RGB565_UNORM:
return NV20_3D_TEX_FORMAT_FORMAT_R5G6B5;
- case MESA_FORMAT_A8:
- case MESA_FORMAT_I8:
+ case MESA_FORMAT_A8_UNORM:
+ case MESA_FORMAT_I8_UNORM:
return NV20_3D_TEX_FORMAT_FORMAT_I8;
- case MESA_FORMAT_L8:
+ case MESA_FORMAT_L8_UNORM:
return NV20_3D_TEX_FORMAT_FORMAT_L8;
case MESA_FORMAT_RGB_DXT1:
@@ -128,26 +128,26 @@ static uint32_t
get_tex_format_rect(struct gl_texture_image *ti)
{
switch (ti->TexFormat) {
- case MESA_FORMAT_ARGB8888:
+ case MESA_FORMAT_ARGB8888_UNORM:
return NV20_3D_TEX_FORMAT_FORMAT_A8R8G8B8_RECT;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_ARGB1555_UNORM:
return NV20_3D_TEX_FORMAT_FORMAT_A1R5G5B5_RECT;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_ARGB4444_UNORM:
return NV20_3D_TEX_FORMAT_FORMAT_A4R4G4B4_RECT;
- case MESA_FORMAT_XRGB8888:
+ case MESA_FORMAT_XRGB8888_UNORM:
return NV20_3D_TEX_FORMAT_FORMAT_R8G8B8_RECT;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_RGB565_UNORM:
return NV20_3D_TEX_FORMAT_FORMAT_R5G6B5_RECT;
- case MESA_FORMAT_L8:
+ case MESA_FORMAT_L8_UNORM:
return NV20_3D_TEX_FORMAT_FORMAT_L8_RECT;
- case MESA_FORMAT_A8:
- case MESA_FORMAT_I8:
+ case MESA_FORMAT_A8_UNORM:
+ case MESA_FORMAT_I8_UNORM:
return NV20_3D_TEX_FORMAT_FORMAT_I8_RECT;
default:
diff --git a/src/mesa/drivers/dri/nouveau/nv20_state_tnl.c b/src/mesa/drivers/dri/nouveau/nv20_state_tnl.c
index 1d3d83d..4675e54 100644
--- a/src/mesa/drivers/dri/nouveau/nv20_state_tnl.c
+++ b/src/mesa/drivers/dri/nouveau/nv20_state_tnl.c
@@ -166,7 +166,7 @@ nv20_emit_fog(struct gl_context *ctx, int emit)
get_fog_mode_signed(f->Mode)));
PUSH_DATA (push, get_fog_source(source, f->FogDistanceMode));
PUSH_DATAb(push, f->Enabled);
- PUSH_DATA (push, pack_rgba_f(MESA_FORMAT_RGBA8888_REV, f->Color));
+ PUSH_DATA (push, pack_rgba_f(MESA_FORMAT_RGBA8888_REV_UNORM, f->Color));
BEGIN_NV04(push, NV20_3D(FOG_COEFF(0)), 3);
PUSH_DATAp(push, k, 3);
diff --git a/src/mesa/drivers/dri/r200/r200_blit.c b/src/mesa/drivers/dri/r200/r200_blit.c
index a6a1a3f..2b5277f 100644
--- a/src/mesa/drivers/dri/r200/r200_blit.c
+++ b/src/mesa/drivers/dri/r200/r200_blit.c
@@ -42,17 +42,17 @@ unsigned r200_check_blit(gl_format mesa_format, uint32_t dst_pitch)
{
/* XXX others? BE/LE? */
switch (mesa_format) {
- case MESA_FORMAT_ARGB8888:
- case MESA_FORMAT_XRGB8888:
- case MESA_FORMAT_RGB565:
- case MESA_FORMAT_ARGB4444:
- case MESA_FORMAT_ARGB1555:
- case MESA_FORMAT_A8:
- case MESA_FORMAT_L8:
- case MESA_FORMAT_I8:
+ case MESA_FORMAT_ARGB8888_UNORM:
+ case MESA_FORMAT_XRGB8888_UNORM:
+ case MESA_FORMAT_RGB565_UNORM:
+ case MESA_FORMAT_ARGB4444_UNORM:
+ case MESA_FORMAT_ARGB1555_UNORM:
+ case MESA_FORMAT_A8_UNORM:
+ case MESA_FORMAT_L8_UNORM:
+ case MESA_FORMAT_I8_UNORM:
/* swizzled */
- case MESA_FORMAT_RGBA8888:
- case MESA_FORMAT_RGBA8888_REV:
+ case MESA_FORMAT_RGBA8888_UNORM:
+ case MESA_FORMAT_RGBA8888_REV_UNORM:
break;
default:
return 0;
@@ -114,35 +114,35 @@ static void inline emit_tx_setup(struct r200_context *r200,
/* XXX others? BE/LE? */
switch (src_mesa_format) {
- case MESA_FORMAT_ARGB8888:
+ case MESA_FORMAT_ARGB8888_UNORM:
txformat |= R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP;
break;
- case MESA_FORMAT_RGBA8888:
+ case MESA_FORMAT_RGBA8888_UNORM:
txformat |= R200_TXFORMAT_RGBA8888 | R200_TXFORMAT_ALPHA_IN_MAP;
break;
- case MESA_FORMAT_RGBA8888_REV:
+ case MESA_FORMAT_RGBA8888_REV_UNORM:
txformat |= R200_TXFORMAT_ABGR8888 | R200_TXFORMAT_ALPHA_IN_MAP;
break;
- case MESA_FORMAT_XRGB8888:
+ case MESA_FORMAT_XRGB8888_UNORM:
txformat |= R200_TXFORMAT_ARGB8888;
break;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_RGB565_UNORM:
txformat |= R200_TXFORMAT_RGB565;
break;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_ARGB4444_UNORM:
txformat |= R200_TXFORMAT_ARGB4444 | R200_TXFORMAT_ALPHA_IN_MAP;
break;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_ARGB1555_UNORM:
txformat |= R200_TXFORMAT_ARGB1555 | R200_TXFORMAT_ALPHA_IN_MAP;
break;
- case MESA_FORMAT_A8:
- case MESA_FORMAT_I8:
+ case MESA_FORMAT_A8_UNORM:
+ case MESA_FORMAT_I8_UNORM:
txformat |= R200_TXFORMAT_I8 | R200_TXFORMAT_ALPHA_IN_MAP;
break;
- case MESA_FORMAT_L8:
+ case MESA_FORMAT_L8_UNORM:
txformat |= R200_TXFORMAT_I8;
break;
- case MESA_FORMAT_AL88:
+ case MESA_FORMAT_AL88_UNORM:
txformat |= R200_TXFORMAT_AI88 | R200_TXFORMAT_ALPHA_IN_MAP;
break;
default:
@@ -155,14 +155,14 @@ static void inline emit_tx_setup(struct r200_context *r200,
offset |= R200_TXO_MICRO_TILE;
switch (dst_mesa_format) {
- case MESA_FORMAT_ARGB8888:
- case MESA_FORMAT_XRGB8888:
- case MESA_FORMAT_RGB565:
- case MESA_FORMAT_ARGB4444:
- case MESA_FORMAT_ARGB1555:
- case MESA_FORMAT_A8:
- case MESA_FORMAT_L8:
- case MESA_FORMAT_I8:
+ case MESA_FORMAT_ARGB8888_UNORM:
+ case MESA_FORMAT_XRGB8888_UNORM:
+ case MESA_FORMAT_RGB565_UNORM:
+ case MESA_FORMAT_ARGB4444_UNORM:
+ case MESA_FORMAT_ARGB1555_UNORM:
+ case MESA_FORMAT_A8_UNORM:
+ case MESA_FORMAT_L8_UNORM:
+ case MESA_FORMAT_I8_UNORM:
default:
/* no swizzle required */
BEGIN_BATCH(10);
@@ -182,7 +182,7 @@ static void inline emit_tx_setup(struct r200_context *r200,
R200_TXA_OUTPUT_REG_R0));
END_BATCH();
break;
- case MESA_FORMAT_RGBA8888:
+ case MESA_FORMAT_RGBA8888_UNORM:
BEGIN_BATCH(10);
OUT_BATCH_REGVAL(RADEON_PP_CNTL, (RADEON_TEX_0_ENABLE |
RADEON_TEX_BLEND_0_ENABLE));
@@ -202,7 +202,7 @@ static void inline emit_tx_setup(struct r200_context *r200,
R200_TXA_OUTPUT_REG_R0));
END_BATCH();
break;
- case MESA_FORMAT_RGBA8888_REV:
+ case MESA_FORMAT_RGBA8888_REV_UNORM:
BEGIN_BATCH(34);
OUT_BATCH_REGVAL(RADEON_PP_CNTL, (RADEON_TEX_0_ENABLE |
RADEON_TEX_BLEND_0_ENABLE |
@@ -308,24 +308,24 @@ static inline void emit_cb_setup(struct r200_context *r200,
/* XXX others? BE/LE? */
switch (mesa_format) {
- case MESA_FORMAT_ARGB8888:
- case MESA_FORMAT_XRGB8888:
- case MESA_FORMAT_RGBA8888:
- case MESA_FORMAT_RGBA8888_REV:
+ case MESA_FORMAT_ARGB8888_UNORM:
+ case MESA_FORMAT_XRGB8888_UNORM:
+ case MESA_FORMAT_RGBA8888_UNORM:
+ case MESA_FORMAT_RGBA8888_REV_UNORM:
dst_format = RADEON_COLOR_FORMAT_ARGB8888;
break;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_RGB565_UNORM:
dst_format = RADEON_COLOR_FORMAT_RGB565;
break;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_ARGB4444_UNORM:
dst_format = RADEON_COLOR_FORMAT_ARGB4444;
break;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_ARGB1555_UNORM:
dst_format = RADEON_COLOR_FORMAT_ARGB1555;
break;
- case MESA_FORMAT_A8:
- case MESA_FORMAT_L8:
- case MESA_FORMAT_I8:
+ case MESA_FORMAT_A8_UNORM:
+ case MESA_FORMAT_L8_UNORM:
+ case MESA_FORMAT_I8_UNORM:
dst_format = RADEON_COLOR_FORMAT_RGB8;
break;
default:
diff --git a/src/mesa/drivers/dri/r200/r200_state_init.c b/src/mesa/drivers/dri/r200/r200_state_init.c
index b048a83..82283d9 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_RGB565_UNORM:
atom->cmd[CTX_RB3D_CNTL] |= RADEON_COLOR_FORMAT_RGB565;
break;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_ARGB4444_UNORM:
atom->cmd[CTX_RB3D_CNTL] |= RADEON_COLOR_FORMAT_ARGB4444;
break;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_ARGB1555_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 b20bd51..c0a90bb 100644
--- a/src/mesa/drivers/dri/r200/r200_texstate.c
+++ b/src/mesa/drivers/dri/r200/r200_texstate.c
@@ -81,7 +81,7 @@ struct tx_table {
static const struct tx_table tx_table_be[] =
{
- [ MESA_FORMAT_RGBA8888 ] = { R200_TXFORMAT_ABGR8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
+ [ MESA_FORMAT_RGBA8888_UNORM ] = { R200_TXFORMAT_ABGR8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
_ALPHA_REV(RGBA8888),
_ALPHA(ARGB8888),
_ALPHA_REV(ARGB8888),
@@ -110,7 +110,7 @@ static const struct tx_table tx_table_be[] =
static const struct tx_table tx_table_le[] =
{
_ALPHA(RGBA8888),
- [ MESA_FORMAT_RGBA8888_REV ] = { R200_TXFORMAT_ABGR8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
+ [ MESA_FORMAT_RGBA8888_REV_UNORM ] = { R200_TXFORMAT_ABGR8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
_ALPHA(ARGB8888),
_ALPHA_REV(ARGB8888),
[ MESA_FORMAT_RGB888 ] = { R200_TXFORMAT_ARGB8888, 0 },
@@ -788,10 +788,10 @@ void r200SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint texture_format
t->pp_txformat = tx_table_le[MESA_FORMAT_RGB888].format;
}
else {
- texFormat = MESA_FORMAT_ARGB8888;
- t->pp_txformat = tx_table_le[MESA_FORMAT_ARGB8888].format;
+ texFormat = MESA_FORMAT_ARGB8888_UNORM;
+ t->pp_txformat = tx_table_le[MESA_FORMAT_ARGB8888_UNORM].format;
}
- t->pp_txfilter |= tx_table_le[MESA_FORMAT_ARGB8888].filter;
+ t->pp_txfilter |= tx_table_le[MESA_FORMAT_ARGB8888_UNORM].filter;
break;
case 3:
default:
@@ -800,9 +800,9 @@ void r200SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint texture_format
t->pp_txfilter |= tx_table_le[MESA_FORMAT_RGB888].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_RGB565_UNORM;
+ t->pp_txformat = tx_table_le[MESA_FORMAT_RGB565_UNORM].format;
+ t->pp_txfilter |= tx_table_le[MESA_FORMAT_RGB565_UNORM].filter;
break;
}
diff --git a/src/mesa/drivers/dri/radeon/radeon_blit.c b/src/mesa/drivers/dri/radeon/radeon_blit.c
index 2d4a2d6..5e832a5 100644
--- a/src/mesa/drivers/dri/radeon/radeon_blit.c
+++ b/src/mesa/drivers/dri/radeon/radeon_blit.c
@@ -42,14 +42,14 @@ unsigned r100_check_blit(gl_format mesa_format, uint32_t dst_pitch)
{
/* XXX others? BE/LE? */
switch (mesa_format) {
- case MESA_FORMAT_ARGB8888:
- case MESA_FORMAT_XRGB8888:
- case MESA_FORMAT_RGB565:
- case MESA_FORMAT_ARGB4444:
- case MESA_FORMAT_ARGB1555:
- case MESA_FORMAT_A8:
- case MESA_FORMAT_L8:
- case MESA_FORMAT_I8:
+ case MESA_FORMAT_ARGB8888_UNORM:
+ case MESA_FORMAT_XRGB8888_UNORM:
+ case MESA_FORMAT_RGB565_UNORM:
+ case MESA_FORMAT_ARGB4444_UNORM:
+ case MESA_FORMAT_ARGB1555_UNORM:
+ case MESA_FORMAT_A8_UNORM:
+ case MESA_FORMAT_L8_UNORM:
+ case MESA_FORMAT_I8_UNORM:
break;
default:
return 0;
@@ -108,32 +108,32 @@ static void inline emit_tx_setup(struct r100_context *r100,
/* XXX others? BE/LE? */
switch (mesa_format) {
- case MESA_FORMAT_ARGB8888:
+ case MESA_FORMAT_ARGB8888_UNORM:
txformat |= RADEON_TXFORMAT_ARGB8888 | RADEON_TXFORMAT_ALPHA_IN_MAP;
break;
- case MESA_FORMAT_RGBA8888:
+ case MESA_FORMAT_RGBA8888_UNORM:
txformat |= RADEON_TXFORMAT_RGBA8888 | RADEON_TXFORMAT_ALPHA_IN_MAP;
break;
- case MESA_FORMAT_XRGB8888:
+ case MESA_FORMAT_XRGB8888_UNORM:
txformat |= RADEON_TXFORMAT_ARGB8888;
break;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_RGB565_UNORM:
txformat |= RADEON_TXFORMAT_RGB565;
break;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_ARGB4444_UNORM:
txformat |= RADEON_TXFORMAT_ARGB4444 | RADEON_TXFORMAT_ALPHA_IN_MAP;
break;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_ARGB1555_UNORM:
txformat |= RADEON_TXFORMAT_ARGB1555 | RADEON_TXFORMAT_ALPHA_IN_MAP;
break;
- case MESA_FORMAT_A8:
- case MESA_FORMAT_I8:
+ case MESA_FORMAT_A8_UNORM:
+ case MESA_FORMAT_I8_UNORM:
txformat |= RADEON_TXFORMAT_I8 | RADEON_TXFORMAT_ALPHA_IN_MAP;
break;
- case MESA_FORMAT_L8:
+ case MESA_FORMAT_L8_UNORM:
txformat |= RADEON_TXFORMAT_I8;
break;
- case MESA_FORMAT_AL88:
+ case MESA_FORMAT_AL88_UNORM:
txformat |= RADEON_TXFORMAT_AI88 | RADEON_TXFORMAT_ALPHA_IN_MAP;
break;
default:
@@ -186,22 +186,22 @@ static inline void emit_cb_setup(struct r100_context *r100,
/* XXX others? BE/LE? */
switch (mesa_format) {
- case MESA_FORMAT_ARGB8888:
- case MESA_FORMAT_XRGB8888:
+ case MESA_FORMAT_ARGB8888_UNORM:
+ case MESA_FORMAT_XRGB8888_UNORM:
dst_format = RADEON_COLOR_FORMAT_ARGB8888;
break;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_RGB565_UNORM:
dst_format = RADEON_COLOR_FORMAT_RGB565;
break;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_ARGB4444_UNORM:
dst_format = RADEON_COLOR_FORMAT_ARGB4444;
break;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_ARGB1555_UNORM:
dst_format = RADEON_COLOR_FORMAT_ARGB1555;
break;
- case MESA_FORMAT_A8:
- case MESA_FORMAT_L8:
- case MESA_FORMAT_I8:
+ case MESA_FORMAT_A8_UNORM:
+ case MESA_FORMAT_L8_UNORM:
+ case MESA_FORMAT_I8_UNORM:
dst_format = RADEON_COLOR_FORMAT_RGB8;
break;
default:
diff --git a/src/mesa/drivers/dri/radeon/radeon_fbo.c b/src/mesa/drivers/dri/radeon/radeon_fbo.c
index 1e6cd1b..255e78c 100644
--- a/src/mesa/drivers/dri/radeon/radeon_fbo.c
+++ b/src/mesa/drivers/dri/radeon/radeon_fbo.c
@@ -310,12 +310,12 @@ 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_S8_UINT_Z24_UNORM || rb->Format == MESA_FORMAT_X8_Z24_UNORM) {
radeon_map_renderbuffer_s8z24(ctx, rb, x, y, w, h,
mode, out_map, out_stride);
return;
}
- if (rb->Format == MESA_FORMAT_Z16) {
+ if (rb->Format == MESA_FORMAT_Z16_UNORM) {
radeon_map_renderbuffer_z16(ctx, rb, x, y, w, h,
mode, out_map, out_stride);
return;
@@ -419,11 +419,11 @@ 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_S8_UINT_Z24_UNORM || rb->Format == MESA_FORMAT_X8_Z24_UNORM) {
radeon_unmap_renderbuffer_s8z24(ctx, rb);
return;
}
- if (rb->Format == MESA_FORMAT_Z16) {
+ if (rb->Format == MESA_FORMAT_Z16_UNORM) {
radeon_unmap_renderbuffer_z16(ctx, rb);
return;
}
@@ -507,22 +507,22 @@ 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_S8_UINT_Z24_UNORM;
cpp = 4;
break;
case GL_DEPTH_COMPONENT16:
- rb->Format = MESA_FORMAT_Z16;
+ rb->Format = MESA_FORMAT_Z16_UNORM;
cpp = 2;
break;
case GL_DEPTH_COMPONENT:
case GL_DEPTH_COMPONENT24:
case GL_DEPTH_COMPONENT32:
- rb->Format = MESA_FORMAT_X8_Z24;
+ rb->Format = MESA_FORMAT_X8_Z24_UNORM;
cpp = 4;
break;
case GL_DEPTH_STENCIL_EXT:
case GL_DEPTH24_STENCIL8_EXT:
- rb->Format = MESA_FORMAT_S8_Z24;
+ rb->Format = MESA_FORMAT_S8_UINT_Z24_UNORM;
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 0aa00bd..d22845c 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 gl_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_RGB565_UNORM;
case GL_UNSIGNED_SHORT_5_6_5_REV:
- return MESA_FORMAT_RGB565_REV;
+ return MESA_FORMAT_RGB565_REV_UNORM;
}
break;
case GL_RGBA:
@@ -55,29 +55,29 @@ static gl_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_RGBA5551_UNORM;
case GL_UNSIGNED_INT_8_8_8_8:
- return MESA_FORMAT_RGBA8888;
+ return MESA_FORMAT_RGBA8888_UNORM;
case GL_UNSIGNED_BYTE:
case GL_UNSIGNED_INT_8_8_8_8_REV:
- return MESA_FORMAT_RGBA8888_REV;
+ return MESA_FORMAT_RGBA8888_REV_UNORM;
}
break;
case GL_BGRA:
switch (type) {
case GL_UNSIGNED_SHORT_4_4_4_4:
- return MESA_FORMAT_ARGB4444_REV;
+ return MESA_FORMAT_ARGB4444_REV_UNORM;
case GL_UNSIGNED_SHORT_4_4_4_4_REV:
- return MESA_FORMAT_ARGB4444;
+ return MESA_FORMAT_ARGB4444_UNORM;
case GL_UNSIGNED_SHORT_5_5_5_1:
- return MESA_FORMAT_ARGB1555_REV;
+ return MESA_FORMAT_ARGB1555_REV_UNORM;
case GL_UNSIGNED_SHORT_1_5_5_5_REV:
- return MESA_FORMAT_ARGB1555;
+ return MESA_FORMAT_ARGB1555_UNORM;
case GL_UNSIGNED_INT_8_8_8_8:
- return MESA_FORMAT_ARGB8888_REV;
+ return MESA_FORMAT_ARGB8888_REV_UNORM;
case GL_UNSIGNED_BYTE:
case GL_UNSIGNED_INT_8_8_8_8_REV:
- return MESA_FORMAT_ARGB8888;
+ return MESA_FORMAT_ARGB8888_UNORM;
}
break;
diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c
index 15bf5f8..98100ac 100644
--- a/src/mesa/drivers/dri/radeon/radeon_screen.c
+++ b/src/mesa/drivers/dri/radeon/radeon_screen.c
@@ -214,17 +214,17 @@ radeon_create_image_from_name(__DRIscreen *screen,
switch (format) {
case __DRI_IMAGE_FORMAT_RGB565:
- image->format = MESA_FORMAT_RGB565;
+ image->format = MESA_FORMAT_RGB565_UNORM;
image->internal_format = GL_RGB;
image->data_type = GL_UNSIGNED_BYTE;
break;
case __DRI_IMAGE_FORMAT_XRGB8888:
- image->format = MESA_FORMAT_XRGB8888;
+ image->format = MESA_FORMAT_XRGB8888_UNORM;
image->internal_format = GL_RGB;
image->data_type = GL_UNSIGNED_BYTE;
break;
case __DRI_IMAGE_FORMAT_ARGB8888:
- image->format = MESA_FORMAT_ARGB8888;
+ image->format = MESA_FORMAT_ARGB8888_UNORM;
image->internal_format = GL_RGBA;
image->data_type = GL_UNSIGNED_BYTE;
break;
@@ -314,17 +314,17 @@ radeon_create_image(__DRIscreen *screen,
switch (format) {
case __DRI_IMAGE_FORMAT_RGB565:
- image->format = MESA_FORMAT_RGB565;
+ image->format = MESA_FORMAT_RGB565_UNORM;
image->internal_format = GL_RGB;
image->data_type = GL_UNSIGNED_BYTE;
break;
case __DRI_IMAGE_FORMAT_XRGB8888:
- image->format = MESA_FORMAT_XRGB8888;
+ image->format = MESA_FORMAT_XRGB8888_UNORM;
image->internal_format = GL_RGB;
image->data_type = GL_UNSIGNED_BYTE;
break;
case __DRI_IMAGE_FORMAT_ARGB8888:
- image->format = MESA_FORMAT_ARGB8888;
+ image->format = MESA_FORMAT_ARGB8888_UNORM;
image->internal_format = GL_RGBA;
image->data_type = GL_UNSIGNED_BYTE;
break;
@@ -611,11 +611,11 @@ 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_RGB565_UNORM : MESA_FORMAT_RGB565_REV_UNORM;
else if (mesaVis->alphaBits == 0)
- rgbFormat = _mesa_little_endian() ? MESA_FORMAT_XRGB8888 : MESA_FORMAT_XRGB8888_REV;
+ rgbFormat = _mesa_little_endian() ? MESA_FORMAT_XRGB8888_UNORM : MESA_FORMAT_XRGB8888_REV_UNORM;
else
- rgbFormat = _mesa_little_endian() ? MESA_FORMAT_ARGB8888 : MESA_FORMAT_ARGB8888_REV;
+ rgbFormat = _mesa_little_endian() ? MESA_FORMAT_ARGB8888_UNORM : MESA_FORMAT_ARGB8888_REV_UNORM;
/* front color renderbuffer */
rfb->color_rb[0] = radeon_create_renderbuffer(rgbFormat, driDrawPriv);
@@ -632,21 +632,21 @@ 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_S8_UINT_Z24_UNORM, 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_X8_Z24_UNORM, driDrawPriv);
_mesa_add_renderbuffer(&rfb->base, BUFFER_DEPTH, &depth->base.Base);
depth->has_surface = screen->depthHasSurface;
}
} else if (mesaVis->depthBits == 16) {
/* just 16-bit depth buffer, no hw stencil */
struct radeon_renderbuffer *depth =
- radeon_create_renderbuffer(MESA_FORMAT_Z16, driDrawPriv);
+ radeon_create_renderbuffer(MESA_FORMAT_Z16_UNORM, driDrawPriv);
_mesa_add_renderbuffer(&rfb->base, BUFFER_DEPTH, &depth->base.Base);
depth->has_surface = screen->depthHasSurface;
}
@@ -709,9 +709,9 @@ static const
__DRIconfig **radeonInitScreen2(__DRIscreen *psp)
{
static const gl_format formats[3] = {
- MESA_FORMAT_RGB565,
- MESA_FORMAT_XRGB8888,
- MESA_FORMAT_ARGB8888
+ MESA_FORMAT_RGB565_UNORM,
+ MESA_FORMAT_XRGB8888_UNORM,
+ MESA_FORMAT_ARGB8888_UNORM
};
/* GLX_SWAP_COPY_OML is only supported because the Intel driver doesn't
* support pageflipping at all.
diff --git a/src/mesa/drivers/dri/radeon/radeon_state_init.c b/src/mesa/drivers/dri/radeon/radeon_state_init.c
index 8c88dd0..31e031c 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_RGB565_UNORM:
atom->cmd[CTX_RB3D_CNTL] |= RADEON_COLOR_FORMAT_RGB565;
break;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_ARGB4444_UNORM:
atom->cmd[CTX_RB3D_CNTL] |= RADEON_COLOR_FORMAT_ARGB4444;
break;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_ARGB1555_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 675eb78..96f654f 100644
--- a/src/mesa/drivers/dri/radeon/radeon_tex_copy.c
+++ b/src/mesa/drivers/dri/radeon/radeon_tex_copy.c
@@ -108,16 +108,16 @@ 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_RGB565_UNORM;
+ dst_mesaformat = MESA_FORMAT_RGB565_UNORM;
break;
case 4:
- src_mesaformat = MESA_FORMAT_ARGB8888;
- dst_mesaformat = MESA_FORMAT_ARGB8888;
+ src_mesaformat = MESA_FORMAT_ARGB8888_UNORM;
+ dst_mesaformat = MESA_FORMAT_ARGB8888_UNORM;
break;
case 1:
- src_mesaformat = MESA_FORMAT_A8;
- dst_mesaformat = MESA_FORMAT_A8;
+ src_mesaformat = MESA_FORMAT_A8_UNORM;
+ dst_mesaformat = MESA_FORMAT_A8_UNORM;
break;
default:
return GL_FALSE;
diff --git a/src/mesa/drivers/dri/radeon/radeon_texstate.c b/src/mesa/drivers/dri/radeon/radeon_texstate.c
index 944bac6..03a8144 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texstate.c
+++ b/src/mesa/drivers/dri/radeon/radeon_texstate.c
@@ -663,10 +663,10 @@ void radeonSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint texture_form
texFormat = MESA_FORMAT_RGB888;
}
else {
- t->pp_txformat = tx_table[MESA_FORMAT_ARGB8888].format;
- texFormat = MESA_FORMAT_ARGB8888;
+ t->pp_txformat = tx_table[MESA_FORMAT_ARGB8888_UNORM].format;
+ texFormat = MESA_FORMAT_ARGB8888_UNORM;
}
- t->pp_txfilter |= tx_table[MESA_FORMAT_ARGB8888].filter;
+ t->pp_txfilter |= tx_table[MESA_FORMAT_ARGB8888_UNORM].filter;
break;
case 3:
default:
@@ -675,9 +675,9 @@ void radeonSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint texture_form
t->pp_txfilter |= tx_table[MESA_FORMAT_RGB888].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_RGB565_UNORM;
+ t->pp_txformat = tx_table[MESA_FORMAT_RGB565_UNORM].format;
+ t->pp_txfilter |= tx_table[MESA_FORMAT_RGB565_UNORM].filter;
break;
}
diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c
index 52cf95d..79d3b10 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texture.c
+++ b/src/mesa/drivers/dri/radeon/radeon_texture.c
@@ -231,12 +231,12 @@ static gl_format radeonChoose8888TexFormat(radeonContextPtr rmesa,
(srcFormat == GL_RGBA && srcType == GL_UNSIGNED_BYTE && !littleEndian) ||
(srcFormat == GL_ABGR_EXT && srcType == GL_UNSIGNED_INT_8_8_8_8_REV) ||
(srcFormat == GL_ABGR_EXT && srcType == GL_UNSIGNED_BYTE && littleEndian)) {
- return MESA_FORMAT_RGBA8888;
+ return MESA_FORMAT_RGBA8888_UNORM;
} else if ((srcFormat == GL_RGBA && srcType == GL_UNSIGNED_INT_8_8_8_8_REV) ||
(srcFormat == GL_RGBA && srcType == GL_UNSIGNED_BYTE && littleEndian) ||
(srcFormat == GL_ABGR_EXT && srcType == GL_UNSIGNED_INT_8_8_8_8) ||
(srcFormat == GL_ABGR_EXT && srcType == GL_UNSIGNED_BYTE && !littleEndian)) {
- return MESA_FORMAT_RGBA8888_REV;
+ return MESA_FORMAT_RGBA8888_REV_UNORM;
} else
return _radeon_texformat_argb8888;
#endif
@@ -349,7 +349,7 @@ gl_format radeonChooseTextureFormat(struct gl_context * ctx,
in wrong rgb values (same as alpha value instead of 0). */
return _radeon_texformat_al88;
#else
- return MESA_FORMAT_A8;
+ return MESA_FORMAT_A8_UNORM;
#endif
case 1:
case GL_LUMINANCE:
@@ -358,7 +358,7 @@ gl_format radeonChooseTextureFormat(struct gl_context * ctx,
case GL_LUMINANCE12:
case GL_LUMINANCE16:
case GL_COMPRESSED_LUMINANCE:
- return MESA_FORMAT_L8;
+ return MESA_FORMAT_L8_UNORM;
case 2:
case GL_LUMINANCE_ALPHA:
@@ -377,7 +377,7 @@ gl_format radeonChooseTextureFormat(struct gl_context * ctx,
case GL_INTENSITY12:
case GL_INTENSITY16:
case GL_COMPRESSED_INTENSITY:
- return MESA_FORMAT_I8;
+ return MESA_FORMAT_I8_UNORM;
case GL_YCBCR_MESA:
if (type == GL_UNSIGNED_SHORT_8_8_APPLE ||
@@ -433,7 +433,7 @@ gl_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_S8_UINT_Z24_UNORM;
/* EXT_texture_sRGB */
case GL_SRGB:
@@ -512,8 +512,8 @@ unsigned radeonIsFormatRenderable(gl_format mesa_format)
switch (mesa_format)
{
- case MESA_FORMAT_Z16:
- case MESA_FORMAT_S8_Z24:
+ case MESA_FORMAT_Z16_UNORM:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
return 1;
default:
return 0;
@@ -592,20 +592,20 @@ static void
radeonInitTextureFormats(void)
{
if (_mesa_little_endian()) {
- _radeon_texformat_rgba8888 = MESA_FORMAT_RGBA8888;
- _radeon_texformat_argb8888 = MESA_FORMAT_ARGB8888;
- _radeon_texformat_rgb565 = MESA_FORMAT_RGB565;
- _radeon_texformat_argb4444 = MESA_FORMAT_ARGB4444;
- _radeon_texformat_argb1555 = MESA_FORMAT_ARGB1555;
- _radeon_texformat_al88 = MESA_FORMAT_AL88;
+ _radeon_texformat_rgba8888 = MESA_FORMAT_RGBA8888_UNORM;
+ _radeon_texformat_argb8888 = MESA_FORMAT_ARGB8888_UNORM;
+ _radeon_texformat_rgb565 = MESA_FORMAT_RGB565_UNORM;
+ _radeon_texformat_argb4444 = MESA_FORMAT_ARGB4444_UNORM;
+ _radeon_texformat_argb1555 = MESA_FORMAT_ARGB1555_UNORM;
+ _radeon_texformat_al88 = MESA_FORMAT_AL88_UNORM;
}
else {
- _radeon_texformat_rgba8888 = MESA_FORMAT_RGBA8888_REV;
- _radeon_texformat_argb8888 = MESA_FORMAT_ARGB8888_REV;
- _radeon_texformat_rgb565 = MESA_FORMAT_RGB565_REV;
- _radeon_texformat_argb4444 = MESA_FORMAT_ARGB4444_REV;
- _radeon_texformat_argb1555 = MESA_FORMAT_ARGB1555_REV;
- _radeon_texformat_al88 = MESA_FORMAT_AL88_REV;
+ _radeon_texformat_rgba8888 = MESA_FORMAT_RGBA8888_REV_UNORM;
+ _radeon_texformat_argb8888 = MESA_FORMAT_ARGB8888_REV_UNORM;
+ _radeon_texformat_rgb565 = MESA_FORMAT_RGB565_REV_UNORM;
+ _radeon_texformat_argb4444 = MESA_FORMAT_ARGB4444_REV_UNORM;
+ _radeon_texformat_argb1555 = MESA_FORMAT_ARGB1555_REV_UNORM;
+ _radeon_texformat_al88 = MESA_FORMAT_AL88_REV_UNORM;
}
}
diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c
index 79a2740..80973e1 100644
--- a/src/mesa/drivers/dri/swrast/swrast.c
+++ b/src/mesa/drivers/dri/swrast/swrast.c
@@ -92,9 +92,9 @@ static void swrastSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
sPriv->swrast_loader->getDrawableInfo(dPriv, &x, &y, &w, &h, dPriv->loaderPrivate);
if (texture_format == __DRI_TEXTURE_FORMAT_RGB)
- texFormat = MESA_FORMAT_XRGB8888;
+ texFormat = MESA_FORMAT_XRGB8888_UNORM;
else
- texFormat = MESA_FORMAT_ARGB8888;
+ texFormat = MESA_FORMAT_ARGB8888_UNORM;
_mesa_init_teximage_fields(&dri_ctx->Base, texImage,
w, h, 1, 0, internalFormat, texFormat);
@@ -166,13 +166,13 @@ swrastFillInModes(__DRIscreen *psp,
switch (pixel_bits) {
case 16:
- format = MESA_FORMAT_RGB565;
+ format = MESA_FORMAT_RGB565_UNORM;
break;
case 24:
- format = MESA_FORMAT_XRGB8888;
+ format = MESA_FORMAT_XRGB8888_UNORM;
break;
case 32:
- format = MESA_FORMAT_ARGB8888;
+ format = MESA_FORMAT_ARGB8888_UNORM;
break;
default:
fprintf(stderr, "[%s:%u] bad depth %d\n", __func__, __LINE__,
@@ -345,25 +345,25 @@ swrast_new_renderbuffer(const struct gl_config *visual, __DRIdrawable *dPriv,
switch (pixel_format) {
case PF_A8R8G8B8:
- rb->Format = MESA_FORMAT_ARGB8888;
+ rb->Format = MESA_FORMAT_ARGB8888_UNORM;
rb->InternalFormat = GL_RGBA;
rb->_BaseFormat = GL_RGBA;
xrb->bpp = 32;
break;
case PF_X8R8G8B8:
- rb->Format = MESA_FORMAT_ARGB8888; /* XXX */
+ rb->Format = MESA_FORMAT_ARGB8888_UNORM; /* XXX */
rb->InternalFormat = GL_RGB;
rb->_BaseFormat = GL_RGB;
xrb->bpp = 32;
break;
case PF_R5G6B5:
- rb->Format = MESA_FORMAT_RGB565;
+ rb->Format = MESA_FORMAT_RGB565_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_RGB332_UNORM;
rb->InternalFormat = GL_RGB;
rb->_BaseFormat = GL_RGB;
xrb->bpp = 8;
@@ -638,7 +638,7 @@ static gl_format swrastChooseTextureFormat(struct gl_context * ctx,
GLenum type)
{
if (internalFormat == GL_RGB)
- return MESA_FORMAT_XRGB8888;
+ return MESA_FORMAT_XRGB8888_UNORM;
return _mesa_choose_tex_format(ctx, target, internalFormat, format, type);
}
diff --git a/src/mesa/drivers/haiku/swrast/SoftwareRast.cpp b/src/mesa/drivers/haiku/swrast/SoftwareRast.cpp
index df697e4..baac959 100644
--- a/src/mesa/drivers/haiku/swrast/SoftwareRast.cpp
+++ b/src/mesa/drivers/haiku/swrast/SoftwareRast.cpp
@@ -593,11 +593,11 @@ MesaSoftwareRast::_SetupRenderBuffer(struct gl_renderbuffer* rb,
switch (colorSpace) {
case B_RGBA32:
rb->_BaseFormat = GL_RGBA;
- rb->Format = MESA_FORMAT_ARGB8888;
+ rb->Format = MESA_FORMAT_ARGB8888_UNORM;
break;
case B_RGB32:
rb->_BaseFormat = GL_RGB;
- rb->Format = MESA_FORMAT_XRGB8888;
+ rb->Format = MESA_FORMAT_XRGB8888_UNORM;
break;
case B_RGB24:
rb->_BaseFormat = GL_RGB;
@@ -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_RGB565_UNORM;
break;
case B_RGB15:
rb->_BaseFormat = GL_RGB;
- rb->Format = MESA_FORMAT_ARGB1555;
+ rb->Format = MESA_FORMAT_ARGB1555_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 e168fec..d95b40d 100644
--- a/src/mesa/drivers/osmesa/osmesa.c
+++ b/src/mesa/drivers/osmesa/osmesa.c
@@ -449,12 +449,12 @@ osmesa_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
if (osmesa->format == OSMESA_RGBA) {
if (osmesa->DataType == GL_UNSIGNED_BYTE) {
if (_mesa_little_endian())
- rb->Format = MESA_FORMAT_RGBA8888_REV;
+ rb->Format = MESA_FORMAT_RGBA8888_REV_UNORM;
else
- rb->Format = MESA_FORMAT_RGBA8888;
+ rb->Format = MESA_FORMAT_RGBA8888_UNORM;
}
else if (osmesa->DataType == GL_UNSIGNED_SHORT) {
- rb->Format = MESA_FORMAT_RGBA_16;
+ rb->Format = MESA_FORMAT_RGBA_16_UNORM;
}
else {
rb->Format = MESA_FORMAT_RGBA_FLOAT32;
@@ -463,13 +463,13 @@ osmesa_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
else if (osmesa->format == OSMESA_BGRA) {
if (osmesa->DataType == GL_UNSIGNED_BYTE) {
if (_mesa_little_endian())
- rb->Format = MESA_FORMAT_ARGB8888;
+ rb->Format = MESA_FORMAT_ARGB8888_UNORM;
else
- rb->Format = MESA_FORMAT_ARGB8888_REV;
+ rb->Format = MESA_FORMAT_ARGB8888_REV_UNORM;
}
else if (osmesa->DataType == GL_UNSIGNED_SHORT) {
_mesa_warning(ctx, "Unsupported OSMesa format BGRA/GLushort");
- rb->Format = MESA_FORMAT_RGBA_16; /* not exactly right */
+ rb->Format = MESA_FORMAT_RGBA_16_UNORM; /* not exactly right */
}
else {
_mesa_warning(ctx, "Unsupported OSMesa format BGRA/GLfloat");
@@ -479,13 +479,13 @@ osmesa_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
else if (osmesa->format == OSMESA_ARGB) {
if (osmesa->DataType == GL_UNSIGNED_BYTE) {
if (_mesa_little_endian())
- rb->Format = MESA_FORMAT_ARGB8888_REV;
+ rb->Format = MESA_FORMAT_ARGB8888_REV_UNORM;
else
- rb->Format = MESA_FORMAT_ARGB8888;
+ rb->Format = MESA_FORMAT_ARGB8888_UNORM;
}
else if (osmesa->DataType == GL_UNSIGNED_SHORT) {
_mesa_warning(ctx, "Unsupported OSMesa format ARGB/GLushort");
- rb->Format = MESA_FORMAT_RGBA_16; /* not exactly right */
+ rb->Format = MESA_FORMAT_RGBA_16_UNORM; /* not exactly right */
}
else {
_mesa_warning(ctx, "Unsupported OSMesa format ARGB/GLfloat");
@@ -498,7 +498,7 @@ osmesa_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
}
else if (osmesa->DataType == GL_UNSIGNED_SHORT) {
_mesa_warning(ctx, "Unsupported OSMesa format RGB/GLushort");
- rb->Format = MESA_FORMAT_RGBA_16; /* not exactly right */
+ rb->Format = MESA_FORMAT_RGBA_16_UNORM; /* not exactly right */
}
else {
_mesa_warning(ctx, "Unsupported OSMesa format RGB/GLfloat");
@@ -511,7 +511,7 @@ osmesa_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
}
else if (osmesa->DataType == GL_UNSIGNED_SHORT) {
_mesa_warning(ctx, "Unsupported OSMesa format BGR/GLushort");
- rb->Format = MESA_FORMAT_RGBA_16; /* not exactly right */
+ rb->Format = MESA_FORMAT_RGBA_16_UNORM; /* not exactly right */
}
else {
_mesa_warning(ctx, "Unsupported OSMesa format BGR/GLfloat");
@@ -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_RGB565_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 3af5be4..2560c17 100644
--- a/src/mesa/drivers/x11/xm_buffer.c
+++ b/src/mesa/drivers/x11/xm_buffer.c
@@ -343,20 +343,20 @@ xmesa_new_renderbuffer(struct gl_context *ctx, GLuint name,
/* This will really only happen for pixmaps. We'll access the
* pixmap via a temporary XImage which will be 32bpp.
*/
- xrb->Base.Base.Format = MESA_FORMAT_XRGB8888;
+ xrb->Base.Base.Format = MESA_FORMAT_XRGB8888_UNORM;
break;
case PF_8A8R8G8B:
- xrb->Base.Base.Format = MESA_FORMAT_ARGB8888;
+ xrb->Base.Base.Format = MESA_FORMAT_ARGB8888_UNORM;
break;
case PF_8A8B8G8R:
- xrb->Base.Base.Format = MESA_FORMAT_RGBA8888_REV;
+ xrb->Base.Base.Format = MESA_FORMAT_RGBA8888_REV_UNORM;
break;
case PF_5R6G5B:
- xrb->Base.Base.Format = MESA_FORMAT_RGB565;
+ xrb->Base.Base.Format = MESA_FORMAT_RGB565_UNORM;
break;
default:
_mesa_warning(ctx, "Bad pixel format in xmesa_new_renderbuffer");
- xrb->Base.Base.Format = MESA_FORMAT_ARGB8888;
+ xrb->Base.Base.Format = MESA_FORMAT_ARGB8888_UNORM;
break;
}
diff --git a/src/mesa/main/accum.c b/src/mesa/main/accum.c
index 421fe6c..933189f 100644
--- a/src/mesa/main/accum.c
+++ b/src/mesa/main/accum.c
@@ -138,7 +138,7 @@ _mesa_clear_accum_buffer(struct gl_context *ctx)
return;
}
- if (accRb->Format == MESA_FORMAT_SIGNED_RGBA_16) {
+ if (accRb->Format == MESA_FORMAT_RGBA_16_SNORM) {
const GLshort clearR = FLOAT_TO_SHORT(ctx->Accum.ClearColor[0]);
const GLshort clearG = FLOAT_TO_SHORT(ctx->Accum.ClearColor[1]);
const GLshort clearB = FLOAT_TO_SHORT(ctx->Accum.ClearColor[2]);
@@ -193,7 +193,7 @@ accum_scale_or_bias(struct gl_context *ctx, GLfloat value,
return;
}
- if (accRb->Format == MESA_FORMAT_SIGNED_RGBA_16) {
+ if (accRb->Format == MESA_FORMAT_RGBA_16_SNORM) {
const GLshort incr = (GLshort) (value * 32767.0f);
GLint i, j;
if (bias) {
@@ -271,7 +271,7 @@ accum_or_load(struct gl_context *ctx, GLfloat value,
return;
}
- if (accRb->Format == MESA_FORMAT_SIGNED_RGBA_16) {
+ if (accRb->Format == MESA_FORMAT_RGBA_16_SNORM) {
const GLfloat scale = value * 32767.0f;
GLint i, j;
GLfloat (*rgba)[4];
@@ -363,7 +363,7 @@ accum_return(struct gl_context *ctx, GLfloat value,
continue;
}
- if (accRb->Format == MESA_FORMAT_SIGNED_RGBA_16) {
+ if (accRb->Format == MESA_FORMAT_RGBA_16_SNORM) {
const GLfloat scale = value / 32767.0f;
GLint i, j;
GLfloat (*rgba)[4], (*dest)[4];
diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c
index 99b2147..15c4853 100644
--- a/src/mesa/main/debug.c
+++ b/src/mesa/main/debug.c
@@ -615,21 +615,21 @@ _mesa_print_texture(struct gl_context *ctx, struct gl_texture_image *img)
else {
/* XXX add more formats or make into a new format utility function */
switch (img->TexFormat) {
- case MESA_FORMAT_A8:
- case MESA_FORMAT_L8:
- case MESA_FORMAT_I8:
+ case MESA_FORMAT_A8_UNORM:
+ case MESA_FORMAT_L8_UNORM:
+ case MESA_FORMAT_I8_UNORM:
c = 1;
break;
- case MESA_FORMAT_AL88:
- case MESA_FORMAT_AL88_REV:
+ case MESA_FORMAT_AL88_UNORM:
+ case MESA_FORMAT_AL88_REV_UNORM:
c = 2;
break;
case MESA_FORMAT_RGB888:
case MESA_FORMAT_BGR888:
c = 3;
break;
- case MESA_FORMAT_RGBA8888:
- case MESA_FORMAT_ARGB8888:
+ case MESA_FORMAT_RGBA8888_UNORM:
+ case MESA_FORMAT_ARGB8888_UNORM:
c = 4;
break;
default:
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 861885d..32c071e 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -669,7 +669,7 @@ is_format_color_renderable(const struct gl_context *ctx, gl_format format, GLenu
break;
}
- if (format == MESA_FORMAT_ARGB2101010 && internalFormat != GL_RGB10_A2) {
+ if (format == MESA_FORMAT_ARGB2101010_UNORM && internalFormat != GL_RGB10_A2) {
return GL_FALSE;
}
@@ -2912,7 +2912,7 @@ _mesa_GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment,
return;
}
- if (format == MESA_FORMAT_S8) {
+ if (format == MESA_FORMAT_S8_UNORM) {
/* special cases */
*params = GL_INDEX;
}
diff --git a/src/mesa/main/format_pack.c b/src/mesa/main/format_pack.c
index 826fc10..b1f8329 100644
--- a/src/mesa/main/format_pack.c
+++ b/src/mesa/main/format_pack.c
@@ -92,7 +92,7 @@ linear_ubyte_to_srgb_ubyte(GLubyte cl)
/*
- * MESA_FORMAT_RGBA8888
+ * MESA_FORMAT_RGBA8888_UNORM
*/
static void
@@ -136,7 +136,7 @@ pack_row_float_RGBA8888(GLuint n, const GLfloat src[][4], void *dst)
/*
- * MESA_FORMAT_RGBA8888_REV
+ * MESA_FORMAT_RGBA8888_REV_UNORM
*/
static void
@@ -179,7 +179,7 @@ pack_row_float_RGBA8888_REV(GLuint n, const GLfloat src[][4], void *dst)
/*
- * MESA_FORMAT_ARGB8888
+ * MESA_FORMAT_ARGB8888_UNORM
*/
static void
@@ -222,7 +222,7 @@ pack_row_float_ARGB8888(GLuint n, const GLfloat src[][4], void *dst)
/*
- * MESA_FORMAT_ARGB8888_REV
+ * MESA_FORMAT_ARGB8888_REV_UNORM
*/
static void
@@ -265,7 +265,7 @@ pack_row_float_ARGB8888_REV(GLuint n, const GLfloat src[][4], void *dst)
/*
- * MESA_FORMAT_XRGB8888
+ * MESA_FORMAT_XRGB8888_UNORM
*/
static void
@@ -307,7 +307,7 @@ pack_row_float_XRGB8888(GLuint n, const GLfloat src[][4], void *dst)
/*
- * MESA_FORMAT_XRGB8888_REV
+ * MESA_FORMAT_XRGB8888_REV_UNORM
*/
static void
@@ -447,7 +447,7 @@ pack_row_float_BGR888(GLuint n, const GLfloat src[][4], void *dst)
/*
- * MESA_FORMAT_RGB565
+ * MESA_FORMAT_RGB565_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_RGB565_REV_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_ARGB4444_UNORM
*/
static void
@@ -558,7 +558,7 @@ pack_float_ARGB4444(const GLfloat src[4], void *dst)
/*
- * MESA_FORMAT_ARGB4444_REV
+ * MESA_FORMAT_ARGB4444_REV_UNORM
*/
static void
@@ -580,7 +580,7 @@ pack_float_ARGB4444_REV(const GLfloat src[4], void *dst)
/*
- * MESA_FORMAT_RGBA5551
+ * MESA_FORMAT_RGBA5551_UNORM
*/
static void
@@ -602,7 +602,7 @@ pack_float_RGBA5551(const GLfloat src[4], void *dst)
/*
- * MESA_FORMAT_ARGB1555
+ * MESA_FORMAT_ARGB1555_UNORM
*/
static void
@@ -621,7 +621,7 @@ pack_float_ARGB1555(const GLfloat src[4], void *dst)
}
-/* MESA_FORMAT_ARGB1555_REV */
+/* MESA_FORMAT_ARGB1555_REV_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_AL44_UNORM */
static void
pack_ubyte_AL44(const GLubyte src[4], void *dst)
@@ -659,7 +659,7 @@ pack_float_AL44(const GLfloat src[4], void *dst)
}
-/* MESA_FORMAT_AL88 */
+/* MESA_FORMAT_AL88_UNORM */
static void
pack_ubyte_AL88(const GLubyte src[4], void *dst)
@@ -678,7 +678,7 @@ pack_float_AL88(const GLfloat src[4], void *dst)
}
-/* MESA_FORMAT_AL88_REV */
+/* MESA_FORMAT_AL88_REV_UNORM */
static void
pack_ubyte_AL88_REV(const GLubyte src[4], void *dst)
@@ -697,7 +697,7 @@ pack_float_AL88_REV(const GLfloat src[4], void *dst)
}
-/* MESA_FORMAT_AL1616 */
+/* MESA_FORMAT_AL1616_UNORM */
static void
pack_ubyte_AL1616(const GLubyte src[4], void *dst)
@@ -719,7 +719,7 @@ pack_float_AL1616(const GLfloat src[4], void *dst)
}
-/* MESA_FORMAT_AL1616_REV */
+/* MESA_FORMAT_AL1616_REV_UNORM */
static void
pack_ubyte_AL1616_REV(const GLubyte src[4], void *dst)
@@ -741,7 +741,7 @@ pack_float_AL1616_REV(const GLfloat src[4], void *dst)
}
-/* MESA_FORMAT_RGB332 */
+/* MESA_FORMAT_RGB332_UNORM */
static void
pack_ubyte_RGB332(const GLubyte src[4], void *dst)
@@ -761,7 +761,7 @@ pack_float_RGB332(const GLfloat src[4], void *dst)
}
-/* MESA_FORMAT_A8 */
+/* MESA_FORMAT_A8_UNORM */
static void
pack_ubyte_A8(const GLubyte src[4], void *dst)
@@ -778,7 +778,7 @@ pack_float_A8(const GLfloat src[4], void *dst)
}
-/* MESA_FORMAT_A16 */
+/* MESA_FORMAT_A16_UNORM */
static void
pack_ubyte_A16(const GLubyte src[4], void *dst)
@@ -795,7 +795,7 @@ pack_float_A16(const GLfloat src[4], void *dst)
}
-/* MESA_FORMAT_L8 */
+/* MESA_FORMAT_L8_UNORM */
static void
pack_ubyte_L8(const GLubyte src[4], void *dst)
@@ -812,7 +812,7 @@ pack_float_L8(const GLfloat src[4], void *dst)
}
-/* MESA_FORMAT_L16 */
+/* MESA_FORMAT_L16_UNORM */
static void
pack_ubyte_L16(const GLubyte src[4], void *dst)
@@ -859,7 +859,7 @@ pack_float_YCBCR_REV(const GLfloat src[4], void *dst)
}
-/* MESA_FORMAT_R8 */
+/* MESA_FORMAT_R8_UNORM */
static void
pack_ubyte_R8(const GLubyte src[4], void *dst)
@@ -878,7 +878,7 @@ pack_float_R8(const GLfloat src[4], void *dst)
}
-/* MESA_FORMAT_GR88 */
+/* MESA_FORMAT_GR88_UNORM */
static void
pack_ubyte_GR88(const GLubyte src[4], void *dst)
@@ -898,7 +898,7 @@ pack_float_GR88(const GLfloat src[4], void *dst)
}
-/* MESA_FORMAT_RG88 */
+/* MESA_FORMAT_RG88_UNORM */
static void
pack_ubyte_RG88(const GLubyte src[4], void *dst)
@@ -918,7 +918,7 @@ pack_float_RG88(const GLfloat src[4], void *dst)
}
-/* MESA_FORMAT_R16 */
+/* MESA_FORMAT_R16_UNORM */
static void
pack_ubyte_R16(const GLubyte src[4], void *dst)
@@ -935,7 +935,7 @@ pack_float_R16(const GLfloat src[4], void *dst)
}
-/* MESA_FORMAT_GR1616 */
+/* MESA_FORMAT_GR1616_UNORM */
static void
pack_ubyte_GR1616(const GLubyte src[4], void *dst)
@@ -957,7 +957,7 @@ pack_float_GR1616(const GLfloat src[4], void *dst)
}
-/* MESA_FORMAT_RG1616 */
+/* MESA_FORMAT_RG1616_UNORM */
static void
pack_ubyte_RG1616(const GLubyte src[4], void *dst)
@@ -980,7 +980,7 @@ pack_float_RG1616(const GLfloat src[4], void *dst)
}
-/* MESA_FORMAT_ARGB2101010 */
+/* MESA_FORMAT_ARGB2101010_UNORM */
static void
pack_ubyte_ARGB2101010(const GLubyte src[4], void *dst)
@@ -1394,7 +1394,7 @@ pack_float_DUDV8(const GLfloat src[4], void *dst)
}
-/* MESA_FORMAT_RGBA_16 */
+/* MESA_FORMAT_RGBA_16_UNORM */
static void
pack_ubyte_RGBA_16(const GLubyte src[4], void *dst)
@@ -1419,7 +1419,7 @@ pack_float_RGBA_16(const GLfloat src[4], void *dst)
/*
- * MESA_FORMAT_SIGNED_R8
+ * MESA_FORMAT_R8_SNORM
*/
static void
@@ -1431,7 +1431,7 @@ pack_float_SIGNED_R8(const GLfloat src[4], void *dst)
/*
- * MESA_FORMAT_SIGNED_RG88_REV
+ * MESA_FORMAT_RG88_REV_SNORM
*/
static void
@@ -1445,7 +1445,7 @@ pack_float_SIGNED_RG88_REV(const GLfloat src[4], void *dst)
/*
- * MESA_FORMAT_SIGNED_RGBX8888
+ * MESA_FORMAT_RGBX8888_SNORM
*/
static void
@@ -1461,7 +1461,7 @@ pack_float_SIGNED_RGBX8888(const GLfloat src[4], void *dst)
/*
- * MESA_FORMAT_SIGNED_RGBA8888
+ * MESA_FORMAT_RGBA8888_SNORM
*/
static void
@@ -1477,7 +1477,7 @@ pack_float_SIGNED_RGBA8888(const GLfloat src[4], void *dst)
/*
- * MESA_FORMAT_SIGNED_RGBA8888_REV
+ * MESA_FORMAT_RGBA8888_REV_SNORM
*/
static void
@@ -1493,7 +1493,7 @@ pack_float_SIGNED_RGBA8888_REV(const GLfloat src[4], void *dst)
/*
- * MESA_FORMAT_SIGNED_R16
+ * MESA_FORMAT_R16_SNORM
*/
static void
@@ -1505,7 +1505,7 @@ pack_float_SIGNED_R16(const GLfloat src[4], void *dst)
/*
- * MESA_FORMAT_SIGNED_GR1616
+ * MESA_FORMAT_GR1616_SNORM
*/
static void
@@ -1519,7 +1519,7 @@ pack_float_SIGNED_GR1616(const GLfloat src[4], void *dst)
/*
- * MESA_FORMAT_SIGNED_RGB_16
+ * MESA_FORMAT_RGB_16_SNORM
*/
static void
@@ -1533,7 +1533,7 @@ pack_float_SIGNED_RGB_16(const GLfloat src[4], void *dst)
/*
- * MESA_FORMAT_SIGNED_RGBA_16
+ * MESA_FORMAT_RGBA_16_SNORM
*/
static void
@@ -1548,7 +1548,7 @@ pack_float_SIGNED_RGBA_16(const GLfloat src[4], void *dst)
/*
- * MESA_FORMAT_SIGNED_A8
+ * MESA_FORMAT_A8_SNORM
*/
static void
@@ -1560,7 +1560,7 @@ pack_float_SIGNED_A8(const GLfloat src[4], void *dst)
/*
- * MESA_FORMAT_SIGNED_L8
+ * MESA_FORMAT_L8_SNORM
*/
static void
@@ -1572,7 +1572,7 @@ pack_float_SIGNED_L8(const GLfloat src[4], void *dst)
/*
- * MESA_FORMAT_SIGNED_AL88
+ * MESA_FORMAT_AL88_SNORM
*/
static void
@@ -1586,7 +1586,7 @@ pack_float_SIGNED_AL88(const GLfloat src[4], void *dst)
/*
- * MESA_FORMAT_SIGNED_A16
+ * MESA_FORMAT_A16_SNORM
*/
static void
@@ -1598,7 +1598,7 @@ pack_float_SIGNED_A16(const GLfloat src[4], void *dst)
/*
- * MESA_FORMAT_SIGNED_L16
+ * MESA_FORMAT_L16_SNORM
*/
static void
@@ -1610,7 +1610,7 @@ pack_float_SIGNED_L16(const GLfloat src[4], void *dst)
/*
- * MESA_FORMAT_SIGNED_AL1616
+ * MESA_FORMAT_AL1616_SNORM
*/
static void
@@ -1839,54 +1839,54 @@ _mesa_get_pack_ubyte_rgba_function(gl_format format)
table[MESA_FORMAT_NONE] = NULL;
- table[MESA_FORMAT_RGBA8888] = pack_ubyte_RGBA8888;
- table[MESA_FORMAT_RGBA8888_REV] = pack_ubyte_RGBA8888_REV;
- table[MESA_FORMAT_ARGB8888] = pack_ubyte_ARGB8888;
- table[MESA_FORMAT_ARGB8888_REV] = pack_ubyte_ARGB8888_REV;
- table[MESA_FORMAT_RGBX8888] = pack_ubyte_RGBA8888; /* reused */
- table[MESA_FORMAT_RGBX8888_REV] = pack_ubyte_RGBA8888_REV; /* reused */
- table[MESA_FORMAT_XRGB8888] = pack_ubyte_XRGB8888;
- table[MESA_FORMAT_XRGB8888_REV] = pack_ubyte_XRGB8888_REV;
+ table[MESA_FORMAT_RGBA8888_UNORM] = pack_ubyte_RGBA8888;
+ table[MESA_FORMAT_RGBA8888_REV_UNORM] = pack_ubyte_RGBA8888_REV;
+ table[MESA_FORMAT_ARGB8888_UNORM] = pack_ubyte_ARGB8888;
+ table[MESA_FORMAT_ARGB8888_REV_UNORM] = pack_ubyte_ARGB8888_REV;
+ table[MESA_FORMAT_RGBX8888_UNORM] = pack_ubyte_RGBA8888; /* reused */
+ table[MESA_FORMAT_RGBX8888_REV_UNORM] = pack_ubyte_RGBA8888_REV; /* reused */
+ table[MESA_FORMAT_XRGB8888_UNORM] = pack_ubyte_XRGB8888;
+ table[MESA_FORMAT_XRGB8888_REV_UNORM] = pack_ubyte_XRGB8888_REV;
table[MESA_FORMAT_RGB888] = pack_ubyte_RGB888;
table[MESA_FORMAT_BGR888] = pack_ubyte_BGR888;
- table[MESA_FORMAT_RGB565] = pack_ubyte_RGB565;
- table[MESA_FORMAT_RGB565_REV] = pack_ubyte_RGB565_REV;
- table[MESA_FORMAT_ARGB4444] = pack_ubyte_ARGB4444;
- table[MESA_FORMAT_ARGB4444_REV] = pack_ubyte_ARGB4444_REV;
- table[MESA_FORMAT_RGBA5551] = pack_ubyte_RGBA5551;
- table[MESA_FORMAT_ARGB1555] = pack_ubyte_ARGB1555;
- table[MESA_FORMAT_ARGB1555_REV] = pack_ubyte_ARGB1555_REV;
- table[MESA_FORMAT_AL44] = pack_ubyte_AL44;
- table[MESA_FORMAT_AL88] = pack_ubyte_AL88;
- table[MESA_FORMAT_AL88_REV] = pack_ubyte_AL88_REV;
- table[MESA_FORMAT_AL1616] = pack_ubyte_AL1616;
- table[MESA_FORMAT_AL1616_REV] = pack_ubyte_AL1616_REV;
- table[MESA_FORMAT_RGB332] = pack_ubyte_RGB332;
- table[MESA_FORMAT_A8] = pack_ubyte_A8;
- table[MESA_FORMAT_A16] = pack_ubyte_A16;
- table[MESA_FORMAT_L8] = pack_ubyte_L8;
- table[MESA_FORMAT_L16] = pack_ubyte_L16;
- table[MESA_FORMAT_I8] = pack_ubyte_L8; /* reuse pack_ubyte_L8 */
- table[MESA_FORMAT_I16] = pack_ubyte_L16; /* reuse pack_ubyte_L16 */
+ table[MESA_FORMAT_RGB565_UNORM] = pack_ubyte_RGB565;
+ table[MESA_FORMAT_RGB565_REV_UNORM] = pack_ubyte_RGB565_REV;
+ table[MESA_FORMAT_ARGB4444_UNORM] = pack_ubyte_ARGB4444;
+ table[MESA_FORMAT_ARGB4444_REV_UNORM] = pack_ubyte_ARGB4444_REV;
+ table[MESA_FORMAT_RGBA5551_UNORM] = pack_ubyte_RGBA5551;
+ table[MESA_FORMAT_ARGB1555_UNORM] = pack_ubyte_ARGB1555;
+ table[MESA_FORMAT_ARGB1555_REV_UNORM] = pack_ubyte_ARGB1555_REV;
+ table[MESA_FORMAT_AL44_UNORM] = pack_ubyte_AL44;
+ table[MESA_FORMAT_AL88_UNORM] = pack_ubyte_AL88;
+ table[MESA_FORMAT_AL88_REV_UNORM] = pack_ubyte_AL88_REV;
+ table[MESA_FORMAT_AL1616_UNORM] = pack_ubyte_AL1616;
+ table[MESA_FORMAT_AL1616_REV_UNORM] = pack_ubyte_AL1616_REV;
+ table[MESA_FORMAT_RGB332_UNORM] = pack_ubyte_RGB332;
+ table[MESA_FORMAT_A8_UNORM] = pack_ubyte_A8;
+ table[MESA_FORMAT_A16_UNORM] = pack_ubyte_A16;
+ table[MESA_FORMAT_L8_UNORM] = pack_ubyte_L8;
+ table[MESA_FORMAT_L16_UNORM] = pack_ubyte_L16;
+ table[MESA_FORMAT_I8_UNORM] = pack_ubyte_L8; /* reuse pack_ubyte_L8 */
+ table[MESA_FORMAT_I16_UNORM] = pack_ubyte_L16; /* reuse pack_ubyte_L16 */
table[MESA_FORMAT_YCBCR] = pack_ubyte_YCBCR;
table[MESA_FORMAT_YCBCR_REV] = pack_ubyte_YCBCR_REV;
- table[MESA_FORMAT_R8] = pack_ubyte_R8;
- table[MESA_FORMAT_GR88] = pack_ubyte_GR88;
- table[MESA_FORMAT_RG88] = pack_ubyte_RG88;
- table[MESA_FORMAT_R16] = pack_ubyte_R16;
- table[MESA_FORMAT_GR1616] = pack_ubyte_GR1616;
- table[MESA_FORMAT_RG1616] = pack_ubyte_RG1616;
- table[MESA_FORMAT_ARGB2101010] = pack_ubyte_ARGB2101010;
+ table[MESA_FORMAT_R8_UNORM] = pack_ubyte_R8;
+ table[MESA_FORMAT_GR88_UNORM] = pack_ubyte_GR88;
+ table[MESA_FORMAT_RG88_UNORM] = pack_ubyte_RG88;
+ table[MESA_FORMAT_R16_UNORM] = pack_ubyte_R16;
+ table[MESA_FORMAT_GR1616_UNORM] = pack_ubyte_GR1616;
+ table[MESA_FORMAT_RG1616_UNORM] = pack_ubyte_RG1616;
+ table[MESA_FORMAT_ARGB2101010_UNORM] = pack_ubyte_ARGB2101010;
table[MESA_FORMAT_ABGR2101010_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_Z16] = NULL;
- table[MESA_FORMAT_X8_Z24] = NULL;
- table[MESA_FORMAT_Z24_X8] = NULL;
- table[MESA_FORMAT_Z32] = NULL;
- table[MESA_FORMAT_S8] = NULL;
+ table[MESA_FORMAT_Z24_UNORM_S8_UINT] = NULL;
+ table[MESA_FORMAT_S8_UINT_Z24_UNORM] = NULL;
+ table[MESA_FORMAT_Z16_UNORM] = NULL;
+ table[MESA_FORMAT_X8_Z24_UNORM] = NULL;
+ table[MESA_FORMAT_Z24_X8_UNORM] = NULL;
+ table[MESA_FORMAT_Z32_UNORM] = NULL;
+ table[MESA_FORMAT_S8_UNORM] = NULL;
/* sRGB */
table[MESA_FORMAT_SRGB8] = pack_ubyte_SRGB8;
@@ -1926,38 +1926,38 @@ _mesa_get_pack_ubyte_rgba_function(gl_format format)
table[MESA_FORMAT_RG_FLOAT16] = pack_ubyte_RG_FLOAT16;
/* n/a */
- table[MESA_FORMAT_RGBA_INT8] = NULL; /* pack_ubyte_RGBA_INT8 */
- table[MESA_FORMAT_RGBA_INT16] = NULL; /* pack_ubyte_RGBA_INT16 */
- table[MESA_FORMAT_RGBA_INT32] = NULL; /* pack_ubyte_RGBA_INT32 */
+ table[MESA_FORMAT_RGBA_SINT8] = NULL; /* pack_ubyte_RGBA_INT8 */
+ table[MESA_FORMAT_RGBA_SINT16] = NULL; /* pack_ubyte_RGBA_INT16 */
+ table[MESA_FORMAT_RGBA_SINT32] = NULL; /* pack_ubyte_RGBA_INT32 */
table[MESA_FORMAT_RGBA_UINT8] = NULL; /* pack_ubyte_RGBA_UINT8 */
table[MESA_FORMAT_RGBA_UINT16] = NULL; /* pack_ubyte_RGBA_UINT16 */
table[MESA_FORMAT_RGBA_UINT32] = NULL; /* pack_ubyte_RGBA_UINT32 */
table[MESA_FORMAT_DUDV8] = pack_ubyte_DUDV8;
- table[MESA_FORMAT_RGBA_16] = pack_ubyte_RGBA_16;
+ table[MESA_FORMAT_RGBA_16_UNORM] = pack_ubyte_RGBA_16;
/* n/a */
- table[MESA_FORMAT_SIGNED_R8] = NULL;
- table[MESA_FORMAT_SIGNED_RG88_REV] = NULL;
- table[MESA_FORMAT_SIGNED_RGBX8888] = NULL;
- table[MESA_FORMAT_SIGNED_RGBA8888] = NULL;
- table[MESA_FORMAT_SIGNED_RGBA8888_REV] = NULL;
- table[MESA_FORMAT_SIGNED_R16] = NULL;
- table[MESA_FORMAT_SIGNED_GR1616] = NULL;
- table[MESA_FORMAT_SIGNED_RGB_16] = NULL;
- table[MESA_FORMAT_SIGNED_RGBA_16] = NULL;
- table[MESA_FORMAT_SIGNED_A8] = NULL;
- table[MESA_FORMAT_SIGNED_L8] = NULL;
- table[MESA_FORMAT_SIGNED_AL88] = NULL;
- table[MESA_FORMAT_SIGNED_I8] = NULL;
- table[MESA_FORMAT_SIGNED_A16] = NULL;
- table[MESA_FORMAT_SIGNED_L16] = NULL;
- table[MESA_FORMAT_SIGNED_AL1616] = NULL;
- table[MESA_FORMAT_SIGNED_I16] = NULL;
-
-
- table[MESA_FORMAT_RGBA_16] = pack_ubyte_RGBA_16;
+ table[MESA_FORMAT_R8_SNORM] = NULL;
+ table[MESA_FORMAT_RG88_REV_SNORM] = NULL;
+ table[MESA_FORMAT_RGBX8888_SNORM] = NULL;
+ table[MESA_FORMAT_RGBA8888_SNORM] = NULL;
+ table[MESA_FORMAT_RGBA8888_REV_SNORM] = NULL;
+ table[MESA_FORMAT_R16_SNORM] = NULL;
+ table[MESA_FORMAT_GR1616_SNORM] = NULL;
+ table[MESA_FORMAT_RGB_16_SNORM] = NULL;
+ table[MESA_FORMAT_RGBA_16_SNORM] = NULL;
+ table[MESA_FORMAT_A8_SNORM] = NULL;
+ table[MESA_FORMAT_L8_SNORM] = NULL;
+ table[MESA_FORMAT_AL88_SNORM] = NULL;
+ table[MESA_FORMAT_I8_SNORM] = NULL;
+ table[MESA_FORMAT_A16_SNORM] = NULL;
+ table[MESA_FORMAT_L16_SNORM] = NULL;
+ table[MESA_FORMAT_AL1616_SNORM] = NULL;
+ table[MESA_FORMAT_I16_SNORM] = NULL;
+
+
+ table[MESA_FORMAT_RGBA_16_UNORM] = 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;
@@ -2000,55 +2000,55 @@ _mesa_get_pack_float_rgba_function(gl_format format)
table[MESA_FORMAT_NONE] = NULL;
- table[MESA_FORMAT_RGBA8888] = pack_float_RGBA8888;
- table[MESA_FORMAT_RGBA8888_REV] = pack_float_RGBA8888_REV;
- table[MESA_FORMAT_ARGB8888] = pack_float_ARGB8888;
- table[MESA_FORMAT_ARGB8888_REV] = pack_float_ARGB8888_REV;
- table[MESA_FORMAT_RGBX8888] = pack_float_RGBA8888; /* reused */
- table[MESA_FORMAT_RGBX8888_REV] = pack_float_RGBA8888_REV; /* reused */
- table[MESA_FORMAT_XRGB8888] = pack_float_XRGB8888;
- table[MESA_FORMAT_XRGB8888_REV] = pack_float_XRGB8888_REV;
+ table[MESA_FORMAT_RGBA8888_UNORM] = pack_float_RGBA8888;
+ table[MESA_FORMAT_RGBA8888_REV_UNORM] = pack_float_RGBA8888_REV;
+ table[MESA_FORMAT_ARGB8888_UNORM] = pack_float_ARGB8888;
+ table[MESA_FORMAT_ARGB8888_REV_UNORM] = pack_float_ARGB8888_REV;
+ table[MESA_FORMAT_RGBX8888_UNORM] = pack_float_RGBA8888; /* reused */
+ table[MESA_FORMAT_RGBX8888_REV_UNORM] = pack_float_RGBA8888_REV; /* reused */
+ table[MESA_FORMAT_XRGB8888_UNORM] = pack_float_XRGB8888;
+ table[MESA_FORMAT_XRGB8888_REV_UNORM] = pack_float_XRGB8888_REV;
table[MESA_FORMAT_RGB888] = pack_float_RGB888;
table[MESA_FORMAT_BGR888] = pack_float_BGR888;
- table[MESA_FORMAT_RGB565] = pack_float_RGB565;
- table[MESA_FORMAT_RGB565_REV] = pack_float_RGB565_REV;
- table[MESA_FORMAT_ARGB4444] = pack_float_ARGB4444;
- table[MESA_FORMAT_ARGB4444_REV] = pack_float_ARGB4444_REV;
- table[MESA_FORMAT_RGBA5551] = pack_float_RGBA5551;
- table[MESA_FORMAT_ARGB1555] = pack_float_ARGB1555;
- table[MESA_FORMAT_ARGB1555_REV] = pack_float_ARGB1555_REV;
-
- table[MESA_FORMAT_AL44] = pack_float_AL44;
- table[MESA_FORMAT_AL88] = pack_float_AL88;
- table[MESA_FORMAT_AL88_REV] = pack_float_AL88_REV;
- table[MESA_FORMAT_AL1616] = pack_float_AL1616;
- table[MESA_FORMAT_AL1616_REV] = pack_float_AL1616_REV;
- table[MESA_FORMAT_RGB332] = pack_float_RGB332;
- table[MESA_FORMAT_A8] = pack_float_A8;
- table[MESA_FORMAT_A16] = pack_float_A16;
- table[MESA_FORMAT_L8] = pack_float_L8;
- table[MESA_FORMAT_L16] = pack_float_L16;
- table[MESA_FORMAT_I8] = pack_float_L8; /* reuse pack_float_L8 */
- table[MESA_FORMAT_I16] = pack_float_L16; /* reuse pack_float_L16 */
+ table[MESA_FORMAT_RGB565_UNORM] = pack_float_RGB565;
+ table[MESA_FORMAT_RGB565_REV_UNORM] = pack_float_RGB565_REV;
+ table[MESA_FORMAT_ARGB4444_UNORM] = pack_float_ARGB4444;
+ table[MESA_FORMAT_ARGB4444_REV_UNORM] = pack_float_ARGB4444_REV;
+ table[MESA_FORMAT_RGBA5551_UNORM] = pack_float_RGBA5551;
+ table[MESA_FORMAT_ARGB1555_UNORM] = pack_float_ARGB1555;
+ table[MESA_FORMAT_ARGB1555_REV_UNORM] = pack_float_ARGB1555_REV;
+
+ table[MESA_FORMAT_AL44_UNORM] = pack_float_AL44;
+ table[MESA_FORMAT_AL88_UNORM] = pack_float_AL88;
+ table[MESA_FORMAT_AL88_REV_UNORM] = pack_float_AL88_REV;
+ table[MESA_FORMAT_AL1616_UNORM] = pack_float_AL1616;
+ table[MESA_FORMAT_AL1616_REV_UNORM] = pack_float_AL1616_REV;
+ table[MESA_FORMAT_RGB332_UNORM] = pack_float_RGB332;
+ table[MESA_FORMAT_A8_UNORM] = pack_float_A8;
+ table[MESA_FORMAT_A16_UNORM] = pack_float_A16;
+ table[MESA_FORMAT_L8_UNORM] = pack_float_L8;
+ table[MESA_FORMAT_L16_UNORM] = pack_float_L16;
+ table[MESA_FORMAT_I8_UNORM] = pack_float_L8; /* reuse pack_float_L8 */
+ table[MESA_FORMAT_I16_UNORM] = pack_float_L16; /* reuse pack_float_L16 */
table[MESA_FORMAT_YCBCR] = pack_float_YCBCR;
table[MESA_FORMAT_YCBCR_REV] = pack_float_YCBCR_REV;
- table[MESA_FORMAT_R8] = pack_float_R8;
- table[MESA_FORMAT_GR88] = pack_float_GR88;
- table[MESA_FORMAT_RG88] = pack_float_RG88;
- table[MESA_FORMAT_R16] = pack_float_R16;
- table[MESA_FORMAT_GR1616] = pack_float_GR1616;
- table[MESA_FORMAT_RG1616] = pack_float_RG1616;
- table[MESA_FORMAT_ARGB2101010] = pack_float_ARGB2101010;
+ table[MESA_FORMAT_R8_UNORM] = pack_float_R8;
+ table[MESA_FORMAT_GR88_UNORM] = pack_float_GR88;
+ table[MESA_FORMAT_RG88_UNORM] = pack_float_RG88;
+ table[MESA_FORMAT_R16_UNORM] = pack_float_R16;
+ table[MESA_FORMAT_GR1616_UNORM] = pack_float_GR1616;
+ table[MESA_FORMAT_RG1616_UNORM] = pack_float_RG1616;
+ table[MESA_FORMAT_ARGB2101010_UNORM] = pack_float_ARGB2101010;
table[MESA_FORMAT_ABGR2101010_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_Z16] = NULL;
- table[MESA_FORMAT_X8_Z24] = NULL;
- table[MESA_FORMAT_Z24_X8] = NULL;
- table[MESA_FORMAT_Z32] = NULL;
- table[MESA_FORMAT_S8] = NULL;
+ table[MESA_FORMAT_Z24_UNORM_S8_UINT] = NULL;
+ table[MESA_FORMAT_S8_UINT_Z24_UNORM] = NULL;
+ table[MESA_FORMAT_Z16_UNORM] = NULL;
+ table[MESA_FORMAT_X8_Z24_UNORM] = NULL;
+ table[MESA_FORMAT_Z24_X8_UNORM] = NULL;
+ table[MESA_FORMAT_Z32_UNORM] = NULL;
+ table[MESA_FORMAT_S8_UNORM] = NULL;
table[MESA_FORMAT_SRGB8] = pack_float_SRGB8;
table[MESA_FORMAT_SRGBA8] = pack_float_SRGBA8;
@@ -2088,34 +2088,34 @@ _mesa_get_pack_float_rgba_function(gl_format format)
table[MESA_FORMAT_RG_FLOAT16] = pack_float_RG_FLOAT16;
/* n/a */
- table[MESA_FORMAT_RGBA_INT8] = NULL;
- table[MESA_FORMAT_RGBA_INT16] = NULL;
- table[MESA_FORMAT_RGBA_INT32] = NULL;
+ table[MESA_FORMAT_RGBA_SINT8] = NULL;
+ table[MESA_FORMAT_RGBA_SINT16] = NULL;
+ table[MESA_FORMAT_RGBA_SINT32] = NULL;
table[MESA_FORMAT_RGBA_UINT8] = NULL;
table[MESA_FORMAT_RGBA_UINT16] = NULL;
table[MESA_FORMAT_RGBA_UINT32] = NULL;
table[MESA_FORMAT_DUDV8] = pack_float_DUDV8;
- table[MESA_FORMAT_RGBA_16] = pack_float_RGBA_16;
-
- table[MESA_FORMAT_SIGNED_R8] = pack_float_SIGNED_R8;
- table[MESA_FORMAT_SIGNED_RG88_REV] = pack_float_SIGNED_RG88_REV;
- table[MESA_FORMAT_SIGNED_RGBX8888] = pack_float_SIGNED_RGBX8888;
- table[MESA_FORMAT_SIGNED_RGBA8888] = pack_float_SIGNED_RGBA8888;
- table[MESA_FORMAT_SIGNED_RGBA8888_REV] = pack_float_SIGNED_RGBA8888_REV;
- table[MESA_FORMAT_SIGNED_R16] = pack_float_SIGNED_R16;
- table[MESA_FORMAT_SIGNED_GR1616] = pack_float_SIGNED_GR1616;
- table[MESA_FORMAT_SIGNED_RGB_16] = pack_float_SIGNED_RGB_16;
- table[MESA_FORMAT_SIGNED_RGBA_16] = pack_float_SIGNED_RGBA_16;
- table[MESA_FORMAT_SIGNED_A8] = pack_float_SIGNED_A8;
- table[MESA_FORMAT_SIGNED_L8] = pack_float_SIGNED_L8;
- table[MESA_FORMAT_SIGNED_AL88] = pack_float_SIGNED_AL88;
- table[MESA_FORMAT_SIGNED_I8] = pack_float_SIGNED_L8; /* reused */
- table[MESA_FORMAT_SIGNED_A16] = pack_float_SIGNED_A16;
- table[MESA_FORMAT_SIGNED_L16] = pack_float_SIGNED_L16;
- table[MESA_FORMAT_SIGNED_AL1616] = pack_float_SIGNED_AL1616;
- table[MESA_FORMAT_SIGNED_I16] = pack_float_SIGNED_L16; /* reused */
+ table[MESA_FORMAT_RGBA_16_UNORM] = pack_float_RGBA_16;
+
+ table[MESA_FORMAT_R8_SNORM] = pack_float_SIGNED_R8;
+ table[MESA_FORMAT_RG88_REV_SNORM] = pack_float_SIGNED_RG88_REV;
+ table[MESA_FORMAT_RGBX8888_SNORM] = pack_float_SIGNED_RGBX8888;
+ table[MESA_FORMAT_RGBA8888_SNORM] = pack_float_SIGNED_RGBA8888;
+ table[MESA_FORMAT_RGBA8888_REV_SNORM] = pack_float_SIGNED_RGBA8888_REV;
+ table[MESA_FORMAT_R16_SNORM] = pack_float_SIGNED_R16;
+ table[MESA_FORMAT_GR1616_SNORM] = pack_float_SIGNED_GR1616;
+ table[MESA_FORMAT_RGB_16_SNORM] = pack_float_SIGNED_RGB_16;
+ table[MESA_FORMAT_RGBA_16_SNORM] = pack_float_SIGNED_RGBA_16;
+ table[MESA_FORMAT_A8_SNORM] = pack_float_SIGNED_A8;
+ table[MESA_FORMAT_L8_SNORM] = pack_float_SIGNED_L8;
+ table[MESA_FORMAT_AL88_SNORM] = pack_float_SIGNED_AL88;
+ table[MESA_FORMAT_I8_SNORM] = pack_float_SIGNED_L8; /* reused */
+ table[MESA_FORMAT_A16_SNORM] = pack_float_SIGNED_A16;
+ table[MESA_FORMAT_L16_SNORM] = pack_float_SIGNED_L16;
+ table[MESA_FORMAT_AL1616_SNORM] = pack_float_SIGNED_AL1616;
+ table[MESA_FORMAT_I16_SNORM] = 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;
@@ -2156,18 +2156,18 @@ get_pack_float_rgba_row_function(gl_format format)
*/
memset(table, 0, sizeof(table));
- table[MESA_FORMAT_RGBA8888] = pack_row_float_RGBA8888;
- table[MESA_FORMAT_RGBA8888_REV] = pack_row_float_RGBA8888_REV;
- table[MESA_FORMAT_ARGB8888] = pack_row_float_ARGB8888;
- table[MESA_FORMAT_ARGB8888_REV] = pack_row_float_ARGB8888_REV;
- table[MESA_FORMAT_RGBX8888] = pack_row_float_RGBA8888; /* reused */
- table[MESA_FORMAT_RGBX8888_REV] = pack_row_float_RGBA8888_REV; /* reused */
- table[MESA_FORMAT_XRGB8888] = pack_row_float_XRGB8888;
- table[MESA_FORMAT_XRGB8888_REV] = pack_row_float_XRGB8888_REV;
+ table[MESA_FORMAT_RGBA8888_UNORM] = pack_row_float_RGBA8888;
+ table[MESA_FORMAT_RGBA8888_REV_UNORM] = pack_row_float_RGBA8888_REV;
+ table[MESA_FORMAT_ARGB8888_UNORM] = pack_row_float_ARGB8888;
+ table[MESA_FORMAT_ARGB8888_REV_UNORM] = pack_row_float_ARGB8888_REV;
+ table[MESA_FORMAT_RGBX8888_UNORM] = pack_row_float_RGBA8888; /* reused */
+ table[MESA_FORMAT_RGBX8888_REV_UNORM] = pack_row_float_RGBA8888_REV; /* reused */
+ table[MESA_FORMAT_XRGB8888_UNORM] = pack_row_float_XRGB8888;
+ table[MESA_FORMAT_XRGB8888_REV_UNORM] = pack_row_float_XRGB8888_REV;
table[MESA_FORMAT_RGB888] = pack_row_float_RGB888;
table[MESA_FORMAT_BGR888] = pack_row_float_BGR888;
- table[MESA_FORMAT_RGB565] = pack_row_float_RGB565;
- table[MESA_FORMAT_RGB565_REV] = pack_row_float_RGB565_REV;
+ table[MESA_FORMAT_RGB565_UNORM] = pack_row_float_RGB565;
+ table[MESA_FORMAT_RGB565_REV_UNORM] = pack_row_float_RGB565_REV;
initialized = GL_TRUE;
}
@@ -2189,18 +2189,18 @@ get_pack_ubyte_rgba_row_function(gl_format format)
*/
memset(table, 0, sizeof(table));
- table[MESA_FORMAT_RGBA8888] = pack_row_ubyte_RGBA8888;
- table[MESA_FORMAT_RGBA8888_REV] = pack_row_ubyte_RGBA8888_REV;
- table[MESA_FORMAT_ARGB8888] = pack_row_ubyte_ARGB8888;
- table[MESA_FORMAT_ARGB8888_REV] = pack_row_ubyte_ARGB8888_REV;
- table[MESA_FORMAT_RGBX8888] = pack_row_ubyte_RGBA8888; /* reused */
- table[MESA_FORMAT_RGBX8888_REV] = pack_row_ubyte_RGBA8888_REV; /* reused */
- table[MESA_FORMAT_XRGB8888] = pack_row_ubyte_XRGB8888;
- table[MESA_FORMAT_XRGB8888_REV] = pack_row_ubyte_XRGB8888_REV;
+ table[MESA_FORMAT_RGBA8888_UNORM] = pack_row_ubyte_RGBA8888;
+ table[MESA_FORMAT_RGBA8888_REV_UNORM] = pack_row_ubyte_RGBA8888_REV;
+ table[MESA_FORMAT_ARGB8888_UNORM] = pack_row_ubyte_ARGB8888;
+ table[MESA_FORMAT_ARGB8888_REV_UNORM] = pack_row_ubyte_ARGB8888_REV;
+ table[MESA_FORMAT_RGBX8888_UNORM] = pack_row_ubyte_RGBA8888; /* reused */
+ table[MESA_FORMAT_RGBX8888_REV_UNORM] = pack_row_ubyte_RGBA8888_REV; /* reused */
+ table[MESA_FORMAT_XRGB8888_UNORM] = pack_row_ubyte_XRGB8888;
+ table[MESA_FORMAT_XRGB8888_REV_UNORM] = pack_row_ubyte_XRGB8888_REV;
table[MESA_FORMAT_RGB888] = pack_row_ubyte_RGB888;
table[MESA_FORMAT_BGR888] = pack_row_ubyte_BGR888;
- table[MESA_FORMAT_RGB565] = pack_row_ubyte_RGB565;
- table[MESA_FORMAT_RGB565_REV] = pack_row_ubyte_RGB565_REV;
+ table[MESA_FORMAT_RGB565_UNORM] = pack_row_ubyte_RGB565;
+ table[MESA_FORMAT_RGB565_REV_UNORM] = pack_row_ubyte_RGB565_REV;
initialized = GL_TRUE;
}
@@ -2369,15 +2369,15 @@ gl_pack_float_z_func
_mesa_get_pack_float_z_func(gl_format format)
{
switch (format) {
- case MESA_FORMAT_Z24_S8:
- case MESA_FORMAT_Z24_X8:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
+ case MESA_FORMAT_Z24_X8_UNORM:
return pack_float_z_Z24_S8;
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_X8_Z24:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
+ case MESA_FORMAT_X8_Z24_UNORM:
return pack_float_z_S8_Z24;
- case MESA_FORMAT_Z16:
+ case MESA_FORMAT_Z16_UNORM:
return pack_float_z_Z16;
- case MESA_FORMAT_Z32:
+ case MESA_FORMAT_Z32_UNORM:
return pack_float_z_Z32;
case MESA_FORMAT_Z32_FLOAT:
case MESA_FORMAT_Z32_FLOAT_X24S8:
@@ -2454,15 +2454,15 @@ gl_pack_uint_z_func
_mesa_get_pack_uint_z_func(gl_format format)
{
switch (format) {
- case MESA_FORMAT_Z24_S8:
- case MESA_FORMAT_Z24_X8:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
+ case MESA_FORMAT_Z24_X8_UNORM:
return pack_uint_z_Z24_S8;
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_X8_Z24:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
+ case MESA_FORMAT_X8_Z24_UNORM:
return pack_uint_z_S8_Z24;
- case MESA_FORMAT_Z16:
+ case MESA_FORMAT_Z16_UNORM:
return pack_uint_z_Z16;
- case MESA_FORMAT_Z32:
+ case MESA_FORMAT_Z32_UNORM:
return pack_uint_z_Z32;
case MESA_FORMAT_Z32_FLOAT:
return pack_uint_z_Z32_FLOAT;
@@ -2518,11 +2518,11 @@ gl_pack_ubyte_stencil_func
_mesa_get_pack_ubyte_stencil_func(gl_format format)
{
switch (format) {
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
return pack_ubyte_stencil_Z24_S8;
- case MESA_FORMAT_S8_Z24:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
return pack_ubyte_stencil_S8_Z24;
- case MESA_FORMAT_S8:
+ case MESA_FORMAT_S8_UNORM:
return pack_ubyte_stencil_S8;
case MESA_FORMAT_Z32_FLOAT_X24S8:
return pack_ubyte_stencil_Z32_FLOAT_X24S8;
@@ -2540,8 +2540,8 @@ _mesa_pack_float_z_row(gl_format format, GLuint n,
const GLfloat *src, void *dst)
{
switch (format) {
- case MESA_FORMAT_Z24_S8:
- case MESA_FORMAT_Z24_X8:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
+ case MESA_FORMAT_Z24_X8_UNORM:
{
/* don't disturb the stencil values */
GLuint *d = ((GLuint *) dst);
@@ -2555,8 +2555,8 @@ _mesa_pack_float_z_row(gl_format format, GLuint n,
}
}
break;
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_X8_Z24:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
+ case MESA_FORMAT_X8_Z24_UNORM:
{
/* don't disturb the stencil values */
GLuint *d = ((GLuint *) dst);
@@ -2570,7 +2570,7 @@ _mesa_pack_float_z_row(gl_format format, GLuint n,
}
}
break;
- case MESA_FORMAT_Z16:
+ case MESA_FORMAT_Z16_UNORM:
{
GLushort *d = ((GLushort *) dst);
const GLfloat scale = (GLfloat) 0xffff;
@@ -2580,7 +2580,7 @@ _mesa_pack_float_z_row(gl_format format, GLuint n,
}
}
break;
- case MESA_FORMAT_Z32:
+ case MESA_FORMAT_Z32_UNORM:
{
GLuint *d = ((GLuint *) dst);
const GLdouble scale = (GLdouble) 0xffffffff;
@@ -2616,8 +2616,8 @@ _mesa_pack_uint_z_row(gl_format format, GLuint n,
const GLuint *src, void *dst)
{
switch (format) {
- case MESA_FORMAT_Z24_S8:
- case MESA_FORMAT_Z24_X8:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
+ case MESA_FORMAT_Z24_X8_UNORM:
{
/* don't disturb the stencil values */
GLuint *d = ((GLuint *) dst);
@@ -2629,8 +2629,8 @@ _mesa_pack_uint_z_row(gl_format format, GLuint n,
}
}
break;
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_X8_Z24:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
+ case MESA_FORMAT_X8_Z24_UNORM:
{
/* don't disturb the stencil values */
GLuint *d = ((GLuint *) dst);
@@ -2642,7 +2642,7 @@ _mesa_pack_uint_z_row(gl_format format, GLuint n,
}
}
break;
- case MESA_FORMAT_Z16:
+ case MESA_FORMAT_Z16_UNORM:
{
GLushort *d = ((GLushort *) dst);
GLuint i;
@@ -2651,7 +2651,7 @@ _mesa_pack_uint_z_row(gl_format format, GLuint n,
}
}
break;
- case MESA_FORMAT_Z32:
+ case MESA_FORMAT_Z32_UNORM:
memcpy(dst, src, n * sizeof(GLfloat));
break;
case MESA_FORMAT_Z32_FLOAT:
@@ -2689,7 +2689,7 @@ _mesa_pack_ubyte_stencil_row(gl_format format, GLuint n,
const GLubyte *src, void *dst)
{
switch (format) {
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
{
/* don't disturb the Z values */
GLuint *d = ((GLuint *) dst);
@@ -2701,7 +2701,7 @@ _mesa_pack_ubyte_stencil_row(gl_format format, GLuint n,
}
}
break;
- case MESA_FORMAT_S8_Z24:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
{
/* don't disturb the Z values */
GLuint *d = ((GLuint *) dst);
@@ -2713,7 +2713,7 @@ _mesa_pack_ubyte_stencil_row(gl_format format, GLuint n,
}
}
break;
- case MESA_FORMAT_S8:
+ case MESA_FORMAT_S8_UNORM:
memcpy(dst, src, n * sizeof(GLubyte));
break;
case MESA_FORMAT_Z32_FLOAT_X24S8:
@@ -2739,10 +2739,10 @@ _mesa_pack_uint_24_8_depth_stencil_row(gl_format format, GLuint n,
const GLuint *src, void *dst)
{
switch (format) {
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
memcpy(dst, src, n * sizeof(GLuint));
break;
- case MESA_FORMAT_S8_Z24:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
{
GLuint *d = ((GLuint *) dst);
GLuint i;
diff --git a/src/mesa/main/format_unpack.c b/src/mesa/main/format_unpack.c
index 0a8b8b1..2624455 100644
--- a/src/mesa/main/format_unpack.c
+++ b/src/mesa/main/format_unpack.c
@@ -2281,53 +2281,53 @@ get_unpack_rgba_function(gl_format format)
if (!initialized) {
table[MESA_FORMAT_NONE] = NULL;
- table[MESA_FORMAT_RGBA8888] = unpack_RGBA8888;
- table[MESA_FORMAT_RGBA8888_REV] = unpack_RGBA8888_REV;
- table[MESA_FORMAT_ARGB8888] = unpack_ARGB8888;
- table[MESA_FORMAT_ARGB8888_REV] = unpack_ARGB8888_REV;
- table[MESA_FORMAT_RGBX8888] = unpack_RGBX8888;
- table[MESA_FORMAT_RGBX8888_REV] = unpack_RGBX8888_REV;
- table[MESA_FORMAT_XRGB8888] = unpack_XRGB8888;
- table[MESA_FORMAT_XRGB8888_REV] = unpack_XRGB8888_REV;
+ table[MESA_FORMAT_RGBA8888_UNORM] = unpack_RGBA8888;
+ table[MESA_FORMAT_RGBA8888_REV_UNORM] = unpack_RGBA8888_REV;
+ table[MESA_FORMAT_ARGB8888_UNORM] = unpack_ARGB8888;
+ table[MESA_FORMAT_ARGB8888_REV_UNORM] = unpack_ARGB8888_REV;
+ table[MESA_FORMAT_RGBX8888_UNORM] = unpack_RGBX8888;
+ table[MESA_FORMAT_RGBX8888_REV_UNORM] = unpack_RGBX8888_REV;
+ table[MESA_FORMAT_XRGB8888_UNORM] = unpack_XRGB8888;
+ table[MESA_FORMAT_XRGB8888_REV_UNORM] = unpack_XRGB8888_REV;
table[MESA_FORMAT_RGB888] = unpack_RGB888;
table[MESA_FORMAT_BGR888] = unpack_BGR888;
- table[MESA_FORMAT_RGB565] = unpack_RGB565;
- table[MESA_FORMAT_RGB565_REV] = unpack_RGB565_REV;
- table[MESA_FORMAT_ARGB4444] = unpack_ARGB4444;
- table[MESA_FORMAT_ARGB4444_REV] = unpack_ARGB4444_REV;
- table[MESA_FORMAT_RGBA5551] = unpack_RGBA5551;
- table[MESA_FORMAT_ARGB1555] = unpack_ARGB1555;
- table[MESA_FORMAT_ARGB1555_REV] = unpack_ARGB1555_REV;
- table[MESA_FORMAT_AL44] = unpack_AL44;
- table[MESA_FORMAT_AL88] = unpack_AL88;
- table[MESA_FORMAT_AL88_REV] = unpack_AL88_REV;
- table[MESA_FORMAT_AL1616] = unpack_AL1616;
- table[MESA_FORMAT_AL1616_REV] = unpack_AL1616_REV;
- table[MESA_FORMAT_RGB332] = unpack_RGB332;
- table[MESA_FORMAT_A8] = unpack_A8;
- table[MESA_FORMAT_A16] = unpack_A16;
- table[MESA_FORMAT_L8] = unpack_L8;
- table[MESA_FORMAT_L16] = unpack_L16;
- table[MESA_FORMAT_I8] = unpack_I8;
- table[MESA_FORMAT_I16] = unpack_I16;
+ table[MESA_FORMAT_RGB565_UNORM] = unpack_RGB565;
+ table[MESA_FORMAT_RGB565_REV_UNORM] = unpack_RGB565_REV;
+ table[MESA_FORMAT_ARGB4444_UNORM] = unpack_ARGB4444;
+ table[MESA_FORMAT_ARGB4444_REV_UNORM] = unpack_ARGB4444_REV;
+ table[MESA_FORMAT_RGBA5551_UNORM] = unpack_RGBA5551;
+ table[MESA_FORMAT_ARGB1555_UNORM] = unpack_ARGB1555;
+ table[MESA_FORMAT_ARGB1555_REV_UNORM] = unpack_ARGB1555_REV;
+ table[MESA_FORMAT_AL44_UNORM] = unpack_AL44;
+ table[MESA_FORMAT_AL88_UNORM] = unpack_AL88;
+ table[MESA_FORMAT_AL88_REV_UNORM] = unpack_AL88_REV;
+ table[MESA_FORMAT_AL1616_UNORM] = unpack_AL1616;
+ table[MESA_FORMAT_AL1616_REV_UNORM] = unpack_AL1616_REV;
+ table[MESA_FORMAT_RGB332_UNORM] = unpack_RGB332;
+ table[MESA_FORMAT_A8_UNORM] = unpack_A8;
+ table[MESA_FORMAT_A16_UNORM] = unpack_A16;
+ table[MESA_FORMAT_L8_UNORM] = unpack_L8;
+ table[MESA_FORMAT_L16_UNORM] = unpack_L16;
+ table[MESA_FORMAT_I8_UNORM] = unpack_I8;
+ table[MESA_FORMAT_I16_UNORM] = unpack_I16;
table[MESA_FORMAT_YCBCR] = unpack_YCBCR;
table[MESA_FORMAT_YCBCR_REV] = unpack_YCBCR_REV;
- table[MESA_FORMAT_R8] = unpack_R8;
- table[MESA_FORMAT_GR88] = unpack_GR88;
- table[MESA_FORMAT_RG88] = unpack_RG88;
- table[MESA_FORMAT_R16] = unpack_R16;
- table[MESA_FORMAT_GR1616] = unpack_GR1616;
- table[MESA_FORMAT_RG1616] = unpack_RG1616;
- table[MESA_FORMAT_ARGB2101010] = unpack_ARGB2101010;
+ table[MESA_FORMAT_R8_UNORM] = unpack_R8;
+ table[MESA_FORMAT_GR88_UNORM] = unpack_GR88;
+ table[MESA_FORMAT_RG88_UNORM] = unpack_RG88;
+ table[MESA_FORMAT_R16_UNORM] = unpack_R16;
+ table[MESA_FORMAT_GR1616_UNORM] = unpack_GR1616;
+ table[MESA_FORMAT_RG1616_UNORM] = unpack_RG1616;
+ table[MESA_FORMAT_ARGB2101010_UNORM] = 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_Z16] = unpack_Z16;
- table[MESA_FORMAT_X8_Z24] = unpack_X8_Z24;
- table[MESA_FORMAT_Z24_X8] = unpack_Z24_X8;
- table[MESA_FORMAT_Z32] = unpack_Z32;
- table[MESA_FORMAT_S8] = unpack_S8;
+ table[MESA_FORMAT_Z24_UNORM_S8_UINT] = unpack_Z24_S8;
+ table[MESA_FORMAT_S8_UINT_Z24_UNORM] = unpack_S8_Z24;
+ table[MESA_FORMAT_Z16_UNORM] = unpack_Z16;
+ table[MESA_FORMAT_X8_Z24_UNORM] = unpack_X8_Z24;
+ table[MESA_FORMAT_Z24_X8_UNORM] = unpack_Z24_X8;
+ table[MESA_FORMAT_Z32_UNORM] = unpack_Z32;
+ table[MESA_FORMAT_S8_UNORM] = unpack_S8;
table[MESA_FORMAT_SRGB8] = unpack_SRGB8;
table[MESA_FORMAT_SRGBA8] = unpack_SRGBA8;
table[MESA_FORMAT_SARGB8] = unpack_SARGB8;
@@ -2365,43 +2365,43 @@ get_unpack_rgba_function(gl_format format)
table[MESA_FORMAT_ALPHA_UINT8] = unpack_ALPHA_UINT8;
table[MESA_FORMAT_ALPHA_UINT16] = unpack_ALPHA_UINT16;
table[MESA_FORMAT_ALPHA_UINT32] = unpack_ALPHA_UINT32;
- table[MESA_FORMAT_ALPHA_INT8] = unpack_ALPHA_INT8;
- table[MESA_FORMAT_ALPHA_INT16] = unpack_ALPHA_INT16;
+ table[MESA_FORMAT_ALPHA_SINT8] = unpack_ALPHA_INT8;
+ table[MESA_FORMAT_ALPHA_SINT16] = unpack_ALPHA_INT16;
table[MESA_FORMAT_ALPHA_INT32] = unpack_ALPHA_INT32;
table[MESA_FORMAT_INTENSITY_UINT8] = unpack_INTENSITY_UINT8;
table[MESA_FORMAT_INTENSITY_UINT16] = unpack_INTENSITY_UINT16;
table[MESA_FORMAT_INTENSITY_UINT32] = unpack_INTENSITY_UINT32;
- table[MESA_FORMAT_INTENSITY_INT8] = unpack_INTENSITY_INT8;
- table[MESA_FORMAT_INTENSITY_INT16] = unpack_INTENSITY_INT16;
- table[MESA_FORMAT_INTENSITY_INT32] = unpack_INTENSITY_INT32;
+ table[MESA_FORMAT_INTENSITY_SINT8] = unpack_INTENSITY_INT8;
+ table[MESA_FORMAT_INTENSITY_SINT16] = unpack_INTENSITY_INT16;
+ table[MESA_FORMAT_INTENSITY_SINT32] = unpack_INTENSITY_INT32;
table[MESA_FORMAT_LUMINANCE_UINT8] = unpack_LUMINANCE_UINT8;
table[MESA_FORMAT_LUMINANCE_UINT16] = unpack_LUMINANCE_UINT16;
table[MESA_FORMAT_LUMINANCE_UINT32] = unpack_LUMINANCE_UINT32;
- table[MESA_FORMAT_LUMINANCE_INT8] = unpack_LUMINANCE_INT8;
+ table[MESA_FORMAT_LUMINANCE_SINT8] = unpack_LUMINANCE_INT8;
table[MESA_FORMAT_LUMINANCE_INT16] = unpack_LUMINANCE_INT16;
table[MESA_FORMAT_LUMINANCE_INT32] = unpack_LUMINANCE_INT32;
table[MESA_FORMAT_LUMINANCE_ALPHA_UINT8] = unpack_LUMINANCE_ALPHA_UINT8;
table[MESA_FORMAT_LUMINANCE_ALPHA_UINT16] = unpack_LUMINANCE_ALPHA_UINT16;
table[MESA_FORMAT_LUMINANCE_ALPHA_UINT32] = unpack_LUMINANCE_ALPHA_UINT32;
- table[MESA_FORMAT_LUMINANCE_ALPHA_INT8] = unpack_LUMINANCE_ALPHA_INT8;
- table[MESA_FORMAT_LUMINANCE_ALPHA_INT16] = unpack_LUMINANCE_ALPHA_INT16;
- table[MESA_FORMAT_LUMINANCE_ALPHA_INT32] = unpack_LUMINANCE_ALPHA_INT32;
-
- table[MESA_FORMAT_R_INT8] = unpack_R_INT8;
- table[MESA_FORMAT_RG_INT8] = unpack_RG_INT8;
- table[MESA_FORMAT_RGB_INT8] = unpack_RGB_INT8;
- table[MESA_FORMAT_RGBA_INT8] = unpack_RGBA_INT8;
- table[MESA_FORMAT_R_INT16] = unpack_R_INT16;
- table[MESA_FORMAT_RG_INT16] = unpack_RG_INT16;
- table[MESA_FORMAT_RGB_INT16] = unpack_RGB_INT16;
- table[MESA_FORMAT_RGBA_INT16] = unpack_RGBA_INT16;
- table[MESA_FORMAT_R_INT32] = unpack_R_INT32;
- table[MESA_FORMAT_RG_INT32] = unpack_RG_INT32;
- table[MESA_FORMAT_RGB_INT32] = unpack_RGB_INT32;
- table[MESA_FORMAT_RGBA_INT32] = unpack_RGBA_INT32;
+ table[MESA_FORMAT_LUMINANCE_ALPHA_SINT8] = unpack_LUMINANCE_ALPHA_INT8;
+ table[MESA_FORMAT_LUMINANCE_ALPHA_SINT16] = unpack_LUMINANCE_ALPHA_INT16;
+ table[MESA_FORMAT_LUMINANCE_ALPHA_SINT32] = unpack_LUMINANCE_ALPHA_INT32;
+
+ table[MESA_FORMAT_R_SINT8] = unpack_R_INT8;
+ table[MESA_FORMAT_RG_SINT8] = unpack_RG_INT8;
+ table[MESA_FORMAT_RGB_SINT8] = unpack_RGB_INT8;
+ table[MESA_FORMAT_RGBA_SINT8] = unpack_RGBA_INT8;
+ table[MESA_FORMAT_R_SINT16] = unpack_R_INT16;
+ table[MESA_FORMAT_RG_SINT16] = unpack_RG_INT16;
+ table[MESA_FORMAT_RGB_SINT16] = unpack_RGB_INT16;
+ table[MESA_FORMAT_RGBA_SINT16] = unpack_RGBA_INT16;
+ table[MESA_FORMAT_R_SINT32] = unpack_R_INT32;
+ table[MESA_FORMAT_RG_SINT32] = unpack_RG_INT32;
+ table[MESA_FORMAT_RGB_SINT32] = unpack_RGB_INT32;
+ table[MESA_FORMAT_RGBA_SINT32] = unpack_RGBA_INT32;
table[MESA_FORMAT_R_UINT8] = unpack_R_UINT8;
table[MESA_FORMAT_RG_UINT8] = unpack_RG_UINT8;
table[MESA_FORMAT_RGB_UINT8] = unpack_RGB_UINT8;
@@ -2416,16 +2416,16 @@ get_unpack_rgba_function(gl_format format)
table[MESA_FORMAT_RGBA_UINT32] = unpack_RGBA_UINT32;
table[MESA_FORMAT_DUDV8] = unpack_DUDV8;
- table[MESA_FORMAT_SIGNED_R8] = unpack_SIGNED_R8;
- table[MESA_FORMAT_SIGNED_RG88_REV] = unpack_SIGNED_RG88_REV;
- table[MESA_FORMAT_SIGNED_RGBX8888] = unpack_SIGNED_RGBX8888;
- table[MESA_FORMAT_SIGNED_RGBA8888] = unpack_SIGNED_RGBA8888;
- table[MESA_FORMAT_SIGNED_RGBA8888_REV] = unpack_SIGNED_RGBA8888_REV;
- table[MESA_FORMAT_SIGNED_R16] = unpack_SIGNED_R16;
- table[MESA_FORMAT_SIGNED_GR1616] = unpack_SIGNED_GR1616;
- table[MESA_FORMAT_SIGNED_RGB_16] = unpack_SIGNED_RGB_16;
- table[MESA_FORMAT_SIGNED_RGBA_16] = unpack_SIGNED_RGBA_16;
- table[MESA_FORMAT_RGBA_16] = unpack_RGBA_16;
+ table[MESA_FORMAT_R8_SNORM] = unpack_SIGNED_R8;
+ table[MESA_FORMAT_RG88_REV_SNORM] = unpack_SIGNED_RG88_REV;
+ table[MESA_FORMAT_RGBX8888_SNORM] = unpack_SIGNED_RGBX8888;
+ table[MESA_FORMAT_RGBA8888_SNORM] = unpack_SIGNED_RGBA8888;
+ table[MESA_FORMAT_RGBA8888_REV_SNORM] = unpack_SIGNED_RGBA8888_REV;
+ table[MESA_FORMAT_R16_SNORM] = unpack_SIGNED_R16;
+ table[MESA_FORMAT_GR1616_SNORM] = unpack_SIGNED_GR1616;
+ table[MESA_FORMAT_RGB_16_SNORM] = unpack_SIGNED_RGB_16;
+ table[MESA_FORMAT_RGBA_16_SNORM] = unpack_SIGNED_RGBA_16;
+ table[MESA_FORMAT_RGBA_16_UNORM] = unpack_RGBA_16;
table[MESA_FORMAT_RED_RGTC1] = unpack_RED_RGTC1;
table[MESA_FORMAT_SIGNED_RED_RGTC1] = unpack_SIGNED_RED_RGTC1;
@@ -2450,14 +2450,14 @@ get_unpack_rgba_function(gl_format format)
unpack_ETC2_RGB8_PUNCHTHROUGH_ALPHA1;
table[MESA_FORMAT_ETC2_SRGB8_PUNCHTHROUGH_ALPHA1] =
unpack_ETC2_SRGB8_PUNCHTHROUGH_ALPHA1;
- table[MESA_FORMAT_SIGNED_A8] = unpack_SIGNED_A8;
- table[MESA_FORMAT_SIGNED_L8] = unpack_SIGNED_L8;
- table[MESA_FORMAT_SIGNED_AL88] = unpack_SIGNED_AL88;
- table[MESA_FORMAT_SIGNED_I8] = unpack_SIGNED_I8;
- table[MESA_FORMAT_SIGNED_A16] = unpack_SIGNED_A16;
- table[MESA_FORMAT_SIGNED_L16] = unpack_SIGNED_L16;
- table[MESA_FORMAT_SIGNED_AL1616] = unpack_SIGNED_AL1616;
- table[MESA_FORMAT_SIGNED_I16] = unpack_SIGNED_I16;
+ table[MESA_FORMAT_A8_SNORM] = unpack_SIGNED_A8;
+ table[MESA_FORMAT_L8_SNORM] = unpack_SIGNED_L8;
+ table[MESA_FORMAT_AL88_SNORM] = unpack_SIGNED_AL88;
+ table[MESA_FORMAT_I8_SNORM] = unpack_SIGNED_I8;
+ table[MESA_FORMAT_A16_SNORM] = unpack_SIGNED_A16;
+ table[MESA_FORMAT_L16_SNORM] = unpack_SIGNED_L16;
+ table[MESA_FORMAT_AL1616_SNORM] = unpack_SIGNED_AL1616;
+ table[MESA_FORMAT_I16_SNORM] = 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;
@@ -2874,28 +2874,28 @@ _mesa_unpack_ubyte_rgba_row(gl_format format, GLuint n,
const void *src, GLubyte dst[][4])
{
switch (format) {
- case MESA_FORMAT_RGBA8888:
+ case MESA_FORMAT_RGBA8888_UNORM:
unpack_ubyte_RGBA8888(src, dst, n);
break;
- case MESA_FORMAT_RGBA8888_REV:
+ case MESA_FORMAT_RGBA8888_REV_UNORM:
unpack_ubyte_RGBA8888_REV(src, dst, n);
break;
- case MESA_FORMAT_ARGB8888:
+ case MESA_FORMAT_ARGB8888_UNORM:
unpack_ubyte_ARGB8888(src, dst, n);
break;
- case MESA_FORMAT_ARGB8888_REV:
+ case MESA_FORMAT_ARGB8888_REV_UNORM:
unpack_ubyte_ARGB8888_REV(src, dst, n);
break;
- case MESA_FORMAT_RGBX8888:
+ case MESA_FORMAT_RGBX8888_UNORM:
unpack_ubyte_RGBX8888(src, dst, n);
break;
- case MESA_FORMAT_RGBX8888_REV:
+ case MESA_FORMAT_RGBX8888_REV_UNORM:
unpack_ubyte_RGBX8888_REV(src, dst, n);
break;
- case MESA_FORMAT_XRGB8888:
+ case MESA_FORMAT_XRGB8888_UNORM:
unpack_ubyte_XRGB8888(src, dst, n);
break;
- case MESA_FORMAT_XRGB8888_REV:
+ case MESA_FORMAT_XRGB8888_REV_UNORM:
unpack_ubyte_XRGB8888_REV(src, dst, n);
break;
case MESA_FORMAT_RGB888:
@@ -2904,55 +2904,55 @@ _mesa_unpack_ubyte_rgba_row(gl_format format, GLuint n,
case MESA_FORMAT_BGR888:
unpack_ubyte_BGR888(src, dst, n);
break;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_RGB565_UNORM:
unpack_ubyte_RGB565(src, dst, n);
break;
- case MESA_FORMAT_RGB565_REV:
+ case MESA_FORMAT_RGB565_REV_UNORM:
unpack_ubyte_RGB565_REV(src, dst, n);
break;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_ARGB4444_UNORM:
unpack_ubyte_ARGB4444(src, dst, n);
break;
- case MESA_FORMAT_ARGB4444_REV:
+ case MESA_FORMAT_ARGB4444_REV_UNORM:
unpack_ubyte_ARGB4444_REV(src, dst, n);
break;
- case MESA_FORMAT_RGBA5551:
+ case MESA_FORMAT_RGBA5551_UNORM:
unpack_ubyte_RGBA5551(src, dst, n);
break;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_ARGB1555_UNORM:
unpack_ubyte_ARGB1555(src, dst, n);
break;
- case MESA_FORMAT_ARGB1555_REV:
+ case MESA_FORMAT_ARGB1555_REV_UNORM:
unpack_ubyte_ARGB1555_REV(src, dst, n);
break;
- case MESA_FORMAT_AL44:
+ case MESA_FORMAT_AL44_UNORM:
unpack_ubyte_AL44(src, dst, n);
break;
- case MESA_FORMAT_AL88:
+ case MESA_FORMAT_AL88_UNORM:
unpack_ubyte_AL88(src, dst, n);
break;
- case MESA_FORMAT_AL88_REV:
+ case MESA_FORMAT_AL88_REV_UNORM:
unpack_ubyte_AL88_REV(src, dst, n);
break;
- case MESA_FORMAT_RGB332:
+ case MESA_FORMAT_RGB332_UNORM:
unpack_ubyte_RGB332(src, dst, n);
break;
- case MESA_FORMAT_A8:
+ case MESA_FORMAT_A8_UNORM:
unpack_ubyte_A8(src, dst, n);
break;
- case MESA_FORMAT_L8:
+ case MESA_FORMAT_L8_UNORM:
unpack_ubyte_L8(src, dst, n);
break;
- case MESA_FORMAT_I8:
+ case MESA_FORMAT_I8_UNORM:
unpack_ubyte_I8(src, dst, n);
break;
- case MESA_FORMAT_R8:
+ case MESA_FORMAT_R8_UNORM:
unpack_ubyte_R8(src, dst, n);
break;
- case MESA_FORMAT_GR88:
+ case MESA_FORMAT_GR88_UNORM:
unpack_ubyte_GR88(src, dst, n);
break;
- case MESA_FORMAT_RG88:
+ case MESA_FORMAT_RG88_UNORM:
unpack_ubyte_RG88(src, dst, n);
break;
default:
@@ -3591,86 +3591,86 @@ _mesa_unpack_uint_rgba_row(gl_format format, GLuint n,
* make separate paths for 32-bit-to-32-bit integer unpack.
*/
case MESA_FORMAT_RGBA_UINT32:
- case MESA_FORMAT_RGBA_INT32:
+ case MESA_FORMAT_RGBA_SINT32:
unpack_int_rgba_RGBA_UINT32(src, dst, n);
break;
case MESA_FORMAT_RGBA_UINT16:
unpack_int_rgba_RGBA_UINT16(src, dst, n);
break;
- case MESA_FORMAT_RGBA_INT16:
+ case MESA_FORMAT_RGBA_SINT16:
unpack_int_rgba_RGBA_INT16(src, dst, n);
break;
case MESA_FORMAT_RGBA_UINT8:
unpack_int_rgba_RGBA_UINT8(src, dst, n);
break;
- case MESA_FORMAT_RGBA_INT8:
+ case MESA_FORMAT_RGBA_SINT8:
unpack_int_rgba_RGBA_INT8(src, dst, n);
break;
- case MESA_FORMAT_ARGB8888:
+ case MESA_FORMAT_ARGB8888_UNORM:
unpack_int_rgba_ARGB8888(src, dst, n);
break;
- case MESA_FORMAT_XRGB8888:
+ case MESA_FORMAT_XRGB8888_UNORM:
unpack_int_rgba_XRGB8888(src, dst, n);
break;
case MESA_FORMAT_RGB_UINT32:
- case MESA_FORMAT_RGB_INT32:
+ case MESA_FORMAT_RGB_SINT32:
unpack_int_rgba_RGB_UINT32(src, dst, n);
break;
case MESA_FORMAT_RGB_UINT16:
unpack_int_rgba_RGB_UINT16(src, dst, n);
break;
- case MESA_FORMAT_RGB_INT16:
+ case MESA_FORMAT_RGB_SINT16:
unpack_int_rgba_RGB_INT16(src, dst, n);
break;
case MESA_FORMAT_RGB_UINT8:
unpack_int_rgba_RGB_UINT8(src, dst, n);
break;
- case MESA_FORMAT_RGB_INT8:
+ case MESA_FORMAT_RGB_SINT8:
unpack_int_rgba_RGB_INT8(src, dst, n);
break;
case MESA_FORMAT_RG_UINT32:
- case MESA_FORMAT_RG_INT32:
+ case MESA_FORMAT_RG_SINT32:
unpack_int_rgba_RG_UINT32(src, dst, n);
break;
case MESA_FORMAT_RG_UINT16:
unpack_int_rgba_RG_UINT16(src, dst, n);
break;
- case MESA_FORMAT_RG_INT16:
+ case MESA_FORMAT_RG_SINT16:
unpack_int_rgba_RG_INT16(src, dst, n);
break;
case MESA_FORMAT_RG_UINT8:
unpack_int_rgba_RG_UINT8(src, dst, n);
break;
- case MESA_FORMAT_RG_INT8:
+ case MESA_FORMAT_RG_SINT8:
unpack_int_rgba_RG_INT8(src, dst, n);
break;
case MESA_FORMAT_R_UINT32:
- case MESA_FORMAT_R_INT32:
+ case MESA_FORMAT_R_SINT32:
unpack_int_rgba_R_UINT32(src, dst, n);
break;
case MESA_FORMAT_R_UINT16:
unpack_int_rgba_R_UINT16(src, dst, n);
break;
- case MESA_FORMAT_R_INT16:
+ case MESA_FORMAT_R_SINT16:
unpack_int_rgba_R_INT16(src, dst, n);
break;
case MESA_FORMAT_R_UINT8:
unpack_int_rgba_R_UINT8(src, dst, n);
break;
- case MESA_FORMAT_R_INT8:
+ case MESA_FORMAT_R_SINT8:
unpack_int_rgba_R_INT8(src, dst, n);
break;
@@ -3682,14 +3682,14 @@ _mesa_unpack_uint_rgba_row(gl_format format, GLuint n,
case MESA_FORMAT_ALPHA_UINT16:
unpack_int_rgba_ALPHA_UINT16(src, dst, n);
break;
- case MESA_FORMAT_ALPHA_INT16:
+ case MESA_FORMAT_ALPHA_SINT16:
unpack_int_rgba_ALPHA_INT16(src, dst, n);
break;
case MESA_FORMAT_ALPHA_UINT8:
unpack_int_rgba_ALPHA_UINT8(src, dst, n);
break;
- case MESA_FORMAT_ALPHA_INT8:
+ case MESA_FORMAT_ALPHA_SINT8:
unpack_int_rgba_ALPHA_INT8(src, dst, n);
break;
@@ -3707,45 +3707,45 @@ _mesa_unpack_uint_rgba_row(gl_format format, GLuint n,
case MESA_FORMAT_LUMINANCE_UINT8:
unpack_int_rgba_LUMINANCE_UINT8(src, dst, n);
break;
- case MESA_FORMAT_LUMINANCE_INT8:
+ case MESA_FORMAT_LUMINANCE_SINT8:
unpack_int_rgba_LUMINANCE_INT8(src, dst, n);
break;
case MESA_FORMAT_LUMINANCE_ALPHA_UINT32:
- case MESA_FORMAT_LUMINANCE_ALPHA_INT32:
+ case MESA_FORMAT_LUMINANCE_ALPHA_SINT32:
unpack_int_rgba_LUMINANCE_ALPHA_UINT32(src, dst, n);
break;
case MESA_FORMAT_LUMINANCE_ALPHA_UINT16:
unpack_int_rgba_LUMINANCE_ALPHA_UINT16(src, dst, n);
break;
- case MESA_FORMAT_LUMINANCE_ALPHA_INT16:
+ case MESA_FORMAT_LUMINANCE_ALPHA_SINT16:
unpack_int_rgba_LUMINANCE_ALPHA_INT16(src, dst, n);
break;
case MESA_FORMAT_LUMINANCE_ALPHA_UINT8:
unpack_int_rgba_LUMINANCE_ALPHA_UINT8(src, dst, n);
break;
- case MESA_FORMAT_LUMINANCE_ALPHA_INT8:
+ case MESA_FORMAT_LUMINANCE_ALPHA_SINT8:
unpack_int_rgba_LUMINANCE_ALPHA_INT8(src, dst, n);
break;
case MESA_FORMAT_INTENSITY_UINT32:
- case MESA_FORMAT_INTENSITY_INT32:
+ case MESA_FORMAT_INTENSITY_SINT32:
unpack_int_rgba_INTENSITY_UINT32(src, dst, n);
break;
case MESA_FORMAT_INTENSITY_UINT16:
unpack_int_rgba_INTENSITY_UINT16(src, dst, n);
break;
- case MESA_FORMAT_INTENSITY_INT16:
+ case MESA_FORMAT_INTENSITY_SINT16:
unpack_int_rgba_INTENSITY_INT16(src, dst, n);
break;
case MESA_FORMAT_INTENSITY_UINT8:
unpack_int_rgba_INTENSITY_UINT8(src, dst, n);
break;
- case MESA_FORMAT_INTENSITY_INT8:
+ case MESA_FORMAT_INTENSITY_SINT8:
unpack_int_rgba_INTENSITY_INT8(src, dst, n);
break;
@@ -3757,7 +3757,7 @@ _mesa_unpack_uint_rgba_row(gl_format format, GLuint n,
unpack_int_rgba_ABGR2101010_UINT(src, dst, n);
break;
- case MESA_FORMAT_ARGB2101010:
+ case MESA_FORMAT_ARGB2101010_UNORM:
unpack_int_rgba_ARGB2101010(src, dst, n);
break;
@@ -3909,18 +3909,18 @@ _mesa_unpack_float_z_row(gl_format format, GLuint n,
unpack_float_z_func unpack;
switch (format) {
- case MESA_FORMAT_Z24_S8:
- case MESA_FORMAT_Z24_X8:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
+ case MESA_FORMAT_Z24_X8_UNORM:
unpack = unpack_float_z_Z24_X8;
break;
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_X8_Z24:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
+ case MESA_FORMAT_X8_Z24_UNORM:
unpack = unpack_float_z_X8_Z24;
break;
- case MESA_FORMAT_Z16:
+ case MESA_FORMAT_Z16_UNORM:
unpack = unpack_float_z_Z16;
break;
- case MESA_FORMAT_Z32:
+ case MESA_FORMAT_Z32_UNORM:
unpack = unpack_float_z_Z32;
break;
case MESA_FORMAT_Z32_FLOAT:
@@ -4014,18 +4014,18 @@ _mesa_unpack_uint_z_row(gl_format format, GLuint n,
const GLubyte *srcPtr = (GLubyte *) src;
switch (format) {
- case MESA_FORMAT_Z24_S8:
- case MESA_FORMAT_Z24_X8:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
+ case MESA_FORMAT_Z24_X8_UNORM:
unpack = unpack_uint_z_Z24_X8;
break;
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_X8_Z24:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
+ case MESA_FORMAT_X8_Z24_UNORM:
unpack = unpack_uint_z_X8_Z24;
break;
- case MESA_FORMAT_Z16:
+ case MESA_FORMAT_Z16_UNORM:
unpack = unpack_uint_z_Z16;
break;
- case MESA_FORMAT_Z32:
+ case MESA_FORMAT_Z32_UNORM:
unpack = unpack_uint_z_Z32;
break;
case MESA_FORMAT_Z32_FLOAT:
@@ -4085,13 +4085,13 @@ _mesa_unpack_ubyte_stencil_row(gl_format format, GLuint n,
const void *src, GLubyte *dst)
{
switch (format) {
- case MESA_FORMAT_S8:
+ case MESA_FORMAT_S8_UNORM:
unpack_ubyte_s_S8(src, dst, n);
break;
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
unpack_ubyte_s_Z24_S8(src, dst, n);
break;
- case MESA_FORMAT_S8_Z24:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
unpack_ubyte_s_S8_Z24(src, dst, n);
break;
case MESA_FORMAT_Z32_FLOAT_X24S8:
@@ -4126,10 +4126,10 @@ _mesa_unpack_uint_24_8_depth_stencil_row(gl_format format, GLuint n,
const void *src, GLuint *dst)
{
switch (format) {
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
unpack_uint_24_8_depth_stencil_Z24_S8(src, dst, n);
break;
- case MESA_FORMAT_S8_Z24:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
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 07d2a72..878da8a 100644
--- a/src/mesa/main/formats.c
+++ b/src/mesa/main/formats.c
@@ -88,8 +88,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
0, 0, 0 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_RGBA8888, /* Name */
- "MESA_FORMAT_RGBA8888", /* StrName */
+ MESA_FORMAT_RGBA8888_UNORM, /* Name */
+ "MESA_FORMAT_RGBA8888_UNORM", /* StrName */
GL_RGBA, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
8, 8, 8, 8, /* Red/Green/Blue/AlphaBits */
@@ -97,8 +97,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_RGBA8888_REV, /* Name */
- "MESA_FORMAT_RGBA8888_REV", /* StrName */
+ MESA_FORMAT_RGBA8888_REV_UNORM, /* Name */
+ "MESA_FORMAT_RGBA8888_REV_UNORM", /* StrName */
GL_RGBA, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
8, 8, 8, 8, /* Red/Green/Blue/AlphaBits */
@@ -106,8 +106,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_ARGB8888, /* Name */
- "MESA_FORMAT_ARGB8888", /* StrName */
+ MESA_FORMAT_ARGB8888_UNORM, /* Name */
+ "MESA_FORMAT_ARGB8888_UNORM", /* StrName */
GL_RGBA, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
8, 8, 8, 8, /* Red/Green/Blue/AlphaBits */
@@ -115,8 +115,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_ARGB8888_REV, /* Name */
- "MESA_FORMAT_ARGB8888_REV", /* StrName */
+ MESA_FORMAT_ARGB8888_REV_UNORM, /* Name */
+ "MESA_FORMAT_ARGB8888_REV_UNORM", /* StrName */
GL_RGBA, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
8, 8, 8, 8, /* Red/Green/Blue/AlphaBits */
@@ -124,8 +124,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_RGBX8888, /* Name */
- "MESA_FORMAT_RGBX8888", /* StrName */
+ MESA_FORMAT_RGBX8888_UNORM, /* Name */
+ "MESA_FORMAT_RGBX8888_UNORM", /* StrName */
GL_RGB, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
8, 8, 8, 0, /* Red/Green/Blue/AlphaBits */
@@ -133,8 +133,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_RGBX8888_REV, /* Name */
- "MESA_FORMAT_RGBX8888_REV", /* StrName */
+ MESA_FORMAT_RGBX8888_REV_UNORM, /* Name */
+ "MESA_FORMAT_RGBX8888_REV_UNORM", /* StrName */
GL_RGB, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
8, 8, 8, 0, /* Red/Green/Blue/AlphaBits */
@@ -142,8 +142,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_XRGB8888, /* Name */
- "MESA_FORMAT_XRGB8888", /* StrName */
+ MESA_FORMAT_XRGB8888_UNORM, /* Name */
+ "MESA_FORMAT_XRGB8888_UNORM", /* StrName */
GL_RGB, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
8, 8, 8, 0, /* Red/Green/Blue/AlphaBits */
@@ -151,8 +151,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_XRGB8888_REV, /* Name */
- "MESA_FORMAT_XRGB8888_REV", /* StrName */
+ MESA_FORMAT_XRGB8888_REV_UNORM, /* Name */
+ "MESA_FORMAT_XRGB8888_REV_UNORM", /* StrName */
GL_RGB, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
8, 8, 8, 0, /* Red/Green/Blue/AlphaBits */
@@ -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_RGB565_UNORM, /* Name */
+ "MESA_FORMAT_RGB565_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_RGB565_REV_UNORM, /* Name */
+ "MESA_FORMAT_RGB565_REV_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_ARGB4444_UNORM, /* Name */
+ "MESA_FORMAT_ARGB4444_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_ARGB4444_REV_UNORM, /* Name */
+ "MESA_FORMAT_ARGB4444_REV_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_RGBA5551_UNORM, /* Name */
+ "MESA_FORMAT_RGBA5551_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_ARGB1555_UNORM, /* Name */
+ "MESA_FORMAT_ARGB1555_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_ARGB1555_REV_UNORM, /* Name */
+ "MESA_FORMAT_ARGB1555_REV_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_AL44_UNORM, /* Name */
+ "MESA_FORMAT_AL44_UNORM", /* StrName */
GL_LUMINANCE_ALPHA, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
0, 0, 0, 4, /* Red/Green/Blue/AlphaBits */
@@ -250,8 +250,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 1 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_AL88, /* Name */
- "MESA_FORMAT_AL88", /* StrName */
+ MESA_FORMAT_AL88_UNORM, /* Name */
+ "MESA_FORMAT_AL88_UNORM", /* StrName */
GL_LUMINANCE_ALPHA, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
0, 0, 0, 8, /* Red/Green/Blue/AlphaBits */
@@ -259,8 +259,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 2 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_AL88_REV, /* Name */
- "MESA_FORMAT_AL88_REV", /* StrName */
+ MESA_FORMAT_AL88_REV_UNORM, /* Name */
+ "MESA_FORMAT_AL88_REV_UNORM", /* StrName */
GL_LUMINANCE_ALPHA, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
0, 0, 0, 8, /* Red/Green/Blue/AlphaBits */
@@ -268,8 +268,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 2 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_AL1616, /* Name */
- "MESA_FORMAT_AL1616", /* StrName */
+ MESA_FORMAT_AL1616_UNORM, /* Name */
+ "MESA_FORMAT_AL1616_UNORM", /* StrName */
GL_LUMINANCE_ALPHA, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
0, 0, 0, 16, /* Red/Green/Blue/AlphaBits */
@@ -277,8 +277,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_AL1616_REV, /* Name */
- "MESA_FORMAT_AL1616_REV", /* StrName */
+ MESA_FORMAT_AL1616_REV_UNORM, /* Name */
+ "MESA_FORMAT_AL1616_REV_UNORM", /* StrName */
GL_LUMINANCE_ALPHA, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
0, 0, 0, 16, /* Red/Green/Blue/AlphaBits */
@@ -286,8 +286,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_RGB332, /* Name */
- "MESA_FORMAT_RGB332", /* StrName */
+ MESA_FORMAT_RGB332_UNORM, /* Name */
+ "MESA_FORMAT_RGB332_UNORM", /* StrName */
GL_RGB, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
3, 3, 2, 0, /* Red/Green/Blue/AlphaBits */
@@ -295,8 +295,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 1 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_A8, /* Name */
- "MESA_FORMAT_A8", /* StrName */
+ MESA_FORMAT_A8_UNORM, /* Name */
+ "MESA_FORMAT_A8_UNORM", /* StrName */
GL_ALPHA, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
0, 0, 0, 8, /* Red/Green/Blue/AlphaBits */
@@ -304,8 +304,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 1 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_A16, /* Name */
- "MESA_FORMAT_A16", /* StrName */
+ MESA_FORMAT_A16_UNORM, /* Name */
+ "MESA_FORMAT_A16_UNORM", /* StrName */
GL_ALPHA, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
0, 0, 0, 16, /* Red/Green/Blue/AlphaBits */
@@ -313,8 +313,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 2 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_L8, /* Name */
- "MESA_FORMAT_L8", /* StrName */
+ MESA_FORMAT_L8_UNORM, /* Name */
+ "MESA_FORMAT_L8_UNORM", /* StrName */
GL_LUMINANCE, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
0, 0, 0, 0, /* Red/Green/Blue/AlphaBits */
@@ -322,8 +322,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 1 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_L16, /* Name */
- "MESA_FORMAT_L16", /* StrName */
+ MESA_FORMAT_L16_UNORM, /* Name */
+ "MESA_FORMAT_L16_UNORM", /* StrName */
GL_LUMINANCE, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
0, 0, 0, 0, /* Red/Green/Blue/AlphaBits */
@@ -331,8 +331,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 2 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_I8, /* Name */
- "MESA_FORMAT_I8", /* StrName */
+ MESA_FORMAT_I8_UNORM, /* Name */
+ "MESA_FORMAT_I8_UNORM", /* StrName */
GL_INTENSITY, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
0, 0, 0, 0, /* Red/Green/Blue/AlphaBits */
@@ -340,8 +340,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 1 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_I16, /* Name */
- "MESA_FORMAT_I16", /* StrName */
+ MESA_FORMAT_I16_UNORM, /* Name */
+ "MESA_FORMAT_I16_UNORM", /* StrName */
GL_INTENSITY, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
0, 0, 0, 0, /* Red/Green/Blue/AlphaBits */
@@ -367,8 +367,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 2 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_R8,
- "MESA_FORMAT_R8",
+ MESA_FORMAT_R8_UNORM,
+ "MESA_FORMAT_R8_UNORM",
GL_RED,
GL_UNSIGNED_NORMALIZED,
8, 0, 0, 0,
@@ -376,8 +376,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 1
},
{
- MESA_FORMAT_GR88,
- "MESA_FORMAT_GR88",
+ MESA_FORMAT_GR88_UNORM,
+ "MESA_FORMAT_GR88_UNORM",
GL_RG,
GL_UNSIGNED_NORMALIZED,
8, 8, 0, 0,
@@ -385,8 +385,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 2
},
{
- MESA_FORMAT_RG88,
- "MESA_FORMAT_RG88",
+ MESA_FORMAT_RG88_UNORM,
+ "MESA_FORMAT_RG88_UNORM",
GL_RG,
GL_UNSIGNED_NORMALIZED,
8, 8, 0, 0,
@@ -394,8 +394,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 2
},
{
- MESA_FORMAT_R16,
- "MESA_FORMAT_R16",
+ MESA_FORMAT_R16_UNORM,
+ "MESA_FORMAT_R16_UNORM",
GL_RED,
GL_UNSIGNED_NORMALIZED,
16, 0, 0, 0,
@@ -403,8 +403,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 2
},
{
- MESA_FORMAT_GR1616,
- "MESA_FORMAT_GR1616",
+ MESA_FORMAT_GR1616_UNORM,
+ "MESA_FORMAT_GR1616_UNORM",
GL_RG,
GL_UNSIGNED_NORMALIZED,
16, 16, 0, 0,
@@ -412,8 +412,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4
},
{
- MESA_FORMAT_RG1616,
- "MESA_FORMAT_RG1616",
+ MESA_FORMAT_RG1616_UNORM,
+ "MESA_FORMAT_RG1616_UNORM",
GL_RG,
GL_UNSIGNED_NORMALIZED,
16, 16, 0, 0,
@@ -421,8 +421,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4
},
{
- MESA_FORMAT_ARGB2101010,
- "MESA_FORMAT_ARGB2101010",
+ MESA_FORMAT_ARGB2101010_UNORM,
+ "MESA_FORMAT_ARGB2101010_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_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 */
@@ -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_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 */
@@ -448,8 +448,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_Z16, /* Name */
- "MESA_FORMAT_Z16", /* StrName */
+ MESA_FORMAT_Z16_UNORM, /* Name */
+ "MESA_FORMAT_Z16_UNORM", /* StrName */
GL_DEPTH_COMPONENT, /* 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_X8_Z24_UNORM, /* Name */
+ "MESA_FORMAT_X8_Z24_UNORM", /* 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_Z24_X8_UNORM, /* Name */
+ "MESA_FORMAT_Z24_X8_UNORM", /* StrName */
GL_DEPTH_COMPONENT, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
0, 0, 0, 0, /* Red/Green/Blue/AlphaBits */
@@ -475,8 +475,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_Z32, /* Name */
- "MESA_FORMAT_Z32", /* StrName */
+ MESA_FORMAT_Z32_UNORM, /* Name */
+ "MESA_FORMAT_Z32_UNORM", /* StrName */
GL_DEPTH_COMPONENT, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
0, 0, 0, 0, /* Red/Green/Blue/AlphaBits */
@@ -484,8 +484,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_S8, /* Name */
- "MESA_FORMAT_S8", /* StrName */
+ MESA_FORMAT_S8_UNORM, /* Name */
+ "MESA_FORMAT_S8_UNORM", /* StrName */
GL_STENCIL_INDEX, /* BaseFormat */
GL_UNSIGNED_INT, /* DataType */
0, 0, 0, 0, /* Red/Green/Blue/AlphaBits */
@@ -804,8 +804,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4
},
{
- MESA_FORMAT_ALPHA_INT8,
- "MESA_FORMAT_ALPHA_INT8",
+ MESA_FORMAT_ALPHA_SINT8,
+ "MESA_FORMAT_ALPHA_SINT8",
GL_ALPHA,
GL_INT,
0, 0, 0, 8,
@@ -813,8 +813,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 1
},
{
- MESA_FORMAT_ALPHA_INT16,
- "MESA_FORMAT_ALPHA_INT16",
+ MESA_FORMAT_ALPHA_SINT16,
+ "MESA_FORMAT_ALPHA_SINT16",
GL_ALPHA,
GL_INT,
0, 0, 0, 16,
@@ -858,8 +858,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4
},
{
- MESA_FORMAT_INTENSITY_INT8,
- "MESA_FORMAT_INTENSITY_INT8",
+ MESA_FORMAT_INTENSITY_SINT8,
+ "MESA_FORMAT_INTENSITY_SINT8",
GL_INTENSITY,
GL_INT,
0, 0, 0, 0,
@@ -867,8 +867,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 1
},
{
- MESA_FORMAT_INTENSITY_INT16,
- "MESA_FORMAT_INTENSITY_INT16",
+ MESA_FORMAT_INTENSITY_SINT16,
+ "MESA_FORMAT_INTENSITY_SINT16",
GL_INTENSITY,
GL_INT,
0, 0, 0, 0,
@@ -876,8 +876,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 2
},
{
- MESA_FORMAT_INTENSITY_INT32,
- "MESA_FORMAT_INTENSITY_INT32",
+ MESA_FORMAT_INTENSITY_SINT32,
+ "MESA_FORMAT_INTENSITY_SINT32",
GL_INTENSITY,
GL_INT,
0, 0, 0, 0,
@@ -912,8 +912,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4
},
{
- MESA_FORMAT_LUMINANCE_INT8,
- "MESA_FORMAT_LUMINANCE_INT8",
+ MESA_FORMAT_LUMINANCE_SINT8,
+ "MESA_FORMAT_LUMINANCE_SINT8",
GL_LUMINANCE,
GL_INT,
0, 0, 0, 0,
@@ -966,8 +966,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 8
},
{
- MESA_FORMAT_LUMINANCE_ALPHA_INT8,
- "MESA_FORMAT_LUMINANCE_ALPHA_INT8",
+ MESA_FORMAT_LUMINANCE_ALPHA_SINT8,
+ "MESA_FORMAT_LUMINANCE_ALPHA_SINT8",
GL_LUMINANCE_ALPHA,
GL_INT,
0, 0, 0, 8,
@@ -975,8 +975,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 2
},
{
- MESA_FORMAT_LUMINANCE_ALPHA_INT16,
- "MESA_FORMAT_LUMINANCE_ALPHA_INT16",
+ MESA_FORMAT_LUMINANCE_ALPHA_SINT16,
+ "MESA_FORMAT_LUMINANCE_ALPHA_SINT16",
GL_LUMINANCE_ALPHA,
GL_INT,
0, 0, 0, 16,
@@ -984,8 +984,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4
},
{
- MESA_FORMAT_LUMINANCE_ALPHA_INT32,
- "MESA_FORMAT_LUMINANCE_ALPHA_INT32",
+ MESA_FORMAT_LUMINANCE_ALPHA_SINT32,
+ "MESA_FORMAT_LUMINANCE_ALPHA_SINT32",
GL_LUMINANCE_ALPHA,
GL_INT,
0, 0, 0, 32,
@@ -994,8 +994,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
},
{
- MESA_FORMAT_R_INT8,
- "MESA_FORMAT_R_INT8",
+ MESA_FORMAT_R_SINT8,
+ "MESA_FORMAT_R_SINT8",
GL_RED,
GL_INT,
8, 0, 0, 0,
@@ -1003,8 +1003,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 1
},
{
- MESA_FORMAT_RG_INT8,
- "MESA_FORMAT_RG_INT8",
+ MESA_FORMAT_RG_SINT8,
+ "MESA_FORMAT_RG_SINT8",
GL_RG,
GL_INT,
8, 8, 0, 0,
@@ -1012,8 +1012,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 2
},
{
- MESA_FORMAT_RGB_INT8,
- "MESA_FORMAT_RGB_INT8",
+ MESA_FORMAT_RGB_SINT8,
+ "MESA_FORMAT_RGB_SINT8",
GL_RGB,
GL_INT,
8, 8, 8, 0,
@@ -1021,8 +1021,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 3
},
{
- MESA_FORMAT_RGBA_INT8,
- "MESA_FORMAT_RGBA_INT8",
+ MESA_FORMAT_RGBA_SINT8,
+ "MESA_FORMAT_RGBA_SINT8",
GL_RGBA,
GL_INT,
8, 8, 8, 8,
@@ -1030,8 +1030,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4
},
{
- MESA_FORMAT_R_INT16,
- "MESA_FORMAT_R_INT16",
+ MESA_FORMAT_R_SINT16,
+ "MESA_FORMAT_R_SINT16",
GL_RED,
GL_INT,
16, 0, 0, 0,
@@ -1039,8 +1039,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 2
},
{
- MESA_FORMAT_RG_INT16,
- "MESA_FORMAT_RG_INT16",
+ MESA_FORMAT_RG_SINT16,
+ "MESA_FORMAT_RG_SINT16",
GL_RG,
GL_INT,
16, 16, 0, 0,
@@ -1048,8 +1048,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4
},
{
- MESA_FORMAT_RGB_INT16,
- "MESA_FORMAT_RGB_INT16",
+ MESA_FORMAT_RGB_SINT16,
+ "MESA_FORMAT_RGB_SINT16",
GL_RGB,
GL_INT,
16, 16, 16, 0,
@@ -1057,8 +1057,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 6
},
{
- MESA_FORMAT_RGBA_INT16,
- "MESA_FORMAT_RGBA_INT16",
+ MESA_FORMAT_RGBA_SINT16,
+ "MESA_FORMAT_RGBA_SINT16",
GL_RGBA,
GL_INT,
16, 16, 16, 16,
@@ -1066,8 +1066,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 8
},
{
- MESA_FORMAT_R_INT32,
- "MESA_FORMAT_R_INT32",
+ MESA_FORMAT_R_SINT32,
+ "MESA_FORMAT_R_SINT32",
GL_RED,
GL_INT,
32, 0, 0, 0,
@@ -1075,8 +1075,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4
},
{
- MESA_FORMAT_RG_INT32,
- "MESA_FORMAT_RG_INT32",
+ MESA_FORMAT_RG_SINT32,
+ "MESA_FORMAT_RG_SINT32",
GL_RG,
GL_INT,
32, 32, 0, 0,
@@ -1084,8 +1084,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 8
},
{
- MESA_FORMAT_RGB_INT32,
- "MESA_FORMAT_RGB_INT32",
+ MESA_FORMAT_RGB_SINT32,
+ "MESA_FORMAT_RGB_SINT32",
GL_RGB,
GL_INT,
32, 32, 32, 0,
@@ -1093,8 +1093,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 12
},
{
- MESA_FORMAT_RGBA_INT32,
- "MESA_FORMAT_RGBA_INT32",
+ MESA_FORMAT_RGBA_SINT32,
+ "MESA_FORMAT_RGBA_SINT32",
GL_RGBA,
GL_INT,
32, 32, 32, 32,
@@ -1223,8 +1223,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
/* Signed 8 bits / channel */
{
- MESA_FORMAT_SIGNED_R8, /* Name */
- "MESA_FORMAT_SIGNED_R8", /* StrName */
+ MESA_FORMAT_R8_SNORM, /* Name */
+ "MESA_FORMAT_R8_SNORM", /* StrName */
GL_RED, /* BaseFormat */
GL_SIGNED_NORMALIZED, /* DataType */
8, 0, 0, 0, /* Red/Green/Blue/AlphaBits */
@@ -1232,8 +1232,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 1 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_SIGNED_RG88_REV,
- "MESA_FORMAT_SIGNED_RG88_REV",
+ MESA_FORMAT_RG88_REV_SNORM,
+ "MESA_FORMAT_RG88_REV_SNORM",
GL_RG,
GL_SIGNED_NORMALIZED,
8, 8, 0, 0,
@@ -1241,8 +1241,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 2
},
{
- MESA_FORMAT_SIGNED_RGBX8888,
- "MESA_FORMAT_SIGNED_RGBX8888",
+ MESA_FORMAT_RGBX8888_SNORM,
+ "MESA_FORMAT_RGBX8888_SNORM",
GL_RGB,
GL_SIGNED_NORMALIZED,
8, 8, 8, 0,
@@ -1250,8 +1250,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4 /* 4 bpp, but no alpha */
},
{
- MESA_FORMAT_SIGNED_RGBA8888,
- "MESA_FORMAT_SIGNED_RGBA8888",
+ MESA_FORMAT_RGBA8888_SNORM,
+ "MESA_FORMAT_RGBA8888_SNORM",
GL_RGBA,
GL_SIGNED_NORMALIZED,
8, 8, 8, 8,
@@ -1259,8 +1259,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4
},
{
- MESA_FORMAT_SIGNED_RGBA8888_REV,
- "MESA_FORMAT_SIGNED_RGBA8888_REV",
+ MESA_FORMAT_RGBA8888_REV_SNORM,
+ "MESA_FORMAT_RGBA8888_REV_SNORM",
GL_RGBA,
GL_SIGNED_NORMALIZED,
8, 8, 8, 8,
@@ -1270,8 +1270,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
/* Signed 16 bits / channel */
{
- MESA_FORMAT_SIGNED_R16,
- "MESA_FORMAT_SIGNED_R16",
+ MESA_FORMAT_R16_SNORM,
+ "MESA_FORMAT_R16_SNORM",
GL_RED,
GL_SIGNED_NORMALIZED,
16, 0, 0, 0,
@@ -1279,8 +1279,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 2
},
{
- MESA_FORMAT_SIGNED_GR1616,
- "MESA_FORMAT_SIGNED_GR1616",
+ MESA_FORMAT_GR1616_SNORM,
+ "MESA_FORMAT_GR1616_SNORM",
GL_RG,
GL_SIGNED_NORMALIZED,
16, 16, 0, 0,
@@ -1288,8 +1288,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4
},
{
- MESA_FORMAT_SIGNED_RGB_16,
- "MESA_FORMAT_SIGNED_RGB_16",
+ MESA_FORMAT_RGB_16_SNORM,
+ "MESA_FORMAT_RGB_16_SNORM",
GL_RGB,
GL_SIGNED_NORMALIZED,
16, 16, 16, 0,
@@ -1297,8 +1297,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 6
},
{
- MESA_FORMAT_SIGNED_RGBA_16,
- "MESA_FORMAT_SIGNED_RGBA_16",
+ MESA_FORMAT_RGBA_16_SNORM,
+ "MESA_FORMAT_RGBA_16_SNORM",
GL_RGBA,
GL_SIGNED_NORMALIZED,
16, 16, 16, 16,
@@ -1306,8 +1306,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 8
},
{
- MESA_FORMAT_RGBA_16,
- "MESA_FORMAT_RGBA_16",
+ MESA_FORMAT_RGBA_16_UNORM,
+ "MESA_FORMAT_RGBA_16_UNORM",
GL_RGBA,
GL_UNSIGNED_NORMALIZED,
16, 16, 16, 16,
@@ -1499,8 +1499,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
/* Signed formats from EXT_texture_snorm that are not in GL3.1 */
{
- MESA_FORMAT_SIGNED_A8,
- "MESA_FORMAT_SIGNED_A8",
+ MESA_FORMAT_A8_SNORM,
+ "MESA_FORMAT_A8_SNORM",
GL_ALPHA,
GL_SIGNED_NORMALIZED,
0, 0, 0, 8,
@@ -1508,8 +1508,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 1
},
{
- MESA_FORMAT_SIGNED_L8,
- "MESA_FORMAT_SIGNED_L8",
+ MESA_FORMAT_L8_SNORM,
+ "MESA_FORMAT_L8_SNORM",
GL_LUMINANCE,
GL_SIGNED_NORMALIZED,
0, 0, 0, 0,
@@ -1517,8 +1517,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 1
},
{
- MESA_FORMAT_SIGNED_AL88,
- "MESA_FORMAT_SIGNED_AL88",
+ MESA_FORMAT_AL88_SNORM,
+ "MESA_FORMAT_AL88_SNORM",
GL_LUMINANCE_ALPHA,
GL_SIGNED_NORMALIZED,
0, 0, 0, 8,
@@ -1526,8 +1526,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 2
},
{
- MESA_FORMAT_SIGNED_I8,
- "MESA_FORMAT_SIGNED_I8",
+ MESA_FORMAT_I8_SNORM,
+ "MESA_FORMAT_I8_SNORM",
GL_INTENSITY,
GL_SIGNED_NORMALIZED,
0, 0, 0, 0,
@@ -1535,8 +1535,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 1
},
{
- MESA_FORMAT_SIGNED_A16,
- "MESA_FORMAT_SIGNED_A16",
+ MESA_FORMAT_A16_SNORM,
+ "MESA_FORMAT_A16_SNORM",
GL_ALPHA,
GL_SIGNED_NORMALIZED,
0, 0, 0, 16,
@@ -1544,8 +1544,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 2
},
{
- MESA_FORMAT_SIGNED_L16,
- "MESA_FORMAT_SIGNED_L16",
+ MESA_FORMAT_L16_SNORM,
+ "MESA_FORMAT_L16_SNORM",
GL_LUMINANCE,
GL_SIGNED_NORMALIZED,
0, 0, 0, 0,
@@ -1553,8 +1553,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 2
},
{
- MESA_FORMAT_SIGNED_AL1616,
- "MESA_FORMAT_SIGNED_AL1616",
+ MESA_FORMAT_AL1616_SNORM,
+ "MESA_FORMAT_AL1616_SNORM",
GL_LUMINANCE_ALPHA,
GL_SIGNED_NORMALIZED,
0, 0, 0, 16,
@@ -1562,8 +1562,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4
},
{
- MESA_FORMAT_SIGNED_I16,
- "MESA_FORMAT_SIGNED_I16",
+ MESA_FORMAT_I16_SNORM,
+ "MESA_FORMAT_I16_SNORM",
GL_INTENSITY,
GL_SIGNED_NORMALIZED,
0, 0, 0, 0,
@@ -2004,16 +2004,16 @@ _mesa_get_srgb_format_linear(gl_format format)
format = MESA_FORMAT_RGB888;
break;
case MESA_FORMAT_SRGBA8:
- format = MESA_FORMAT_RGBA8888;
+ format = MESA_FORMAT_RGBA8888_UNORM;
break;
case MESA_FORMAT_SARGB8:
- format = MESA_FORMAT_ARGB8888;
+ format = MESA_FORMAT_ARGB8888_UNORM;
break;
case MESA_FORMAT_SL8:
- format = MESA_FORMAT_L8;
+ format = MESA_FORMAT_L8_UNORM;
break;
case MESA_FORMAT_SLA8:
- format = MESA_FORMAT_AL88;
+ format = MESA_FORMAT_AL88_UNORM;
break;
case MESA_FORMAT_SRGB_DXT1:
format = MESA_FORMAT_RGB_DXT1;
@@ -2028,7 +2028,7 @@ _mesa_get_srgb_format_linear(gl_format format)
format = MESA_FORMAT_RGBA_DXT5;
break;
case MESA_FORMAT_XBGR8888_SRGB:
- format = MESA_FORMAT_RGBX8888_REV;
+ format = MESA_FORMAT_RGBX8888_REV_UNORM;
break;
default:
break;
@@ -2048,35 +2048,35 @@ _mesa_get_uncompressed_format(gl_format format)
case MESA_FORMAT_RGB_FXT1:
return MESA_FORMAT_RGB888;
case MESA_FORMAT_RGBA_FXT1:
- return MESA_FORMAT_RGBA8888;
+ return MESA_FORMAT_RGBA8888_UNORM;
case MESA_FORMAT_RGB_DXT1:
case MESA_FORMAT_SRGB_DXT1:
return MESA_FORMAT_RGB888;
case MESA_FORMAT_RGBA_DXT1:
case MESA_FORMAT_SRGBA_DXT1:
- return MESA_FORMAT_RGBA8888;
+ return MESA_FORMAT_RGBA8888_UNORM;
case MESA_FORMAT_RGBA_DXT3:
case MESA_FORMAT_SRGBA_DXT3:
- return MESA_FORMAT_RGBA8888;
+ return MESA_FORMAT_RGBA8888_UNORM;
case MESA_FORMAT_RGBA_DXT5:
case MESA_FORMAT_SRGBA_DXT5:
- return MESA_FORMAT_RGBA8888;
+ return MESA_FORMAT_RGBA8888_UNORM;
case MESA_FORMAT_RED_RGTC1:
- return MESA_FORMAT_R8;
+ return MESA_FORMAT_R8_UNORM;
case MESA_FORMAT_SIGNED_RED_RGTC1:
- return MESA_FORMAT_SIGNED_R8;
+ return MESA_FORMAT_R8_SNORM;
case MESA_FORMAT_RG_RGTC2:
- return MESA_FORMAT_GR88;
+ return MESA_FORMAT_GR88_UNORM;
case MESA_FORMAT_SIGNED_RG_RGTC2:
- return MESA_FORMAT_SIGNED_RG88_REV;
+ return MESA_FORMAT_RG88_REV_SNORM;
case MESA_FORMAT_L_LATC1:
- return MESA_FORMAT_L8;
+ return MESA_FORMAT_L8_UNORM;
case MESA_FORMAT_SIGNED_L_LATC1:
- return MESA_FORMAT_SIGNED_L8;
+ return MESA_FORMAT_L8_SNORM;
case MESA_FORMAT_LA_LATC2:
- return MESA_FORMAT_AL88;
+ return MESA_FORMAT_AL88_UNORM;
case MESA_FORMAT_SIGNED_LA_LATC2:
- return MESA_FORMAT_SIGNED_AL88;
+ return MESA_FORMAT_AL88_SNORM;
case MESA_FORMAT_ETC1_RGB8:
case MESA_FORMAT_ETC2_RGB8:
case MESA_FORMAT_ETC2_SRGB8:
@@ -2085,13 +2085,13 @@ _mesa_get_uncompressed_format(gl_format format)
case MESA_FORMAT_ETC2_SRGB8_ALPHA8_EAC:
case MESA_FORMAT_ETC2_RGB8_PUNCHTHROUGH_ALPHA1:
case MESA_FORMAT_ETC2_SRGB8_PUNCHTHROUGH_ALPHA1:
- return MESA_FORMAT_RGBA8888;
+ return MESA_FORMAT_RGBA8888_UNORM;
case MESA_FORMAT_ETC2_R11_EAC:
case MESA_FORMAT_ETC2_SIGNED_R11_EAC:
- return MESA_FORMAT_R16;
+ return MESA_FORMAT_R16_UNORM;
case MESA_FORMAT_ETC2_RG11_EAC:
case MESA_FORMAT_ETC2_SIGNED_RG11_EAC:
- return MESA_FORMAT_GR1616;
+ return MESA_FORMAT_GR1616_UNORM;
default:
#ifdef DEBUG
assert(!_mesa_is_format_compressed(format));
@@ -2313,14 +2313,14 @@ _mesa_format_to_type_and_comps(gl_format format,
GLenum *datatype, GLuint *comps)
{
switch (format) {
- case MESA_FORMAT_RGBA8888:
- case MESA_FORMAT_RGBA8888_REV:
- case MESA_FORMAT_ARGB8888:
- case MESA_FORMAT_ARGB8888_REV:
- case MESA_FORMAT_RGBX8888:
- case MESA_FORMAT_RGBX8888_REV:
- case MESA_FORMAT_XRGB8888:
- case MESA_FORMAT_XRGB8888_REV:
+ case MESA_FORMAT_RGBA8888_UNORM:
+ case MESA_FORMAT_RGBA8888_REV_UNORM:
+ case MESA_FORMAT_ARGB8888_UNORM:
+ case MESA_FORMAT_ARGB8888_REV_UNORM:
+ case MESA_FORMAT_RGBX8888_UNORM:
+ case MESA_FORMAT_RGBX8888_REV_UNORM:
+ case MESA_FORMAT_XRGB8888_UNORM:
+ case MESA_FORMAT_XRGB8888_REV_UNORM:
*datatype = GL_UNSIGNED_BYTE;
*comps = 4;
return;
@@ -2329,75 +2329,75 @@ _mesa_format_to_type_and_comps(gl_format format,
*datatype = GL_UNSIGNED_BYTE;
*comps = 3;
return;
- case MESA_FORMAT_RGB565:
- case MESA_FORMAT_RGB565_REV:
+ case MESA_FORMAT_RGB565_UNORM:
+ case MESA_FORMAT_RGB565_REV_UNORM:
*datatype = GL_UNSIGNED_SHORT_5_6_5;
*comps = 3;
return;
- case MESA_FORMAT_ARGB4444:
- case MESA_FORMAT_ARGB4444_REV:
+ case MESA_FORMAT_ARGB4444_UNORM:
+ case MESA_FORMAT_ARGB4444_REV_UNORM:
case MESA_FORMAT_XRGB4444_UNORM:
*datatype = GL_UNSIGNED_SHORT_4_4_4_4;
*comps = 4;
return;
- case MESA_FORMAT_ARGB1555:
- case MESA_FORMAT_ARGB1555_REV:
+ case MESA_FORMAT_ARGB1555_UNORM:
+ case MESA_FORMAT_ARGB1555_REV_UNORM:
case MESA_FORMAT_XRGB1555_UNORM:
*datatype = GL_UNSIGNED_SHORT_1_5_5_5_REV;
*comps = 4;
return;
- case MESA_FORMAT_ARGB2101010:
+ case MESA_FORMAT_ARGB2101010_UNORM:
*datatype = GL_UNSIGNED_INT_2_10_10_10_REV;
*comps = 4;
return;
- case MESA_FORMAT_RGBA5551:
+ case MESA_FORMAT_RGBA5551_UNORM:
*datatype = GL_UNSIGNED_SHORT_5_5_5_1;
*comps = 4;
return;
- case MESA_FORMAT_AL44:
+ case MESA_FORMAT_AL44_UNORM:
*datatype = MESA_UNSIGNED_BYTE_4_4;
*comps = 2;
return;
- case MESA_FORMAT_AL88:
- case MESA_FORMAT_AL88_REV:
- case MESA_FORMAT_GR88:
- case MESA_FORMAT_RG88:
+ case MESA_FORMAT_AL88_UNORM:
+ case MESA_FORMAT_AL88_REV_UNORM:
+ case MESA_FORMAT_GR88_UNORM:
+ case MESA_FORMAT_RG88_UNORM:
*datatype = GL_UNSIGNED_BYTE;
*comps = 2;
return;
- case MESA_FORMAT_AL1616:
- case MESA_FORMAT_AL1616_REV:
- case MESA_FORMAT_GR1616:
- case MESA_FORMAT_RG1616:
+ case MESA_FORMAT_AL1616_UNORM:
+ case MESA_FORMAT_AL1616_REV_UNORM:
+ case MESA_FORMAT_GR1616_UNORM:
+ case MESA_FORMAT_RG1616_UNORM:
*datatype = GL_UNSIGNED_SHORT;
*comps = 2;
return;
- case MESA_FORMAT_R16:
- case MESA_FORMAT_A16:
- case MESA_FORMAT_L16:
- case MESA_FORMAT_I16:
+ case MESA_FORMAT_R16_UNORM:
+ case MESA_FORMAT_A16_UNORM:
+ case MESA_FORMAT_L16_UNORM:
+ case MESA_FORMAT_I16_UNORM:
*datatype = GL_UNSIGNED_SHORT;
*comps = 1;
return;
- case MESA_FORMAT_RGB332:
+ case MESA_FORMAT_RGB332_UNORM:
*datatype = GL_UNSIGNED_BYTE_3_3_2;
*comps = 3;
return;
- case MESA_FORMAT_A8:
- case MESA_FORMAT_L8:
- case MESA_FORMAT_I8:
- case MESA_FORMAT_R8:
- case MESA_FORMAT_S8:
+ case MESA_FORMAT_A8_UNORM:
+ case MESA_FORMAT_L8_UNORM:
+ case MESA_FORMAT_I8_UNORM:
+ case MESA_FORMAT_R8_UNORM:
+ case MESA_FORMAT_S8_UNORM:
*datatype = GL_UNSIGNED_BYTE;
*comps = 1;
return;
@@ -2408,32 +2408,32 @@ _mesa_format_to_type_and_comps(gl_format format,
*comps = 2;
return;
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
*datatype = GL_UNSIGNED_INT_24_8_MESA;
*comps = 2;
return;
- case MESA_FORMAT_S8_Z24:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
*datatype = GL_UNSIGNED_INT_8_24_REV_MESA;
*comps = 2;
return;
- case MESA_FORMAT_Z16:
+ case MESA_FORMAT_Z16_UNORM:
*datatype = GL_UNSIGNED_SHORT;
*comps = 1;
return;
- case MESA_FORMAT_X8_Z24:
+ case MESA_FORMAT_X8_Z24_UNORM:
*datatype = GL_UNSIGNED_INT;
*comps = 1;
return;
- case MESA_FORMAT_Z24_X8:
+ case MESA_FORMAT_Z24_X8_UNORM:
*datatype = GL_UNSIGNED_INT;
*comps = 1;
return;
- case MESA_FORMAT_Z32:
+ case MESA_FORMAT_Z32_UNORM:
*datatype = GL_UNSIGNED_INT;
*comps = 1;
return;
@@ -2453,47 +2453,47 @@ _mesa_format_to_type_and_comps(gl_format format,
*comps = 2;
return;
- case MESA_FORMAT_SIGNED_R8:
- case MESA_FORMAT_SIGNED_A8:
- case MESA_FORMAT_SIGNED_L8:
- case MESA_FORMAT_SIGNED_I8:
+ case MESA_FORMAT_R8_SNORM:
+ case MESA_FORMAT_A8_SNORM:
+ case MESA_FORMAT_L8_SNORM:
+ case MESA_FORMAT_I8_SNORM:
*datatype = GL_BYTE;
*comps = 1;
return;
- case MESA_FORMAT_SIGNED_RG88_REV:
- case MESA_FORMAT_SIGNED_AL88:
+ case MESA_FORMAT_RG88_REV_SNORM:
+ case MESA_FORMAT_AL88_SNORM:
*datatype = GL_BYTE;
*comps = 2;
return;
- case MESA_FORMAT_SIGNED_RGBA8888:
- case MESA_FORMAT_SIGNED_RGBA8888_REV:
- case MESA_FORMAT_SIGNED_RGBX8888:
+ case MESA_FORMAT_RGBA8888_SNORM:
+ case MESA_FORMAT_RGBA8888_REV_SNORM:
+ case MESA_FORMAT_RGBX8888_SNORM:
*datatype = GL_BYTE;
*comps = 4;
return;
- case MESA_FORMAT_RGBA_16:
+ case MESA_FORMAT_RGBA_16_UNORM:
*datatype = GL_UNSIGNED_SHORT;
*comps = 4;
return;
- case MESA_FORMAT_SIGNED_R16:
- case MESA_FORMAT_SIGNED_A16:
- case MESA_FORMAT_SIGNED_L16:
- case MESA_FORMAT_SIGNED_I16:
+ case MESA_FORMAT_R16_SNORM:
+ case MESA_FORMAT_A16_SNORM:
+ case MESA_FORMAT_L16_SNORM:
+ case MESA_FORMAT_I16_SNORM:
*datatype = GL_SHORT;
*comps = 1;
return;
- case MESA_FORMAT_SIGNED_GR1616:
- case MESA_FORMAT_SIGNED_AL1616:
+ case MESA_FORMAT_GR1616_SNORM:
+ case MESA_FORMAT_AL1616_SNORM:
*datatype = GL_SHORT;
*comps = 2;
return;
- case MESA_FORMAT_SIGNED_RGB_16:
+ case MESA_FORMAT_RGB_16_SNORM:
*datatype = GL_SHORT;
*comps = 3;
return;
- case MESA_FORMAT_SIGNED_RGBA_16:
+ case MESA_FORMAT_RGBA_16_SNORM:
*datatype = GL_SHORT;
*comps = 4;
return;
@@ -2622,84 +2622,84 @@ _mesa_format_to_type_and_comps(gl_format format,
*datatype = GL_UNSIGNED_INT;
*comps = 2;
return;
- case MESA_FORMAT_ALPHA_INT8:
- case MESA_FORMAT_LUMINANCE_INT8:
- case MESA_FORMAT_INTENSITY_INT8:
+ case MESA_FORMAT_ALPHA_SINT8:
+ case MESA_FORMAT_LUMINANCE_SINT8:
+ case MESA_FORMAT_INTENSITY_SINT8:
*datatype = GL_BYTE;
*comps = 1;
return;
- case MESA_FORMAT_LUMINANCE_ALPHA_INT8:
+ case MESA_FORMAT_LUMINANCE_ALPHA_SINT8:
*datatype = GL_BYTE;
*comps = 2;
return;
- case MESA_FORMAT_ALPHA_INT16:
+ case MESA_FORMAT_ALPHA_SINT16:
case MESA_FORMAT_LUMINANCE_INT16:
- case MESA_FORMAT_INTENSITY_INT16:
+ case MESA_FORMAT_INTENSITY_SINT16:
*datatype = GL_SHORT;
*comps = 1;
return;
- case MESA_FORMAT_LUMINANCE_ALPHA_INT16:
+ case MESA_FORMAT_LUMINANCE_ALPHA_SINT16:
*datatype = GL_SHORT;
*comps = 2;
return;
case MESA_FORMAT_ALPHA_INT32:
case MESA_FORMAT_LUMINANCE_INT32:
- case MESA_FORMAT_INTENSITY_INT32:
+ case MESA_FORMAT_INTENSITY_SINT32:
*datatype = GL_INT;
*comps = 1;
return;
- case MESA_FORMAT_LUMINANCE_ALPHA_INT32:
+ case MESA_FORMAT_LUMINANCE_ALPHA_SINT32:
*datatype = GL_INT;
*comps = 2;
return;
- case MESA_FORMAT_R_INT8:
+ case MESA_FORMAT_R_SINT8:
*datatype = GL_BYTE;
*comps = 1;
return;
- case MESA_FORMAT_RG_INT8:
+ case MESA_FORMAT_RG_SINT8:
*datatype = GL_BYTE;
*comps = 2;
return;
- case MESA_FORMAT_RGB_INT8:
+ case MESA_FORMAT_RGB_SINT8:
*datatype = GL_BYTE;
*comps = 3;
return;
- case MESA_FORMAT_RGBA_INT8:
+ case MESA_FORMAT_RGBA_SINT8:
*datatype = GL_BYTE;
*comps = 4;
return;
- case MESA_FORMAT_R_INT16:
+ case MESA_FORMAT_R_SINT16:
*datatype = GL_SHORT;
*comps = 1;
return;
- case MESA_FORMAT_RG_INT16:
+ case MESA_FORMAT_RG_SINT16:
*datatype = GL_SHORT;
*comps = 2;
return;
- case MESA_FORMAT_RGB_INT16:
+ case MESA_FORMAT_RGB_SINT16:
*datatype = GL_SHORT;
*comps = 3;
return;
- case MESA_FORMAT_RGBA_INT16:
+ case MESA_FORMAT_RGBA_SINT16:
*datatype = GL_SHORT;
*comps = 4;
return;
- case MESA_FORMAT_R_INT32:
+ case MESA_FORMAT_R_SINT32:
*datatype = GL_INT;
*comps = 1;
return;
- case MESA_FORMAT_RG_INT32:
+ case MESA_FORMAT_RG_SINT32:
*datatype = GL_INT;
*comps = 2;
return;
- case MESA_FORMAT_RGB_INT32:
+ case MESA_FORMAT_RGB_SINT32:
*datatype = GL_INT;
*comps = 3;
return;
- case MESA_FORMAT_RGBA_INT32:
+ case MESA_FORMAT_RGBA_SINT32:
*datatype = GL_INT;
*comps = 4;
return;
@@ -2868,7 +2868,7 @@ _mesa_format_matches_format_and_type(gl_format gl_format,
case MESA_FORMAT_COUNT:
return GL_FALSE;
- case MESA_FORMAT_RGBA8888:
+ case MESA_FORMAT_RGBA8888_UNORM:
case MESA_FORMAT_SRGBA8:
if (format == GL_RGBA && type == GL_UNSIGNED_INT_8_8_8_8 && !swapBytes)
return GL_TRUE;
@@ -2892,7 +2892,7 @@ _mesa_format_matches_format_and_type(gl_format gl_format,
return GL_FALSE;
- case MESA_FORMAT_RGBA8888_REV:
+ case MESA_FORMAT_RGBA8888_REV_UNORM:
if (format == GL_RGBA && type == GL_UNSIGNED_INT_8_8_8_8_REV &&
!swapBytes)
return GL_TRUE;
@@ -2916,7 +2916,7 @@ _mesa_format_matches_format_and_type(gl_format gl_format,
return GL_FALSE;
- case MESA_FORMAT_ARGB8888:
+ case MESA_FORMAT_ARGB8888_UNORM:
case MESA_FORMAT_SARGB8:
if (format == GL_BGRA && type == GL_UNSIGNED_INT_8_8_8_8_REV &&
!swapBytes)
@@ -2930,7 +2930,7 @@ _mesa_format_matches_format_and_type(gl_format gl_format,
return GL_FALSE;
- case MESA_FORMAT_ARGB8888_REV:
+ case MESA_FORMAT_ARGB8888_REV_UNORM:
if (format == GL_BGRA && type == GL_UNSIGNED_INT_8_8_8_8 && !swapBytes)
return GL_TRUE;
@@ -2943,12 +2943,12 @@ _mesa_format_matches_format_and_type(gl_format gl_format,
return GL_FALSE;
- case MESA_FORMAT_RGBX8888:
- case MESA_FORMAT_RGBX8888_REV:
+ case MESA_FORMAT_RGBX8888_UNORM:
+ case MESA_FORMAT_RGBX8888_REV_UNORM:
return GL_FALSE;
- case MESA_FORMAT_XRGB8888:
- case MESA_FORMAT_XRGB8888_REV:
+ case MESA_FORMAT_XRGB8888_UNORM:
+ case MESA_FORMAT_XRGB8888_REV_UNORM:
return GL_FALSE;
case MESA_FORMAT_RGB888:
@@ -2958,62 +2958,62 @@ _mesa_format_matches_format_and_type(gl_format gl_format,
case MESA_FORMAT_BGR888:
return format == GL_RGB && type == GL_UNSIGNED_BYTE && littleEndian;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_RGB565_UNORM:
return format == GL_RGB && type == GL_UNSIGNED_SHORT_5_6_5 && !swapBytes;
- case MESA_FORMAT_RGB565_REV:
+ case MESA_FORMAT_RGB565_REV_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_ARGB4444_UNORM:
return format == GL_BGRA && type == GL_UNSIGNED_SHORT_4_4_4_4_REV &&
!swapBytes;
- case MESA_FORMAT_ARGB4444_REV:
+ case MESA_FORMAT_ARGB4444_REV_UNORM:
return GL_FALSE;
- case MESA_FORMAT_RGBA5551:
+ case MESA_FORMAT_RGBA5551_UNORM:
return format == GL_RGBA && type == GL_UNSIGNED_SHORT_5_5_5_1 &&
!swapBytes;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_ARGB1555_UNORM:
return format == GL_BGRA && type == GL_UNSIGNED_SHORT_1_5_5_5_REV &&
!swapBytes;
- case MESA_FORMAT_ARGB1555_REV:
+ case MESA_FORMAT_ARGB1555_REV_UNORM:
return GL_FALSE;
- case MESA_FORMAT_AL44:
+ case MESA_FORMAT_AL44_UNORM:
return GL_FALSE;
- case MESA_FORMAT_AL88:
+ case MESA_FORMAT_AL88_UNORM:
case MESA_FORMAT_SLA8:
return format == GL_LUMINANCE_ALPHA && type == GL_UNSIGNED_BYTE && littleEndian;
- case MESA_FORMAT_AL88_REV:
+ case MESA_FORMAT_AL88_REV_UNORM:
return GL_FALSE;
- case MESA_FORMAT_AL1616:
+ case MESA_FORMAT_AL1616_UNORM:
return format == GL_LUMINANCE_ALPHA && type == GL_UNSIGNED_SHORT && littleEndian && !swapBytes;
- case MESA_FORMAT_AL1616_REV:
+ case MESA_FORMAT_AL1616_REV_UNORM:
return GL_FALSE;
- case MESA_FORMAT_RGB332:
+ case MESA_FORMAT_RGB332_UNORM:
return format == GL_RGB && type == GL_UNSIGNED_BYTE_3_3_2;
- case MESA_FORMAT_A8:
+ case MESA_FORMAT_A8_UNORM:
return format == GL_ALPHA && type == GL_UNSIGNED_BYTE;
- case MESA_FORMAT_A16:
+ case MESA_FORMAT_A16_UNORM:
return format == GL_ALPHA && type == GL_UNSIGNED_SHORT && !swapBytes;
- case MESA_FORMAT_L8:
+ case MESA_FORMAT_L8_UNORM:
case MESA_FORMAT_SL8:
return format == GL_LUMINANCE && type == GL_UNSIGNED_BYTE;
- case MESA_FORMAT_L16:
+ case MESA_FORMAT_L16_UNORM:
return format == GL_LUMINANCE && type == GL_UNSIGNED_SHORT && !swapBytes;
- case MESA_FORMAT_I8:
+ case MESA_FORMAT_I8_UNORM:
return format == GL_INTENSITY && type == GL_UNSIGNED_BYTE;
- case MESA_FORMAT_I16:
+ case MESA_FORMAT_I16_UNORM:
return format == GL_INTENSITY && type == GL_UNSIGNED_SHORT && !swapBytes;
case MESA_FORMAT_YCBCR:
@@ -3025,45 +3025,45 @@ _mesa_format_matches_format_and_type(gl_format gl_format,
((type == GL_UNSIGNED_SHORT_8_8_MESA && littleEndian == swapBytes) ||
(type == GL_UNSIGNED_SHORT_8_8_REV_MESA && littleEndian != swapBytes));
- case MESA_FORMAT_R8:
+ case MESA_FORMAT_R8_UNORM:
return format == GL_RED && type == GL_UNSIGNED_BYTE;
- case MESA_FORMAT_GR88:
+ case MESA_FORMAT_GR88_UNORM:
return format == GL_RG && type == GL_UNSIGNED_BYTE && littleEndian;
- case MESA_FORMAT_RG88:
+ case MESA_FORMAT_RG88_UNORM:
return GL_FALSE;
- case MESA_FORMAT_R16:
+ case MESA_FORMAT_R16_UNORM:
return format == GL_RED && type == GL_UNSIGNED_SHORT &&
!swapBytes;
- case MESA_FORMAT_GR1616:
+ case MESA_FORMAT_GR1616_UNORM:
return format == GL_RG && type == GL_UNSIGNED_SHORT && littleEndian &&
!swapBytes;
- case MESA_FORMAT_RG1616:
+ case MESA_FORMAT_RG1616_UNORM:
return GL_FALSE;
- case MESA_FORMAT_ARGB2101010:
+ case MESA_FORMAT_ARGB2101010_UNORM:
return format == GL_BGRA && type == GL_UNSIGNED_INT_2_10_10_10_REV &&
!swapBytes;
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
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_Z24_X8_UNORM:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
return GL_FALSE;
- case MESA_FORMAT_Z16:
+ case MESA_FORMAT_Z16_UNORM:
return format == GL_DEPTH_COMPONENT && type == GL_UNSIGNED_SHORT &&
!swapBytes;
- case MESA_FORMAT_X8_Z24:
+ case MESA_FORMAT_X8_Z24_UNORM:
return GL_FALSE;
- case MESA_FORMAT_Z32:
+ case MESA_FORMAT_Z32_UNORM:
return format == GL_DEPTH_COMPONENT && type == GL_UNSIGNED_INT &&
!swapBytes;
- case MESA_FORMAT_S8:
+ case MESA_FORMAT_S8_UNORM:
return format == GL_STENCIL_INDEX && type == GL_UNSIGNED_BYTE;
case MESA_FORMAT_SRGB_DXT1:
@@ -3128,9 +3128,9 @@ _mesa_format_matches_format_and_type(gl_format gl_format,
case MESA_FORMAT_ALPHA_UINT32:
return format == GL_ALPHA_INTEGER && type == GL_UNSIGNED_INT &&
!swapBytes;
- case MESA_FORMAT_ALPHA_INT8:
+ case MESA_FORMAT_ALPHA_SINT8:
return format == GL_ALPHA_INTEGER && type == GL_BYTE;
- case MESA_FORMAT_ALPHA_INT16:
+ case MESA_FORMAT_ALPHA_SINT16:
return format == GL_ALPHA_INTEGER && type == GL_SHORT && !swapBytes;
case MESA_FORMAT_ALPHA_INT32:
return format == GL_ALPHA_INTEGER && type == GL_INT && !swapBytes;
@@ -3138,9 +3138,9 @@ _mesa_format_matches_format_and_type(gl_format gl_format,
case MESA_FORMAT_INTENSITY_UINT8:
case MESA_FORMAT_INTENSITY_UINT16:
case MESA_FORMAT_INTENSITY_UINT32:
- case MESA_FORMAT_INTENSITY_INT8:
- case MESA_FORMAT_INTENSITY_INT16:
- case MESA_FORMAT_INTENSITY_INT32:
+ case MESA_FORMAT_INTENSITY_SINT8:
+ case MESA_FORMAT_INTENSITY_SINT16:
+ case MESA_FORMAT_INTENSITY_SINT32:
/* GL_INTENSITY_INTEGER_EXT doesn't exist. */
return GL_FALSE;
@@ -3152,7 +3152,7 @@ _mesa_format_matches_format_and_type(gl_format gl_format,
case MESA_FORMAT_LUMINANCE_UINT32:
return format == GL_LUMINANCE_INTEGER_EXT && type == GL_UNSIGNED_INT &&
!swapBytes;
- case MESA_FORMAT_LUMINANCE_INT8:
+ case MESA_FORMAT_LUMINANCE_SINT8:
return format == GL_LUMINANCE_INTEGER_EXT && type == GL_BYTE;
case MESA_FORMAT_LUMINANCE_INT16:
return format == GL_LUMINANCE_INTEGER_EXT && type == GL_SHORT &&
@@ -3169,39 +3169,39 @@ _mesa_format_matches_format_and_type(gl_format gl_format,
case MESA_FORMAT_LUMINANCE_ALPHA_UINT32:
return format == GL_LUMINANCE_ALPHA_INTEGER_EXT &&
type == GL_UNSIGNED_INT && !swapBytes;
- case MESA_FORMAT_LUMINANCE_ALPHA_INT8:
+ case MESA_FORMAT_LUMINANCE_ALPHA_SINT8:
return format == GL_LUMINANCE_ALPHA_INTEGER_EXT && type == GL_BYTE &&
!swapBytes;
- case MESA_FORMAT_LUMINANCE_ALPHA_INT16:
+ case MESA_FORMAT_LUMINANCE_ALPHA_SINT16:
return format == GL_LUMINANCE_ALPHA_INTEGER_EXT && type == GL_SHORT &&
!swapBytes;
- case MESA_FORMAT_LUMINANCE_ALPHA_INT32:
+ case MESA_FORMAT_LUMINANCE_ALPHA_SINT32:
return format == GL_LUMINANCE_ALPHA_INTEGER_EXT && type == GL_INT &&
!swapBytes;
- case MESA_FORMAT_R_INT8:
+ case MESA_FORMAT_R_SINT8:
return format == GL_RED_INTEGER && type == GL_BYTE;
- case MESA_FORMAT_RG_INT8:
+ case MESA_FORMAT_RG_SINT8:
return format == GL_RG_INTEGER && type == GL_BYTE && !swapBytes;
- case MESA_FORMAT_RGB_INT8:
+ case MESA_FORMAT_RGB_SINT8:
return format == GL_RGB_INTEGER && type == GL_BYTE && !swapBytes;
- case MESA_FORMAT_RGBA_INT8:
+ case MESA_FORMAT_RGBA_SINT8:
return format == GL_RGBA_INTEGER && type == GL_BYTE && !swapBytes;
- case MESA_FORMAT_R_INT16:
+ case MESA_FORMAT_R_SINT16:
return format == GL_RED_INTEGER && type == GL_SHORT && !swapBytes;
- case MESA_FORMAT_RG_INT16:
+ case MESA_FORMAT_RG_SINT16:
return format == GL_RG_INTEGER && type == GL_SHORT && !swapBytes;
- case MESA_FORMAT_RGB_INT16:
+ case MESA_FORMAT_RGB_SINT16:
return format == GL_RGB_INTEGER && type == GL_SHORT && !swapBytes;
- case MESA_FORMAT_RGBA_INT16:
+ case MESA_FORMAT_RGBA_SINT16:
return format == GL_RGBA_INTEGER && type == GL_SHORT && !swapBytes;
- case MESA_FORMAT_R_INT32:
+ case MESA_FORMAT_R_SINT32:
return format == GL_RED_INTEGER && type == GL_INT && !swapBytes;
- case MESA_FORMAT_RG_INT32:
+ case MESA_FORMAT_RG_SINT32:
return format == GL_RG_INTEGER && type == GL_INT && !swapBytes;
- case MESA_FORMAT_RGB_INT32:
+ case MESA_FORMAT_RGB_SINT32:
return format == GL_RGB_INTEGER && type == GL_INT && !swapBytes;
- case MESA_FORMAT_RGBA_INT32:
+ case MESA_FORMAT_RGBA_SINT32:
return format == GL_RGBA_INTEGER && type == GL_INT && !swapBytes;
case MESA_FORMAT_R_UINT8:
@@ -3237,15 +3237,15 @@ _mesa_format_matches_format_and_type(gl_format gl_format,
return (format == GL_DU8DV8_ATI || format == GL_DUDV_ATI) &&
type == GL_BYTE && littleEndian && !swapBytes;
- case MESA_FORMAT_SIGNED_R8:
+ case MESA_FORMAT_R8_SNORM:
return format == GL_RED && type == GL_BYTE;
- case MESA_FORMAT_SIGNED_RG88_REV:
+ case MESA_FORMAT_RG88_REV_SNORM:
return format == GL_RG && type == GL_BYTE && littleEndian &&
!swapBytes;
- case MESA_FORMAT_SIGNED_RGBX8888:
+ case MESA_FORMAT_RGBX8888_SNORM:
return GL_FALSE;
- case MESA_FORMAT_SIGNED_RGBA8888:
+ case MESA_FORMAT_RGBA8888_SNORM:
if (format == GL_RGBA && type == GL_BYTE && !littleEndian)
return GL_TRUE;
@@ -3254,7 +3254,7 @@ _mesa_format_matches_format_and_type(gl_format gl_format,
return GL_FALSE;
- case MESA_FORMAT_SIGNED_RGBA8888_REV:
+ case MESA_FORMAT_RGBA8888_REV_SNORM:
if (format == GL_RGBA && type == GL_BYTE && littleEndian)
return GL_TRUE;
@@ -3263,16 +3263,16 @@ _mesa_format_matches_format_and_type(gl_format gl_format,
return GL_FALSE;
- case MESA_FORMAT_SIGNED_R16:
+ case MESA_FORMAT_R16_SNORM:
return format == GL_RED && type == GL_SHORT &&
!swapBytes;
- case MESA_FORMAT_SIGNED_GR1616:
+ case MESA_FORMAT_GR1616_SNORM:
return format == GL_RG && type == GL_SHORT && littleEndian && !swapBytes;
- case MESA_FORMAT_SIGNED_RGB_16:
+ case MESA_FORMAT_RGB_16_SNORM:
return format == GL_RGB && type == GL_SHORT && !swapBytes;
- case MESA_FORMAT_SIGNED_RGBA_16:
+ case MESA_FORMAT_RGBA_16_SNORM:
return format == GL_RGBA && type == GL_SHORT && !swapBytes;
- case MESA_FORMAT_RGBA_16:
+ case MESA_FORMAT_RGBA_16_UNORM:
return format == GL_RGBA && type == GL_UNSIGNED_SHORT &&
!swapBytes;
@@ -3301,23 +3301,23 @@ _mesa_format_matches_format_and_type(gl_format gl_format,
case MESA_FORMAT_ETC2_SRGB8_PUNCHTHROUGH_ALPHA1:
return GL_FALSE;
- case MESA_FORMAT_SIGNED_A8:
+ case MESA_FORMAT_A8_SNORM:
return format == GL_ALPHA && type == GL_BYTE;
- case MESA_FORMAT_SIGNED_L8:
+ case MESA_FORMAT_L8_SNORM:
return format == GL_LUMINANCE && type == GL_BYTE;
- case MESA_FORMAT_SIGNED_AL88:
+ case MESA_FORMAT_AL88_SNORM:
return format == GL_LUMINANCE_ALPHA && type == GL_BYTE &&
littleEndian && !swapBytes;
- case MESA_FORMAT_SIGNED_I8:
+ case MESA_FORMAT_I8_SNORM:
return format == GL_INTENSITY && type == GL_BYTE;
- case MESA_FORMAT_SIGNED_A16:
+ case MESA_FORMAT_A16_SNORM:
return format == GL_ALPHA && type == GL_SHORT && !swapBytes;
- case MESA_FORMAT_SIGNED_L16:
+ case MESA_FORMAT_L16_SNORM:
return format == GL_LUMINANCE && type == GL_SHORT && !swapBytes;
- case MESA_FORMAT_SIGNED_AL1616:
+ case MESA_FORMAT_AL1616_SNORM:
return format == GL_LUMINANCE_ALPHA && type == GL_SHORT &&
littleEndian && !swapBytes;
- case MESA_FORMAT_SIGNED_I16:
+ case MESA_FORMAT_I16_SNORM:
return format == GL_INTENSITY && type == GL_SHORT && littleEndian &&
!swapBytes;
diff --git a/src/mesa/main/formats.h b/src/mesa/main/formats.h
index 64b4b9a..94fc7a0 100644
--- a/src/mesa/main/formats.h
+++ b/src/mesa/main/formats.h
@@ -67,51 +67,51 @@ typedef enum
/*@{*/
/* msb <------ TEXEL BITS -----------> lsb */
/* ---- ---- ---- ---- ---- ---- ---- ---- */
- MESA_FORMAT_RGBA8888, /* RRRR RRRR GGGG GGGG BBBB BBBB AAAA AAAA */
- MESA_FORMAT_RGBA8888_REV, /* AAAA AAAA BBBB BBBB GGGG GGGG RRRR RRRR */
- MESA_FORMAT_ARGB8888, /* AAAA AAAA RRRR RRRR GGGG GGGG BBBB BBBB */
- MESA_FORMAT_ARGB8888_REV, /* BBBB BBBB GGGG GGGG RRRR RRRR AAAA AAAA */
- MESA_FORMAT_RGBX8888, /* RRRR RRRR GGGG GGGG BBBB BBBB XXXX XXXX */
- MESA_FORMAT_RGBX8888_REV, /* xxxx xxxx BBBB BBBB GGGG GGGG RRRR RRRR */
- MESA_FORMAT_XRGB8888, /* xxxx xxxx RRRR RRRR GGGG GGGG BBBB BBBB */
- MESA_FORMAT_XRGB8888_REV, /* BBBB BBBB GGGG GGGG RRRR RRRR xxxx xxxx */
- MESA_FORMAT_RGB888, /* RRRR RRRR GGGG GGGG BBBB BBBB */
- MESA_FORMAT_BGR888, /* BBBB BBBB GGGG GGGG RRRR RRRR */
- MESA_FORMAT_RGB565, /* RRRR RGGG GGGB BBBB */
- MESA_FORMAT_RGB565_REV, /* GGGB BBBB RRRR RGGG */
- MESA_FORMAT_ARGB4444, /* AAAA RRRR GGGG BBBB */
- MESA_FORMAT_ARGB4444_REV, /* GGGG BBBB AAAA RRRR */
- MESA_FORMAT_RGBA5551, /* RRRR RGGG GGBB BBBA */
- MESA_FORMAT_ARGB1555, /* ARRR RRGG GGGB BBBB */
- MESA_FORMAT_ARGB1555_REV, /* GGGB BBBB ARRR RRGG */
- MESA_FORMAT_AL44, /* AAAA LLLL */
- MESA_FORMAT_AL88, /* AAAA AAAA LLLL LLLL */
- MESA_FORMAT_AL88_REV, /* LLLL LLLL AAAA AAAA */
- MESA_FORMAT_AL1616, /* AAAA AAAA AAAA AAAA LLLL LLLL LLLL LLLL */
- MESA_FORMAT_AL1616_REV, /* LLLL LLLL LLLL LLLL AAAA AAAA AAAA AAAA */
- MESA_FORMAT_RGB332, /* RRRG GGBB */
- MESA_FORMAT_A8, /* AAAA AAAA */
- MESA_FORMAT_A16, /* AAAA AAAA AAAA AAAA */
- MESA_FORMAT_L8, /* LLLL LLLL */
- MESA_FORMAT_L16, /* LLLL LLLL LLLL LLLL */
- MESA_FORMAT_I8, /* IIII IIII */
- MESA_FORMAT_I16, /* IIII IIII IIII IIII */
- MESA_FORMAT_YCBCR, /* YYYY YYYY UorV UorV */
- MESA_FORMAT_YCBCR_REV, /* UorV UorV YYYY YYYY */
- MESA_FORMAT_R8, /* RRRR RRRR */
- MESA_FORMAT_GR88, /* GGGG GGGG RRRR RRRR */
- MESA_FORMAT_RG88, /* RRRR RRRR GGGG GGGG */
- MESA_FORMAT_R16, /* RRRR RRRR RRRR RRRR */
- MESA_FORMAT_GR1616, /* GGGG GGGG GGGG GGGG RRRR RRRR RRRR RRRR */
- MESA_FORMAT_RG1616, /* RRRR RRRR RRRR RRRR GGGG GGGG GGGG GGGG */
- MESA_FORMAT_ARGB2101010, /* AARR RRRR RRRR GGGG GGGG GGBB BBBB BBBB */
- MESA_FORMAT_Z24_S8, /* ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ SSSS SSSS */
- MESA_FORMAT_S8_Z24, /* SSSS SSSS ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ */
- MESA_FORMAT_Z16, /* ZZZZ ZZZZ ZZZZ ZZZZ */
- 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_Z32, /* ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ */
- MESA_FORMAT_S8, /* SSSS SSSS */
+ MESA_FORMAT_RGBA8888_UNORM, /* RRRR RRRR GGGG GGGG BBBB BBBB AAAA AAAA */
+ MESA_FORMAT_RGBA8888_REV_UNORM, /* AAAA AAAA BBBB BBBB GGGG GGGG RRRR RRRR */
+ MESA_FORMAT_ARGB8888_UNORM, /* AAAA AAAA RRRR RRRR GGGG GGGG BBBB BBBB */
+ MESA_FORMAT_ARGB8888_REV_UNORM, /* BBBB BBBB GGGG GGGG RRRR RRRR AAAA AAAA */
+ MESA_FORMAT_RGBX8888_UNORM, /* RRRR RRRR GGGG GGGG BBBB BBBB XXXX XXXX */
+ MESA_FORMAT_RGBX8888_REV_UNORM, /* xxxx xxxx BBBB BBBB GGGG GGGG RRRR RRRR */
+ MESA_FORMAT_XRGB8888_UNORM, /* xxxx xxxx RRRR RRRR GGGG GGGG BBBB BBBB */
+ MESA_FORMAT_XRGB8888_REV_UNORM, /* BBBB BBBB GGGG GGGG RRRR RRRR xxxx xxxx */
+ MESA_FORMAT_RGB888, /* RRRR RRRR GGGG GGGG BBBB BBBB */
+ MESA_FORMAT_BGR888, /* BBBB BBBB GGGG GGGG RRRR RRRR */
+ MESA_FORMAT_RGB565_UNORM, /* RRRR RGGG GGGB BBBB */
+ MESA_FORMAT_RGB565_REV_UNORM, /* GGGB BBBB RRRR RGGG */
+ MESA_FORMAT_ARGB4444_UNORM, /* AAAA RRRR GGGG BBBB */
+ MESA_FORMAT_ARGB4444_REV_UNORM, /* GGGG BBBB AAAA RRRR */
+ MESA_FORMAT_RGBA5551_UNORM, /* RRRR RGGG GGBB BBBA */
+ MESA_FORMAT_ARGB1555_UNORM, /* ARRR RRGG GGGB BBBB */
+ MESA_FORMAT_ARGB1555_REV_UNORM, /* GGGB BBBB ARRR RRGG */
+ MESA_FORMAT_AL44_UNORM, /* AAAA LLLL */
+ MESA_FORMAT_AL88_UNORM, /* AAAA AAAA LLLL LLLL */
+ MESA_FORMAT_AL88_REV_UNORM, /* LLLL LLLL AAAA AAAA */
+ MESA_FORMAT_AL1616_UNORM, /* AAAA AAAA AAAA AAAA LLLL LLLL LLLL LLLL */
+ MESA_FORMAT_AL1616_REV_UNORM, /* LLLL LLLL LLLL LLLL AAAA AAAA AAAA AAAA */
+ MESA_FORMAT_RGB332_UNORM, /* RRRG GGBB */
+ MESA_FORMAT_A8_UNORM, /* AAAA AAAA */
+ MESA_FORMAT_A16_UNORM, /* AAAA AAAA AAAA AAAA */
+ MESA_FORMAT_L8_UNORM, /* LLLL LLLL */
+ MESA_FORMAT_L16_UNORM, /* LLLL LLLL LLLL LLLL */
+ MESA_FORMAT_I8_UNORM, /* IIII IIII */
+ MESA_FORMAT_I16_UNORM, /* IIII IIII IIII IIII */
+ MESA_FORMAT_YCBCR, /* YYYY YYYY UorV UorV */
+ MESA_FORMAT_YCBCR_REV, /* UorV UorV YYYY YYYY */
+ MESA_FORMAT_R8_UNORM, /* RRRR RRRR */
+ MESA_FORMAT_GR88_UNORM, /* GGGG GGGG RRRR RRRR */
+ MESA_FORMAT_RG88_UNORM, /* RRRR RRRR GGGG GGGG */
+ MESA_FORMAT_R16_UNORM, /* RRRR RRRR RRRR RRRR */
+ MESA_FORMAT_GR1616_UNORM, /* GGGG GGGG GGGG GGGG RRRR RRRR RRRR RRRR */
+ MESA_FORMAT_RG1616_UNORM, /* RRRR RRRR RRRR RRRR GGGG GGGG GGGG GGGG */
+ MESA_FORMAT_ARGB2101010_UNORM, /* AARR RRRR RRRR GGGG GGGG GGBB BBBB BBBB */
+ MESA_FORMAT_Z24_UNORM_S8_UINT, /* ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ SSSS SSSS */
+ MESA_FORMAT_S8_UINT_Z24_UNORM, /* SSSS SSSS ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ */
+ MESA_FORMAT_Z16_UNORM, /* ZZZZ ZZZZ ZZZZ ZZZZ */
+ MESA_FORMAT_X8_Z24_UNORM, /* xxxx xxxx ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ */
+ MESA_FORMAT_Z24_X8_UNORM, /* ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ xxxx xxxx */
+ MESA_FORMAT_Z32_UNORM, /* ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ */
+ MESA_FORMAT_S8_UNORM, /* SSSS SSSS */
/*@}*/
/**
@@ -171,43 +171,43 @@ typedef enum
MESA_FORMAT_ALPHA_UINT8,
MESA_FORMAT_ALPHA_UINT16,
MESA_FORMAT_ALPHA_UINT32,
- MESA_FORMAT_ALPHA_INT8,
- MESA_FORMAT_ALPHA_INT16,
+ MESA_FORMAT_ALPHA_SINT8,
+ MESA_FORMAT_ALPHA_SINT16,
MESA_FORMAT_ALPHA_INT32,
MESA_FORMAT_INTENSITY_UINT8,
MESA_FORMAT_INTENSITY_UINT16,
MESA_FORMAT_INTENSITY_UINT32,
- MESA_FORMAT_INTENSITY_INT8,
- MESA_FORMAT_INTENSITY_INT16,
- MESA_FORMAT_INTENSITY_INT32,
+ MESA_FORMAT_INTENSITY_SINT8,
+ MESA_FORMAT_INTENSITY_SINT16,
+ MESA_FORMAT_INTENSITY_SINT32,
MESA_FORMAT_LUMINANCE_UINT8,
MESA_FORMAT_LUMINANCE_UINT16,
MESA_FORMAT_LUMINANCE_UINT32,
- MESA_FORMAT_LUMINANCE_INT8,
+ MESA_FORMAT_LUMINANCE_SINT8,
MESA_FORMAT_LUMINANCE_INT16,
MESA_FORMAT_LUMINANCE_INT32,
MESA_FORMAT_LUMINANCE_ALPHA_UINT8,
MESA_FORMAT_LUMINANCE_ALPHA_UINT16,
MESA_FORMAT_LUMINANCE_ALPHA_UINT32,
- MESA_FORMAT_LUMINANCE_ALPHA_INT8,
- MESA_FORMAT_LUMINANCE_ALPHA_INT16,
- MESA_FORMAT_LUMINANCE_ALPHA_INT32,
-
- MESA_FORMAT_R_INT8,
- MESA_FORMAT_RG_INT8,
- MESA_FORMAT_RGB_INT8,
- MESA_FORMAT_RGBA_INT8,
- MESA_FORMAT_R_INT16,
- MESA_FORMAT_RG_INT16,
- MESA_FORMAT_RGB_INT16,
- MESA_FORMAT_RGBA_INT16,
- MESA_FORMAT_R_INT32,
- MESA_FORMAT_RG_INT32,
- MESA_FORMAT_RGB_INT32,
- MESA_FORMAT_RGBA_INT32,
+ MESA_FORMAT_LUMINANCE_ALPHA_SINT8,
+ MESA_FORMAT_LUMINANCE_ALPHA_SINT16,
+ MESA_FORMAT_LUMINANCE_ALPHA_SINT32,
+
+ MESA_FORMAT_R_SINT8,
+ MESA_FORMAT_RG_SINT8,
+ MESA_FORMAT_RGB_SINT8,
+ MESA_FORMAT_RGBA_SINT8,
+ MESA_FORMAT_R_SINT16,
+ MESA_FORMAT_RG_SINT16,
+ MESA_FORMAT_RGB_SINT16,
+ MESA_FORMAT_RGBA_SINT16,
+ MESA_FORMAT_R_SINT32,
+ MESA_FORMAT_RG_SINT32,
+ MESA_FORMAT_RGB_SINT32,
+ MESA_FORMAT_RGBA_SINT32,
/**
* \name Non-normalized unsigned integer formats.
@@ -232,16 +232,16 @@ typedef enum
*/
/*@{*/
MESA_FORMAT_DUDV8, /* DUDU DUDU DVDV DVDV */
- MESA_FORMAT_SIGNED_R8, /* RRRR RRRR */
- MESA_FORMAT_SIGNED_RG88_REV, /* GGGG GGGG RRRR RRRR */
- MESA_FORMAT_SIGNED_RGBX8888, /* RRRR RRRR GGGG GGGG BBBB BBBB xxxx xxxx */
- MESA_FORMAT_SIGNED_RGBA8888, /* RRRR RRRR GGGG GGGG BBBB BBBB AAAA AAAA */
- MESA_FORMAT_SIGNED_RGBA8888_REV,/*AAAA AAAA BBBB BBBB GGGG GGGG RRRR RRRR */
- MESA_FORMAT_SIGNED_R16, /* RRRR RRRR RRRR RRRR */
- MESA_FORMAT_SIGNED_GR1616, /* GGGG GGGG GGGG GGGG RRRR RRRR RRRR RRRR */
- MESA_FORMAT_SIGNED_RGB_16, /* ushort[0]=R, ushort[1]=G, ushort[2]=B */
- MESA_FORMAT_SIGNED_RGBA_16, /* ... */
- MESA_FORMAT_RGBA_16, /* ... */
+ MESA_FORMAT_R8_SNORM, /* RRRR RRRR */
+ MESA_FORMAT_RG88_REV_SNORM, /* GGGG GGGG RRRR RRRR */
+ MESA_FORMAT_RGBX8888_SNORM, /* RRRR RRRR GGGG GGGG BBBB BBBB xxxx xxxx */
+ MESA_FORMAT_RGBA8888_SNORM, /* RRRR RRRR GGGG GGGG BBBB BBBB AAAA AAAA */
+ MESA_FORMAT_RGBA8888_REV_SNORM,/*AAAA AAAA BBBB BBBB GGGG GGGG RRRR RRRR */
+ MESA_FORMAT_R16_SNORM, /* RRRR RRRR RRRR RRRR */
+ MESA_FORMAT_GR1616_SNORM, /* GGGG GGGG GGGG GGGG RRRR RRRR RRRR RRRR */
+ MESA_FORMAT_RGB_16_SNORM, /* ushort[0]=R, ushort[1]=G, ushort[2]=B */
+ MESA_FORMAT_RGBA_16_SNORM, /* ... */
+ MESA_FORMAT_RGBA_16_UNORM, /* ... */
/*@}*/
/*@{*/
@@ -270,14 +270,14 @@ typedef enum
MESA_FORMAT_ETC2_RGB8_PUNCHTHROUGH_ALPHA1,
MESA_FORMAT_ETC2_SRGB8_PUNCHTHROUGH_ALPHA1,
- MESA_FORMAT_SIGNED_A8, /* AAAA AAAA */
- MESA_FORMAT_SIGNED_L8, /* LLLL LLLL */
- MESA_FORMAT_SIGNED_AL88, /* AAAA AAAA LLLL LLLL */
- MESA_FORMAT_SIGNED_I8, /* IIII IIII */
- MESA_FORMAT_SIGNED_A16, /* AAAA AAAA AAAA AAAA */
- MESA_FORMAT_SIGNED_L16, /* LLLL LLLL LLLL LLLL */
- MESA_FORMAT_SIGNED_AL1616, /* AAAA AAAA AAAA AAAA LLLL LLLL LLLL LLLL */
- MESA_FORMAT_SIGNED_I16, /* IIII IIII IIII IIII */
+ MESA_FORMAT_A8_SNORM, /* AAAA AAAA */
+ MESA_FORMAT_L8_SNORM, /* LLLL LLLL */
+ MESA_FORMAT_AL88_SNORM, /* AAAA AAAA LLLL LLLL */
+ MESA_FORMAT_I8_SNORM, /* IIII IIII */
+ MESA_FORMAT_A16_SNORM, /* AAAA AAAA AAAA AAAA */
+ MESA_FORMAT_L16_SNORM, /* LLLL LLLL LLLL LLLL */
+ MESA_FORMAT_AL1616_SNORM, /* AAAA AAAA AAAA AAAA LLLL LLLL LLLL LLLL */
+ MESA_FORMAT_I16_SNORM, /* IIII IIII IIII IIII */
MESA_FORMAT_RGB9_E5_FLOAT,
MESA_FORMAT_R11_G11_B10_FLOAT,
diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
index 2fad458..78810e5 100644
--- a/src/mesa/main/framebuffer.c
+++ b/src/mesa/main/framebuffer.c
@@ -812,9 +812,9 @@ _mesa_get_color_read_format(struct gl_context *ctx)
const GLenum format = ctx->ReadBuffer->_ColorReadBuffer->Format;
const GLenum data_type = _mesa_get_format_datatype(format);
- if (format == MESA_FORMAT_ARGB8888)
+ if (format == MESA_FORMAT_ARGB8888_UNORM)
return GL_BGRA;
- else if (format == MESA_FORMAT_RGB565)
+ else if (format == MESA_FORMAT_RGB565_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_RGB565_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 51a0b15..fa75039 100644
--- a/src/mesa/main/readpix.c
+++ b/src/mesa/main/readpix.c
@@ -424,13 +424,13 @@ read_rgba_pixels_swizzle(struct gl_context *ctx,
GLboolean swizzle_rb = GL_FALSE, copy_xrgb = GL_FALSE;
/* XXX we could check for other swizzle/special cases here as needed */
- if (rb->Format == MESA_FORMAT_RGBA8888_REV &&
+ if (rb->Format == MESA_FORMAT_RGBA8888_REV_UNORM &&
format == GL_BGRA &&
type == GL_UNSIGNED_INT_8_8_8_8_REV &&
!ctx->Pack.SwapBytes) {
swizzle_rb = GL_TRUE;
}
- else if (rb->Format == MESA_FORMAT_XRGB8888 &&
+ else if (rb->Format == MESA_FORMAT_XRGB8888_UNORM &&
format == GL_BGRA &&
type == GL_UNSIGNED_INT_8_8_8_8_REV &&
!ctx->Pack.SwapBytes) {
@@ -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_Z24_UNORM_S8_UINT &&
+ rb->Format != MESA_FORMAT_S8_UINT_Z24_UNORM)
return GL_FALSE;
ctx->Driver.MapRenderbuffer(ctx, rb, x, y, width, height, GL_MAP_READ_BIT,
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c
index d3aa477..a8698f5 100644
--- a/src/mesa/main/texformat.c
+++ b/src/mesa/main/texformat.c
@@ -70,70 +70,70 @@ _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_ARGB4444_UNORM);
} else if (type == GL_UNSIGNED_SHORT_1_5_5_5_REV) {
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB1555);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB1555_UNORM);
} else if (type == GL_UNSIGNED_INT_2_10_10_10_REV) {
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB2101010);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB2101010_UNORM);
}
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888);
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888_UNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888_UNORM);
break;
case GL_RGBA8:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888);
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888_UNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888_UNORM);
break;
case GL_RGB5_A1:
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB1555);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB1555_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_ARGB4444_REV_UNORM); /* just to test another format*/
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB4444_UNORM);
break;
case GL_RGBA4:
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB4444);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB4444_UNORM);
break;
/* deep RGBA formats */
case GL_RGB10_A2:
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB2101010);
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB2101010_UNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888_UNORM);
break;
case GL_RGBA12:
case GL_RGBA16:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888);
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_16_UNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_16_UNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888_UNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888_UNORM);
break;
/* shallow RGB formats */
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_ARGB2101010_UNORM);
}
/* fallthrough */
case GL_RGB8:
RETURN_IF_SUPPORTED(MESA_FORMAT_RGB888);
- RETURN_IF_SUPPORTED(MESA_FORMAT_XRGB8888);
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_XRGB8888_UNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888_UNORM);
break;
case GL_R3_G3_B2:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB332);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565_REV);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB332_UNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565_UNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565_REV_UNORM);
RETURN_IF_SUPPORTED(MESA_FORMAT_RGB888);
- RETURN_IF_SUPPORTED(MESA_FORMAT_XRGB8888);
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_XRGB8888_UNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888_UNORM);
break;
case GL_RGB4:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565_REV); /* just to test another format */
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565_REV_UNORM); /* just to test another format */
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565_UNORM);
break;
case GL_RGB5:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565_UNORM);
break;
/* deep RGB formats */
@@ -141,22 +141,22 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
case GL_RGB12:
case GL_RGB16:
RETURN_IF_SUPPORTED(MESA_FORMAT_XBGR16161616_UNORM);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_XRGB8888);
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_16_UNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_XRGB8888_UNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888_UNORM);
break;
/* Alpha formats */
case GL_ALPHA:
case GL_ALPHA4:
case GL_ALPHA8:
- RETURN_IF_SUPPORTED(MESA_FORMAT_A8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_A8_UNORM);
break;
case GL_ALPHA12:
case GL_ALPHA16:
- RETURN_IF_SUPPORTED(MESA_FORMAT_A16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_A8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_A16_UNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_A8_UNORM);
break;
/* Luminance formats */
@@ -164,71 +164,71 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
case GL_LUMINANCE:
case GL_LUMINANCE4:
case GL_LUMINANCE8:
- RETURN_IF_SUPPORTED(MESA_FORMAT_L8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_L8_UNORM);
break;
case GL_LUMINANCE12:
case GL_LUMINANCE16:
- RETURN_IF_SUPPORTED(MESA_FORMAT_L16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_L8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_L16_UNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_L8_UNORM);
break;
/* Luminance/Alpha formats */
case GL_LUMINANCE4_ALPHA4:
- RETURN_IF_SUPPORTED(MESA_FORMAT_AL44);
- RETURN_IF_SUPPORTED(MESA_FORMAT_AL88);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_AL44_UNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_AL88_UNORM);
break;
case 2:
case GL_LUMINANCE_ALPHA:
case GL_LUMINANCE6_ALPHA2:
case GL_LUMINANCE8_ALPHA8:
- RETURN_IF_SUPPORTED(MESA_FORMAT_AL88);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_AL88_UNORM);
break;
case GL_LUMINANCE12_ALPHA4:
case GL_LUMINANCE12_ALPHA12:
case GL_LUMINANCE16_ALPHA16:
- RETURN_IF_SUPPORTED(MESA_FORMAT_AL1616);
- RETURN_IF_SUPPORTED(MESA_FORMAT_AL88);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_AL1616_UNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_AL88_UNORM);
break;
case GL_INTENSITY:
case GL_INTENSITY4:
case GL_INTENSITY8:
- RETURN_IF_SUPPORTED(MESA_FORMAT_I8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_I8_UNORM);
break;
case GL_INTENSITY12:
case GL_INTENSITY16:
- RETURN_IF_SUPPORTED(MESA_FORMAT_I16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_I8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_I16_UNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_I8_UNORM);
break;
case GL_DEPTH_COMPONENT:
case GL_DEPTH_COMPONENT24:
case GL_DEPTH_COMPONENT32:
- RETURN_IF_SUPPORTED(MESA_FORMAT_Z32);
- RETURN_IF_SUPPORTED(MESA_FORMAT_X8_Z24);
- RETURN_IF_SUPPORTED(MESA_FORMAT_S8_Z24);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_Z32_UNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_X8_Z24_UNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_S8_UINT_Z24_UNORM);
break;
case GL_DEPTH_COMPONENT16:
- RETURN_IF_SUPPORTED(MESA_FORMAT_Z16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_X8_Z24);
- RETURN_IF_SUPPORTED(MESA_FORMAT_S8_Z24);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_Z16_UNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_X8_Z24_UNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_S8_UINT_Z24_UNORM);
break;
case GL_COMPRESSED_ALPHA_ARB:
- RETURN_IF_SUPPORTED(MESA_FORMAT_A8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_A8_UNORM);
break;
case GL_COMPRESSED_LUMINANCE_ARB:
- RETURN_IF_SUPPORTED(MESA_FORMAT_L8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_L8_UNORM);
break;
case GL_COMPRESSED_LUMINANCE_ALPHA_ARB:
- RETURN_IF_SUPPORTED(MESA_FORMAT_AL88);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_AL88_UNORM);
break;
case GL_COMPRESSED_INTENSITY_ARB:
- RETURN_IF_SUPPORTED(MESA_FORMAT_I8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_I8_UNORM);
break;
case GL_COMPRESSED_RGB_ARB:
/* We don't use texture compression for 1D and 1D array textures.
@@ -244,8 +244,8 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FXT1);
}
RETURN_IF_SUPPORTED(MESA_FORMAT_RGB888);
- RETURN_IF_SUPPORTED(MESA_FORMAT_XRGB8888);
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_XRGB8888_UNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888_UNORM);
break;
case GL_COMPRESSED_RGBA_ARB:
/* We don't use texture compression for 1D and 1D array textures. */
@@ -254,12 +254,12 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_DXT3); /* Not rgba_dxt1, see spec */
RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FXT1);
}
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888);
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888_UNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888_UNORM);
break;
case GL_RGB565:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565_UNORM);
break;
case GL_YCBCR_MESA:
@@ -425,8 +425,8 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
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_Z24_UNORM_S8_UINT);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_S8_UINT_Z24_UNORM);
break;
case GL_DEPTH_COMPONENT32F:
@@ -443,81 +443,81 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
case GL_RED_SNORM:
case GL_R8_SNORM:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_R8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R8_SNORM);
break;
case GL_RG_SNORM:
case GL_RG8_SNORM:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RG88_REV);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RG88_REV_SNORM);
break;
case GL_RGB_SNORM:
case GL_RGB8_SNORM:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBX8888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBX8888_SNORM);
/* FALLTHROUGH */
case GL_RGBA_SNORM:
case GL_RGBA8_SNORM:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888_REV);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888_SNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888_REV_SNORM);
break;
case GL_ALPHA_SNORM:
case GL_ALPHA8_SNORM:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_A8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888_REV);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_A8_SNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888_SNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888_REV_SNORM);
break;
case GL_LUMINANCE_SNORM:
case GL_LUMINANCE8_SNORM:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_L8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBX8888);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888_REV);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_L8_SNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBX8888_SNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888_SNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888_REV_SNORM);
break;
case GL_LUMINANCE_ALPHA_SNORM:
case GL_LUMINANCE8_ALPHA8_SNORM:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_AL88);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888_REV);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_AL88_SNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888_SNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888_REV_SNORM);
break;
case GL_INTENSITY_SNORM:
case GL_INTENSITY8_SNORM:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_I8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888_REV);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_I8_SNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888_SNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888_REV_SNORM);
break;
case GL_R16_SNORM:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_R16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R16_SNORM);
break;
case GL_RG16_SNORM:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_GR1616);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_GR1616_SNORM);
break;
case GL_RGB16_SNORM:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGB_16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_16_SNORM);
RETURN_IF_SUPPORTED(MESA_FORMAT_XBGR16161616_SNORM);
/* FALLTHROUGH */
case GL_RGBA16_SNORM:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA_16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888_REV);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_16_SNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888_SNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888_REV_SNORM);
break;
case GL_ALPHA16_SNORM:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_A16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA_16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888_REV);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_A16_SNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_16_SNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888_SNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888_REV_SNORM);
break;
case GL_LUMINANCE16_SNORM:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_L16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_L16_SNORM);
/* FALLTHROUGH */
case GL_LUMINANCE16_ALPHA16_SNORM:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_AL1616);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA_16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888_REV);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_AL1616_SNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_16_SNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888_SNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888_REV_SNORM);
break;
case GL_INTENSITY16_SNORM:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_I16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA_16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888_REV);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_I16_SNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_16_SNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888_SNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888_REV_SNORM);
break;
case GL_SRGB_EXT:
@@ -574,16 +574,16 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT32);
break;
case GL_ALPHA8I_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_INT8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_SINT8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_SINT8);
break;
case GL_ALPHA16I_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_INT16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_SINT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_SINT16);
break;
case GL_ALPHA32I_EXT:
RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_INT32);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_SINT32);
break;
case GL_LUMINANCE8UI_EXT:
RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_UINT8);
@@ -598,16 +598,16 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT32);
break;
case GL_LUMINANCE8I_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_INT8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_SINT8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_SINT8);
break;
case GL_LUMINANCE16I_EXT:
RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_INT16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_SINT16);
break;
case GL_LUMINANCE32I_EXT:
RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_INT32);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_SINT32);
break;
case GL_LUMINANCE_ALPHA8UI_EXT:
RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_UINT8);
@@ -622,16 +622,16 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT32);
break;
case GL_LUMINANCE_ALPHA8I_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_INT8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_SINT8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_SINT8);
break;
case GL_LUMINANCE_ALPHA16I_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_INT16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_SINT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_SINT16);
break;
case GL_LUMINANCE_ALPHA32I_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_INT32);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_SINT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_SINT32);
break;
case GL_INTENSITY8UI_EXT:
RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_UINT8);
@@ -646,16 +646,16 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT32);
break;
case GL_INTENSITY8I_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_INT8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_SINT8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_SINT8);
break;
case GL_INTENSITY16I_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_INT16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_SINT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_SINT16);
break;
case GL_INTENSITY32I_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_INT32);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_SINT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_SINT32);
break;
case GL_RGB8UI_EXT:
@@ -674,19 +674,19 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT32);
break;
case GL_RGB8I_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_INT8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_SINT8);
RETURN_IF_SUPPORTED(MESA_FORMAT_XBGR8888_SINT);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_SINT8);
break;
case GL_RGB16I_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_INT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_SINT16);
RETURN_IF_SUPPORTED(MESA_FORMAT_XBGR16161616_SINT);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_SINT16);
break;
case GL_RGB32I_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_INT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_SINT32);
RETURN_IF_SUPPORTED(MESA_FORMAT_XBGR32323232_SINT);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_SINT32);
break;
case GL_RGBA8UI_EXT:
RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT8);
@@ -698,43 +698,43 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT32);
break;
case GL_RGBA8I_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_SINT8);
break;
case GL_RGBA16I_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_SINT16);
break;
case GL_RGBA32I_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_SINT32);
break;
case GL_R8:
case GL_RED:
- RETURN_IF_SUPPORTED(MESA_FORMAT_R8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R8_UNORM);
break;
case GL_COMPRESSED_RED:
if (target != GL_TEXTURE_1D && target != GL_TEXTURE_1D_ARRAY)
RETURN_IF_SUPPORTED(MESA_FORMAT_RED_RGTC1);
- RETURN_IF_SUPPORTED(MESA_FORMAT_R8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R8_UNORM);
break;
case GL_R16:
- RETURN_IF_SUPPORTED(MESA_FORMAT_R16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R16_UNORM);
break;
case GL_RG:
case GL_RG8:
- RETURN_IF_SUPPORTED(MESA_FORMAT_GR88);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_GR88_UNORM);
break;
case GL_COMPRESSED_RG:
if (target != GL_TEXTURE_1D && target != GL_TEXTURE_1D_ARRAY)
RETURN_IF_SUPPORTED(MESA_FORMAT_RG_RGTC2);
- RETURN_IF_SUPPORTED(MESA_FORMAT_GR88);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_GR88_UNORM);
break;
case GL_RG16:
- RETURN_IF_SUPPORTED(MESA_FORMAT_GR1616);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_GR1616_UNORM);
break;
case GL_R16F:
@@ -785,22 +785,22 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
RETURN_IF_SUPPORTED(MESA_FORMAT_RG_UINT32);
break;
case GL_R8I:
- RETURN_IF_SUPPORTED(MESA_FORMAT_R_INT8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R_SINT8);
break;
case GL_RG8I:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RG_INT8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RG_SINT8);
break;
case GL_R16I:
- RETURN_IF_SUPPORTED(MESA_FORMAT_R_INT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R_SINT16);
break;
case GL_RG16I:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RG_INT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RG_SINT16);
break;
case GL_R32I:
- RETURN_IF_SUPPORTED(MESA_FORMAT_R_INT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R_SINT32);
break;
case GL_RG32I:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RG_INT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RG_SINT32);
break;
case GL_RGB10_A2UI:
@@ -809,7 +809,7 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
break;
case GL_BGRA:
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888_UNORM);
break;
}
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 211fc79..9db5e8c 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -3883,17 +3883,17 @@ get_texbuffer_format(const struct gl_context *ctx, GLenum internalFormat)
if (ctx->API != API_OPENGL_CORE) {
switch (internalFormat) {
case GL_ALPHA8:
- return MESA_FORMAT_A8;
+ return MESA_FORMAT_A8_UNORM;
case GL_ALPHA16:
- return MESA_FORMAT_A16;
+ return MESA_FORMAT_A16_UNORM;
case GL_ALPHA16F_ARB:
return MESA_FORMAT_ALPHA_FLOAT16;
case GL_ALPHA32F_ARB:
return MESA_FORMAT_ALPHA_FLOAT32;
case GL_ALPHA8I_EXT:
- return MESA_FORMAT_ALPHA_INT8;
+ return MESA_FORMAT_ALPHA_SINT8;
case GL_ALPHA16I_EXT:
- return MESA_FORMAT_ALPHA_INT16;
+ return MESA_FORMAT_ALPHA_SINT16;
case GL_ALPHA32I_EXT:
return MESA_FORMAT_ALPHA_INT32;
case GL_ALPHA8UI_EXT:
@@ -3903,15 +3903,15 @@ get_texbuffer_format(const struct gl_context *ctx, GLenum internalFormat)
case GL_ALPHA32UI_EXT:
return MESA_FORMAT_ALPHA_UINT32;
case GL_LUMINANCE8:
- return MESA_FORMAT_L8;
+ return MESA_FORMAT_L8_UNORM;
case GL_LUMINANCE16:
- return MESA_FORMAT_L16;
+ return MESA_FORMAT_L16_UNORM;
case GL_LUMINANCE16F_ARB:
return MESA_FORMAT_LUMINANCE_FLOAT16;
case GL_LUMINANCE32F_ARB:
return MESA_FORMAT_LUMINANCE_FLOAT32;
case GL_LUMINANCE8I_EXT:
- return MESA_FORMAT_LUMINANCE_INT8;
+ return MESA_FORMAT_LUMINANCE_SINT8;
case GL_LUMINANCE16I_EXT:
return MESA_FORMAT_LUMINANCE_INT16;
case GL_LUMINANCE32I_EXT:
@@ -3923,19 +3923,19 @@ get_texbuffer_format(const struct gl_context *ctx, GLenum internalFormat)
case GL_LUMINANCE32UI_EXT:
return MESA_FORMAT_LUMINANCE_UINT32;
case GL_LUMINANCE8_ALPHA8:
- return MESA_FORMAT_AL88;
+ return MESA_FORMAT_AL88_UNORM;
case GL_LUMINANCE16_ALPHA16:
- return MESA_FORMAT_AL1616;
+ return MESA_FORMAT_AL1616_UNORM;
case GL_LUMINANCE_ALPHA16F_ARB:
return MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16;
case GL_LUMINANCE_ALPHA32F_ARB:
return MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32;
case GL_LUMINANCE_ALPHA8I_EXT:
- return MESA_FORMAT_LUMINANCE_ALPHA_INT8;
+ return MESA_FORMAT_LUMINANCE_ALPHA_SINT8;
case GL_LUMINANCE_ALPHA16I_EXT:
- return MESA_FORMAT_LUMINANCE_ALPHA_INT8;
+ return MESA_FORMAT_LUMINANCE_ALPHA_SINT8;
case GL_LUMINANCE_ALPHA32I_EXT:
- return MESA_FORMAT_LUMINANCE_ALPHA_INT16;
+ return MESA_FORMAT_LUMINANCE_ALPHA_SINT16;
case GL_LUMINANCE_ALPHA8UI_EXT:
return MESA_FORMAT_LUMINANCE_ALPHA_UINT8;
case GL_LUMINANCE_ALPHA16UI_EXT:
@@ -3943,19 +3943,19 @@ get_texbuffer_format(const struct gl_context *ctx, GLenum internalFormat)
case GL_LUMINANCE_ALPHA32UI_EXT:
return MESA_FORMAT_LUMINANCE_ALPHA_UINT32;
case GL_INTENSITY8:
- return MESA_FORMAT_I8;
+ return MESA_FORMAT_I8_UNORM;
case GL_INTENSITY16:
- return MESA_FORMAT_I16;
+ return MESA_FORMAT_I16_UNORM;
case GL_INTENSITY16F_ARB:
return MESA_FORMAT_INTENSITY_FLOAT16;
case GL_INTENSITY32F_ARB:
return MESA_FORMAT_INTENSITY_FLOAT32;
case GL_INTENSITY8I_EXT:
- return MESA_FORMAT_INTENSITY_INT8;
+ return MESA_FORMAT_INTENSITY_SINT8;
case GL_INTENSITY16I_EXT:
- return MESA_FORMAT_INTENSITY_INT16;
+ return MESA_FORMAT_INTENSITY_SINT16;
case GL_INTENSITY32I_EXT:
- return MESA_FORMAT_INTENSITY_INT32;
+ return MESA_FORMAT_INTENSITY_SINT32;
case GL_INTENSITY8UI_EXT:
return MESA_FORMAT_INTENSITY_UINT8;
case GL_INTENSITY16UI_EXT:
@@ -3975,7 +3975,7 @@ get_texbuffer_format(const struct gl_context *ctx, GLenum internalFormat)
case GL_RGB32UI:
return MESA_FORMAT_RGB_UINT32;
case GL_RGB32I:
- return MESA_FORMAT_RGB_INT32;
+ return MESA_FORMAT_RGB_SINT32;
default:
break;
}
@@ -3983,19 +3983,19 @@ get_texbuffer_format(const struct gl_context *ctx, GLenum internalFormat)
switch (internalFormat) {
case GL_RGBA8:
- return MESA_FORMAT_RGBA8888_REV;
+ return MESA_FORMAT_RGBA8888_REV_UNORM;
case GL_RGBA16:
- return MESA_FORMAT_RGBA_16;
+ return MESA_FORMAT_RGBA_16_UNORM;
case GL_RGBA16F_ARB:
return MESA_FORMAT_RGBA_FLOAT16;
case GL_RGBA32F_ARB:
return MESA_FORMAT_RGBA_FLOAT32;
case GL_RGBA8I_EXT:
- return MESA_FORMAT_RGBA_INT8;
+ return MESA_FORMAT_RGBA_SINT8;
case GL_RGBA16I_EXT:
- return MESA_FORMAT_RGBA_INT16;
+ return MESA_FORMAT_RGBA_SINT16;
case GL_RGBA32I_EXT:
- return MESA_FORMAT_RGBA_INT32;
+ return MESA_FORMAT_RGBA_SINT32;
case GL_RGBA8UI_EXT:
return MESA_FORMAT_RGBA_UINT8;
case GL_RGBA16UI_EXT:
@@ -4004,19 +4004,19 @@ get_texbuffer_format(const struct gl_context *ctx, GLenum internalFormat)
return MESA_FORMAT_RGBA_UINT32;
case GL_RG8:
- return MESA_FORMAT_GR88;
+ return MESA_FORMAT_GR88_UNORM;
case GL_RG16:
- return MESA_FORMAT_GR1616;
+ return MESA_FORMAT_GR1616_UNORM;
case GL_RG16F:
return MESA_FORMAT_RG_FLOAT16;
case GL_RG32F:
return MESA_FORMAT_RG_FLOAT32;
case GL_RG8I:
- return MESA_FORMAT_RG_INT8;
+ return MESA_FORMAT_RG_SINT8;
case GL_RG16I:
- return MESA_FORMAT_RG_INT16;
+ return MESA_FORMAT_RG_SINT16;
case GL_RG32I:
- return MESA_FORMAT_RG_INT32;
+ return MESA_FORMAT_RG_SINT32;
case GL_RG8UI:
return MESA_FORMAT_RG_UINT8;
case GL_RG16UI:
@@ -4025,19 +4025,19 @@ get_texbuffer_format(const struct gl_context *ctx, GLenum internalFormat)
return MESA_FORMAT_RG_UINT32;
case GL_R8:
- return MESA_FORMAT_R8;
+ return MESA_FORMAT_R8_UNORM;
case GL_R16:
- return MESA_FORMAT_R16;
+ return MESA_FORMAT_R16_UNORM;
case GL_R16F:
return MESA_FORMAT_R_FLOAT16;
case GL_R32F:
return MESA_FORMAT_R_FLOAT32;
case GL_R8I:
- return MESA_FORMAT_R_INT8;
+ return MESA_FORMAT_R_SINT8;
case GL_R16I:
- return MESA_FORMAT_R_INT16;
+ return MESA_FORMAT_R_SINT16;
case GL_R32I:
- return MESA_FORMAT_R_INT32;
+ return MESA_FORMAT_R_SINT32;
case GL_R8UI:
return MESA_FORMAT_R_UINT8;
case GL_R16UI:
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index d6510fe..4a17389 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -156,7 +156,7 @@ _mesa_initialize_texture_object( struct gl_context *ctx,
obj->_Swizzle = SWIZZLE_NOOP;
obj->Sampler.sRGBDecode = GL_DECODE_EXT;
obj->BufferObjectFormat = GL_R8;
- obj->_BufferObjectFormat = MESA_FORMAT_R8;
+ obj->_BufferObjectFormat = MESA_FORMAT_R8_UNORM;
}
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index 5adbd5d..b05ef7e 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -1012,11 +1012,11 @@ _mesa_texstore_z32(TEXSTORE_PARAMS)
const GLuint depthScale = 0xffffffff;
GLenum dstType;
(void) dims;
- ASSERT(dstFormat == MESA_FORMAT_Z32 ||
+ ASSERT(dstFormat == MESA_FORMAT_Z32_UNORM ||
dstFormat == MESA_FORMAT_Z32_FLOAT);
ASSERT(_mesa_get_format_bytes(dstFormat) == sizeof(GLuint));
- if (dstFormat == MESA_FORMAT_Z32)
+ if (dstFormat == MESA_FORMAT_Z32_UNORM)
dstType = GL_UNSIGNED_INT;
else
dstType = GL_FLOAT;
@@ -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_X8_Z24_UNORM);
{
/* 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_Z24_X8_UNORM);
{
/* general path */
@@ -1112,7 +1112,7 @@ _mesa_texstore_z16(TEXSTORE_PARAMS)
{
const GLuint depthScale = 0xffff;
(void) dims;
- ASSERT(dstFormat == MESA_FORMAT_Z16);
+ ASSERT(dstFormat == MESA_FORMAT_Z16_UNORM);
ASSERT(_mesa_get_format_bytes(dstFormat) == sizeof(GLushort));
{
@@ -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_RGB565_UNORM ||
+ dstFormat == MESA_FORMAT_RGB565_REV_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_RGB565_UNORM) {
for (col = 0; col < srcWidth; col++) {
dstUS[col] = PACK_COLOR_565( srcUB[0], srcUB[1], srcUB[2] );
srcUB += 3;
@@ -1190,17 +1190,17 @@ _mesa_texstore_rgb565(TEXSTORE_PARAMS)
/**
- * Store a texture in MESA_FORMAT_RGBA8888 or MESA_FORMAT_RGBA8888_REV.
+ * Store a texture in MESA_FORMAT_RGBA8888_UNORM or MESA_FORMAT_RGBA8888_REV_UNORM.
*/
static GLboolean
_mesa_texstore_rgba8888(TEXSTORE_PARAMS)
{
const GLboolean littleEndian = _mesa_little_endian();
- ASSERT(dstFormat == MESA_FORMAT_RGBA8888 ||
- dstFormat == MESA_FORMAT_RGBA8888_REV ||
- dstFormat == MESA_FORMAT_RGBX8888 ||
- dstFormat == MESA_FORMAT_RGBX8888_REV);
+ ASSERT(dstFormat == MESA_FORMAT_RGBA8888_UNORM ||
+ dstFormat == MESA_FORMAT_RGBA8888_REV_UNORM ||
+ dstFormat == MESA_FORMAT_RGBX8888_UNORM ||
+ dstFormat == MESA_FORMAT_RGBX8888_REV_UNORM);
ASSERT(_mesa_get_format_bytes(dstFormat) == 4);
if (!ctx->_ImageTransferState &&
@@ -1214,10 +1214,10 @@ _mesa_texstore_rgba8888(TEXSTORE_PARAMS)
/* dstmap - how to swizzle from RGBA to dst format:
*/
- if ((littleEndian && (dstFormat == MESA_FORMAT_RGBA8888 ||
- dstFormat == MESA_FORMAT_RGBX8888)) ||
- (!littleEndian && (dstFormat == MESA_FORMAT_RGBA8888_REV ||
- dstFormat == MESA_FORMAT_RGBX8888_REV))) {
+ if ((littleEndian && (dstFormat == MESA_FORMAT_RGBA8888_UNORM ||
+ dstFormat == MESA_FORMAT_RGBX8888_UNORM)) ||
+ (!littleEndian && (dstFormat == MESA_FORMAT_RGBA8888_REV_UNORM ||
+ dstFormat == MESA_FORMAT_RGBX8888_REV_UNORM))) {
dstmap[3] = 0;
dstmap[2] = 1;
dstmap[1] = 2;
@@ -1254,16 +1254,16 @@ _mesa_texstore_argb8888(TEXSTORE_PARAMS)
{
const GLboolean littleEndian = _mesa_little_endian();
- ASSERT(dstFormat == MESA_FORMAT_ARGB8888 ||
- dstFormat == MESA_FORMAT_ARGB8888_REV ||
- dstFormat == MESA_FORMAT_XRGB8888 ||
- dstFormat == MESA_FORMAT_XRGB8888_REV );
+ ASSERT(dstFormat == MESA_FORMAT_ARGB8888_UNORM ||
+ dstFormat == MESA_FORMAT_ARGB8888_REV_UNORM ||
+ dstFormat == MESA_FORMAT_XRGB8888_UNORM ||
+ dstFormat == MESA_FORMAT_XRGB8888_REV_UNORM );
ASSERT(_mesa_get_format_bytes(dstFormat) == 4);
if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
- (dstFormat == MESA_FORMAT_ARGB8888 ||
- dstFormat == MESA_FORMAT_XRGB8888) &&
+ (dstFormat == MESA_FORMAT_ARGB8888_UNORM ||
+ dstFormat == MESA_FORMAT_XRGB8888_UNORM) &&
srcFormat == GL_RGB &&
(baseInternalFormat == GL_RGBA ||
baseInternalFormat == GL_RGB) &&
@@ -1290,7 +1290,7 @@ _mesa_texstore_argb8888(TEXSTORE_PARAMS)
}
else if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
- dstFormat == MESA_FORMAT_ARGB8888 &&
+ dstFormat == MESA_FORMAT_ARGB8888_UNORM &&
srcFormat == GL_LUMINANCE_ALPHA &&
baseInternalFormat == GL_RGBA &&
srcType == GL_UNSIGNED_BYTE) {
@@ -1316,7 +1316,7 @@ _mesa_texstore_argb8888(TEXSTORE_PARAMS)
}
else if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
- dstFormat == MESA_FORMAT_ARGB8888 &&
+ dstFormat == MESA_FORMAT_ARGB8888_UNORM &&
srcFormat == GL_RGBA &&
baseInternalFormat == GL_RGBA &&
srcType == GL_UNSIGNED_BYTE) {
@@ -1358,20 +1358,20 @@ _mesa_texstore_argb8888(TEXSTORE_PARAMS)
/* dstmap - how to swizzle from RGBA to dst format:
*/
- if ((littleEndian && dstFormat == MESA_FORMAT_ARGB8888) ||
- (littleEndian && dstFormat == MESA_FORMAT_XRGB8888) ||
- (!littleEndian && dstFormat == MESA_FORMAT_ARGB8888_REV) ||
- (!littleEndian && dstFormat == MESA_FORMAT_XRGB8888_REV)) {
+ if ((littleEndian && dstFormat == MESA_FORMAT_ARGB8888_UNORM) ||
+ (littleEndian && dstFormat == MESA_FORMAT_XRGB8888_UNORM) ||
+ (!littleEndian && dstFormat == MESA_FORMAT_ARGB8888_REV_UNORM) ||
+ (!littleEndian && dstFormat == MESA_FORMAT_XRGB8888_REV_UNORM)) {
dstmap[3] = 3; /* alpha */
dstmap[2] = 0; /* red */
dstmap[1] = 1; /* green */
dstmap[0] = 2; /* blue */
}
else {
- assert((littleEndian && dstFormat == MESA_FORMAT_ARGB8888_REV) ||
- (!littleEndian && dstFormat == MESA_FORMAT_ARGB8888) ||
- (littleEndian && dstFormat == MESA_FORMAT_XRGB8888_REV) ||
- (!littleEndian && dstFormat == MESA_FORMAT_XRGB8888));
+ assert((littleEndian && dstFormat == MESA_FORMAT_ARGB8888_REV_UNORM) ||
+ (!littleEndian && dstFormat == MESA_FORMAT_ARGB8888_UNORM) ||
+ (littleEndian && dstFormat == MESA_FORMAT_XRGB8888_REV_UNORM) ||
+ (!littleEndian && dstFormat == MESA_FORMAT_XRGB8888_UNORM));
dstmap[3] = 2;
dstmap[2] = 1;
dstmap[1] = 0;
@@ -1525,7 +1525,7 @@ _mesa_texstore_bgr888(TEXSTORE_PARAMS)
static GLboolean
_mesa_texstore_argb2101010(TEXSTORE_PARAMS)
{
- ASSERT(dstFormat == MESA_FORMAT_ARGB2101010 ||
+ ASSERT(dstFormat == MESA_FORMAT_ARGB2101010_UNORM ||
dstFormat == MESA_FORMAT_XRGB2101010_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_AL44_UNORM);
ASSERT(_mesa_get_format_bytes(dstFormat) == 1);
{
@@ -1622,10 +1622,10 @@ _mesa_texstore_unorm88(TEXSTORE_PARAMS)
const GLboolean littleEndian = _mesa_little_endian();
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
- ASSERT(dstFormat == MESA_FORMAT_AL88 ||
- dstFormat == MESA_FORMAT_AL88_REV ||
- dstFormat == MESA_FORMAT_GR88 ||
- dstFormat == MESA_FORMAT_RG88);
+ ASSERT(dstFormat == MESA_FORMAT_AL88_UNORM ||
+ dstFormat == MESA_FORMAT_AL88_REV_UNORM ||
+ dstFormat == MESA_FORMAT_GR88_UNORM ||
+ dstFormat == MESA_FORMAT_RG88_UNORM);
ASSERT(_mesa_get_format_bytes(dstFormat) == 2);
if (!ctx->_ImageTransferState &&
@@ -1637,9 +1637,9 @@ _mesa_texstore_unorm88(TEXSTORE_PARAMS)
/* dstmap - how to swizzle from RGBA to dst format:
*/
- if (dstFormat == MESA_FORMAT_AL88 || dstFormat == MESA_FORMAT_AL88_REV) {
- if ((littleEndian && dstFormat == MESA_FORMAT_AL88) ||
- (!littleEndian && dstFormat == MESA_FORMAT_AL88_REV)) {
+ if (dstFormat == MESA_FORMAT_AL88_UNORM || dstFormat == MESA_FORMAT_AL88_REV_UNORM) {
+ if ((littleEndian && dstFormat == MESA_FORMAT_AL88_UNORM) ||
+ (!littleEndian && dstFormat == MESA_FORMAT_AL88_REV_UNORM)) {
dstmap[0] = 0;
dstmap[1] = 3;
}
@@ -1649,8 +1649,8 @@ _mesa_texstore_unorm88(TEXSTORE_PARAMS)
}
}
else {
- if ((littleEndian && dstFormat == MESA_FORMAT_GR88) ||
- (!littleEndian && dstFormat == MESA_FORMAT_RG88)) {
+ if ((littleEndian && dstFormat == MESA_FORMAT_GR88_UNORM) ||
+ (!littleEndian && dstFormat == MESA_FORMAT_RG88_UNORM)) {
dstmap[0] = 0;
dstmap[1] = 1;
}
@@ -1687,8 +1687,8 @@ _mesa_texstore_unorm88(TEXSTORE_PARAMS)
GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
GLushort *dstUS = (GLushort *) dstRow;
- if (dstFormat == MESA_FORMAT_AL88 ||
- dstFormat == MESA_FORMAT_GR88) {
+ if (dstFormat == MESA_FORMAT_AL88_UNORM ||
+ dstFormat == MESA_FORMAT_GR88_UNORM) {
for (col = 0; col < srcWidth; col++) {
/* src[0] is luminance (or R), src[1] is alpha (or G) */
dstUS[col] = PACK_COLOR_88( src[1],
@@ -1721,10 +1721,10 @@ _mesa_texstore_unorm1616(TEXSTORE_PARAMS)
{
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
- ASSERT(dstFormat == MESA_FORMAT_AL1616 ||
- dstFormat == MESA_FORMAT_AL1616_REV ||
- dstFormat == MESA_FORMAT_GR1616 ||
- dstFormat == MESA_FORMAT_RG1616);
+ ASSERT(dstFormat == MESA_FORMAT_AL1616_UNORM ||
+ dstFormat == MESA_FORMAT_AL1616_REV_UNORM ||
+ dstFormat == MESA_FORMAT_GR1616_UNORM ||
+ dstFormat == MESA_FORMAT_RG1616_UNORM);
ASSERT(_mesa_get_format_bytes(dstFormat) == 4);
{
@@ -1744,8 +1744,8 @@ _mesa_texstore_unorm1616(TEXSTORE_PARAMS)
GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
GLuint *dstUI = (GLuint *) dstRow;
- if (dstFormat == MESA_FORMAT_AL1616 ||
- dstFormat == MESA_FORMAT_GR1616) {
+ if (dstFormat == MESA_FORMAT_AL1616_UNORM ||
+ dstFormat == MESA_FORMAT_GR1616_UNORM) {
for (col = 0; col < srcWidth; col++) {
GLushort l, a;
@@ -1780,10 +1780,10 @@ _mesa_texstore_unorm16(TEXSTORE_PARAMS)
{
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
- ASSERT(dstFormat == MESA_FORMAT_R16 ||
- dstFormat == MESA_FORMAT_A16 ||
- dstFormat == MESA_FORMAT_L16 ||
- dstFormat == MESA_FORMAT_I16);
+ ASSERT(dstFormat == MESA_FORMAT_R16_UNORM ||
+ dstFormat == MESA_FORMAT_A16_UNORM ||
+ dstFormat == MESA_FORMAT_L16_UNORM ||
+ dstFormat == MESA_FORMAT_I16_UNORM);
ASSERT(_mesa_get_format_bytes(dstFormat) == 2);
{
@@ -1822,7 +1822,7 @@ _mesa_texstore_unorm16(TEXSTORE_PARAMS)
static GLboolean
_mesa_texstore_rgba_16(TEXSTORE_PARAMS)
{
- ASSERT(dstFormat == MESA_FORMAT_RGBA_16 ||
+ ASSERT(dstFormat == MESA_FORMAT_RGBA_16_UNORM ||
dstFormat == MESA_FORMAT_XBGR16161616_UNORM);
ASSERT(_mesa_get_format_bytes(dstFormat) == 8);
@@ -1874,8 +1874,8 @@ _mesa_texstore_signed_rgba_16(TEXSTORE_PARAMS)
{
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
- ASSERT(dstFormat == MESA_FORMAT_SIGNED_RGB_16 ||
- dstFormat == MESA_FORMAT_SIGNED_RGBA_16 ||
+ ASSERT(dstFormat == MESA_FORMAT_RGB_16_SNORM ||
+ dstFormat == MESA_FORMAT_RGBA_16_SNORM ||
dstFormat == MESA_FORMAT_XBGR16161616_SNORM);
{
@@ -1901,7 +1901,7 @@ _mesa_texstore_signed_rgba_16(TEXSTORE_PARAMS)
GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
GLshort *dstRowS = (GLshort *) dstRow;
- if (dstFormat == MESA_FORMAT_SIGNED_RGBA_16) {
+ if (dstFormat == MESA_FORMAT_RGBA_16_SNORM) {
for (col = 0; col < srcWidth; col++) {
GLuint c;
for (c = 0; c < comps; c++) {
@@ -1955,10 +1955,10 @@ _mesa_texstore_unorm8(TEXSTORE_PARAMS)
{
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
- ASSERT(dstFormat == MESA_FORMAT_A8 ||
- dstFormat == MESA_FORMAT_L8 ||
- dstFormat == MESA_FORMAT_I8 ||
- dstFormat == MESA_FORMAT_R8);
+ ASSERT(dstFormat == MESA_FORMAT_A8_UNORM ||
+ dstFormat == MESA_FORMAT_L8_UNORM ||
+ dstFormat == MESA_FORMAT_I8_UNORM ||
+ dstFormat == MESA_FORMAT_R8_UNORM);
ASSERT(_mesa_get_format_bytes(dstFormat) == 1);
if (!ctx->_ImageTransferState &&
@@ -1969,7 +1969,7 @@ _mesa_texstore_unorm8(TEXSTORE_PARAMS)
/* dstmap - how to swizzle from RGBA to dst format:
*/
- if (dstFormat == MESA_FORMAT_A8) {
+ if (dstFormat == MESA_FORMAT_A8_UNORM) {
dstmap[0] = 3;
}
else {
@@ -2147,10 +2147,10 @@ _mesa_texstore_snorm8(TEXSTORE_PARAMS)
{
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
- ASSERT(dstFormat == MESA_FORMAT_SIGNED_A8 ||
- dstFormat == MESA_FORMAT_SIGNED_L8 ||
- dstFormat == MESA_FORMAT_SIGNED_I8 ||
- dstFormat == MESA_FORMAT_SIGNED_R8);
+ ASSERT(dstFormat == MESA_FORMAT_A8_SNORM ||
+ dstFormat == MESA_FORMAT_L8_SNORM ||
+ dstFormat == MESA_FORMAT_I8_SNORM ||
+ dstFormat == MESA_FORMAT_R8_SNORM);
ASSERT(_mesa_get_format_bytes(dstFormat) == 1);
{
@@ -2190,8 +2190,8 @@ _mesa_texstore_snorm88(TEXSTORE_PARAMS)
{
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
- ASSERT(dstFormat == MESA_FORMAT_SIGNED_AL88 ||
- dstFormat == MESA_FORMAT_SIGNED_RG88_REV);
+ ASSERT(dstFormat == MESA_FORMAT_AL88_SNORM ||
+ dstFormat == MESA_FORMAT_RG88_REV_SNORM);
ASSERT(_mesa_get_format_bytes(dstFormat) == 2);
{
@@ -2231,10 +2231,10 @@ _mesa_texstore_snorm16(TEXSTORE_PARAMS)
{
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
- ASSERT(dstFormat == MESA_FORMAT_SIGNED_R16 ||
- dstFormat == MESA_FORMAT_SIGNED_A16 ||
- dstFormat == MESA_FORMAT_SIGNED_L16 ||
- dstFormat == MESA_FORMAT_SIGNED_I16);
+ ASSERT(dstFormat == MESA_FORMAT_R16_SNORM ||
+ dstFormat == MESA_FORMAT_A16_SNORM ||
+ dstFormat == MESA_FORMAT_L16_SNORM ||
+ dstFormat == MESA_FORMAT_I16_SNORM);
ASSERT(_mesa_get_format_bytes(dstFormat) == 2);
{
@@ -2277,8 +2277,8 @@ _mesa_texstore_snorm1616(TEXSTORE_PARAMS)
{
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
- ASSERT(dstFormat == MESA_FORMAT_SIGNED_AL1616 ||
- dstFormat == MESA_FORMAT_SIGNED_GR1616);
+ ASSERT(dstFormat == MESA_FORMAT_AL1616_SNORM ||
+ dstFormat == MESA_FORMAT_GR1616_SNORM);
ASSERT(_mesa_get_format_bytes(dstFormat) == 4);
{
@@ -2317,7 +2317,7 @@ _mesa_texstore_snorm1616(TEXSTORE_PARAMS)
}
/**
- * Store a texture in MESA_FORMAT_SIGNED_RGBX8888 or
+ * Store a texture in MESA_FORMAT_RGBX8888_SNORM or
* MESA_FORMAT_XBGR8888_SNORM.
*/
static GLboolean
@@ -2325,7 +2325,7 @@ _mesa_texstore_signed_rgbx8888(TEXSTORE_PARAMS)
{
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
- ASSERT(dstFormat == MESA_FORMAT_SIGNED_RGBX8888 ||
+ ASSERT(dstFormat == MESA_FORMAT_RGBX8888_SNORM ||
dstFormat == MESA_FORMAT_XBGR8888_SNORM);
ASSERT(_mesa_get_format_bytes(dstFormat) == 4);
@@ -2346,7 +2346,7 @@ _mesa_texstore_signed_rgbx8888(TEXSTORE_PARAMS)
GLbyte *dstRow = (GLbyte *) dstSlices[img];
for (row = 0; row < srcHeight; row++) {
GLbyte *dst = dstRow;
- if (dstFormat == MESA_FORMAT_SIGNED_RGBX8888) {
+ if (dstFormat == MESA_FORMAT_RGBX8888_SNORM) {
for (col = 0; col < srcWidth; col++) {
dst[3] = FLOAT_TO_BYTE_TEX(srcRow[RCOMP]);
dst[2] = FLOAT_TO_BYTE_TEX(srcRow[GCOMP]);
@@ -2377,16 +2377,16 @@ _mesa_texstore_signed_rgbx8888(TEXSTORE_PARAMS)
/**
- * Store a texture in MESA_FORMAT_SIGNED_RGBA8888 or
- * MESA_FORMAT_SIGNED_RGBA8888_REV
+ * Store a texture in MESA_FORMAT_RGBA8888_SNORM or
+ * MESA_FORMAT_RGBA8888_REV_SNORM
*/
static GLboolean
_mesa_texstore_signed_rgba8888(TEXSTORE_PARAMS)
{
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
- ASSERT(dstFormat == MESA_FORMAT_SIGNED_RGBA8888 ||
- dstFormat == MESA_FORMAT_SIGNED_RGBA8888_REV);
+ ASSERT(dstFormat == MESA_FORMAT_RGBA8888_SNORM ||
+ dstFormat == MESA_FORMAT_RGBA8888_REV_SNORM);
ASSERT(_mesa_get_format_bytes(dstFormat) == 4);
{
@@ -2406,7 +2406,7 @@ _mesa_texstore_signed_rgba8888(TEXSTORE_PARAMS)
GLbyte *dstRow = (GLbyte *) dstSlices[img];
for (row = 0; row < srcHeight; row++) {
GLbyte *dst = dstRow;
- if (dstFormat == MESA_FORMAT_SIGNED_RGBA8888) {
+ if (dstFormat == MESA_FORMAT_RGBA8888_SNORM) {
for (col = 0; col < srcWidth; col++) {
dst[3] = FLOAT_TO_BYTE_TEX(srcRow[RCOMP]);
dst[2] = FLOAT_TO_BYTE_TEX(srcRow[GCOMP]);
@@ -2446,7 +2446,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_Z24_UNORM_S8_UINT);
ASSERT(srcFormat == GL_DEPTH_STENCIL_EXT ||
srcFormat == GL_DEPTH_COMPONENT ||
srcFormat == GL_STENCIL_INDEX);
@@ -2530,7 +2530,7 @@ _mesa_texstore_s8_z24(TEXSTORE_PARAMS)
GLuint *depth;
GLubyte *stencil;
- ASSERT(dstFormat == MESA_FORMAT_S8_Z24);
+ ASSERT(dstFormat == MESA_FORMAT_S8_UINT_Z24_UNORM);
ASSERT(srcFormat == GL_DEPTH_STENCIL_EXT ||
srcFormat == GL_DEPTH_COMPONENT ||
srcFormat == GL_STENCIL_INDEX);
@@ -2606,7 +2606,7 @@ _mesa_texstore_s8_z24(TEXSTORE_PARAMS)
static GLboolean
_mesa_texstore_s8(TEXSTORE_PARAMS)
{
- ASSERT(dstFormat == MESA_FORMAT_S8);
+ ASSERT(dstFormat == MESA_FORMAT_S8_UNORM);
ASSERT(srcFormat == GL_STENCIL_INDEX);
{
@@ -2800,14 +2800,14 @@ _mesa_texstore_rgba_int8(TEXSTORE_PARAMS)
components = 4;
}
- ASSERT(dstFormat == MESA_FORMAT_R_INT8 ||
- dstFormat == MESA_FORMAT_RG_INT8 ||
- dstFormat == MESA_FORMAT_RGB_INT8 ||
- dstFormat == MESA_FORMAT_RGBA_INT8 ||
- dstFormat == MESA_FORMAT_ALPHA_INT8 ||
- dstFormat == MESA_FORMAT_INTENSITY_INT8 ||
- dstFormat == MESA_FORMAT_LUMINANCE_INT8 ||
- dstFormat == MESA_FORMAT_LUMINANCE_ALPHA_INT8 ||
+ ASSERT(dstFormat == MESA_FORMAT_R_SINT8 ||
+ dstFormat == MESA_FORMAT_RG_SINT8 ||
+ dstFormat == MESA_FORMAT_RGB_SINT8 ||
+ dstFormat == MESA_FORMAT_RGBA_SINT8 ||
+ dstFormat == MESA_FORMAT_ALPHA_SINT8 ||
+ dstFormat == MESA_FORMAT_INTENSITY_SINT8 ||
+ dstFormat == MESA_FORMAT_LUMINANCE_SINT8 ||
+ dstFormat == MESA_FORMAT_LUMINANCE_ALPHA_SINT8 ||
dstFormat == MESA_FORMAT_XBGR8888_SINT);
ASSERT(baseInternalFormat == GL_RGBA ||
baseInternalFormat == GL_RGB ||
@@ -2871,14 +2871,14 @@ _mesa_texstore_rgba_int16(TEXSTORE_PARAMS)
components = 4;
}
- ASSERT(dstFormat == MESA_FORMAT_R_INT16 ||
- dstFormat == MESA_FORMAT_RG_INT16 ||
- dstFormat == MESA_FORMAT_RGB_INT16 ||
- dstFormat == MESA_FORMAT_RGBA_INT16 ||
- dstFormat == MESA_FORMAT_ALPHA_INT16 ||
+ ASSERT(dstFormat == MESA_FORMAT_R_SINT16 ||
+ dstFormat == MESA_FORMAT_RG_SINT16 ||
+ dstFormat == MESA_FORMAT_RGB_SINT16 ||
+ dstFormat == MESA_FORMAT_RGBA_SINT16 ||
+ dstFormat == MESA_FORMAT_ALPHA_SINT16 ||
dstFormat == MESA_FORMAT_LUMINANCE_INT16 ||
- dstFormat == MESA_FORMAT_INTENSITY_INT16 ||
- dstFormat == MESA_FORMAT_LUMINANCE_ALPHA_INT16 ||
+ dstFormat == MESA_FORMAT_INTENSITY_SINT16 ||
+ dstFormat == MESA_FORMAT_LUMINANCE_ALPHA_SINT16 ||
dstFormat == MESA_FORMAT_XBGR16161616_SINT);
ASSERT(baseInternalFormat == GL_RGBA ||
baseInternalFormat == GL_RGB ||
@@ -2942,14 +2942,14 @@ _mesa_texstore_rgba_int32(TEXSTORE_PARAMS)
components = 4;
}
- ASSERT(dstFormat == MESA_FORMAT_R_INT32 ||
- dstFormat == MESA_FORMAT_RG_INT32 ||
- dstFormat == MESA_FORMAT_RGB_INT32 ||
- dstFormat == MESA_FORMAT_RGBA_INT32 ||
+ ASSERT(dstFormat == MESA_FORMAT_R_SINT32 ||
+ dstFormat == MESA_FORMAT_RG_SINT32 ||
+ dstFormat == MESA_FORMAT_RGB_SINT32 ||
+ dstFormat == MESA_FORMAT_RGBA_SINT32 ||
dstFormat == MESA_FORMAT_ALPHA_INT32 ||
- dstFormat == MESA_FORMAT_INTENSITY_INT32 ||
+ dstFormat == MESA_FORMAT_INTENSITY_SINT32 ||
dstFormat == MESA_FORMAT_LUMINANCE_INT32 ||
- dstFormat == MESA_FORMAT_LUMINANCE_ALPHA_INT32 ||
+ dstFormat == MESA_FORMAT_LUMINANCE_ALPHA_SINT32 ||
dstFormat == MESA_FORMAT_XBGR32323232_SINT);
ASSERT(baseInternalFormat == GL_RGBA ||
baseInternalFormat == GL_RGB ||
@@ -3236,10 +3236,10 @@ _mesa_texstore_srgba8(TEXSTORE_PARAMS)
/* reuse normal rgba texstore code */
if (dstFormat == MESA_FORMAT_SRGBA8) {
- newDstFormat = MESA_FORMAT_RGBA8888;
+ newDstFormat = MESA_FORMAT_RGBA8888_UNORM;
}
else if (dstFormat == MESA_FORMAT_XBGR8888_SRGB) {
- newDstFormat = MESA_FORMAT_RGBX8888_REV;
+ newDstFormat = MESA_FORMAT_RGBX8888_REV_UNORM;
}
else {
ASSERT(0);
@@ -3265,7 +3265,7 @@ _mesa_texstore_sargb8(TEXSTORE_PARAMS)
ASSERT(dstFormat == MESA_FORMAT_SARGB8);
/* reuse normal rgba texstore code */
- newDstFormat = MESA_FORMAT_ARGB8888;
+ newDstFormat = MESA_FORMAT_ARGB8888_UNORM;
k = _mesa_texstore_argb8888(ctx, dims, baseInternalFormat,
newDstFormat,
@@ -3285,7 +3285,7 @@ _mesa_texstore_sl8(TEXSTORE_PARAMS)
ASSERT(dstFormat == MESA_FORMAT_SL8);
- newDstFormat = MESA_FORMAT_L8;
+ newDstFormat = MESA_FORMAT_L8_UNORM;
/* _mesa_textore_a8 handles luminance8 too */
k = _mesa_texstore_unorm8(ctx, dims, baseInternalFormat,
@@ -3307,7 +3307,7 @@ _mesa_texstore_sla8(TEXSTORE_PARAMS)
ASSERT(dstFormat == MESA_FORMAT_SLA8);
/* reuse normal luminance/alpha texstore code */
- newDstFormat = MESA_FORMAT_AL88;
+ newDstFormat = MESA_FORMAT_AL88_UNORM;
k = _mesa_texstore_unorm88(ctx, dims, baseInternalFormat,
newDstFormat,
@@ -3588,51 +3588,51 @@ _mesa_get_texstore_func(gl_format format)
if (!initialized) {
table[MESA_FORMAT_NONE] = _mesa_texstore_null;
- table[MESA_FORMAT_RGBA8888] = _mesa_texstore_rgba8888;
- table[MESA_FORMAT_RGBA8888_REV] = _mesa_texstore_rgba8888;
- table[MESA_FORMAT_ARGB8888] = _mesa_texstore_argb8888;
- table[MESA_FORMAT_ARGB8888_REV] = _mesa_texstore_argb8888;
- table[MESA_FORMAT_RGBX8888] = _mesa_texstore_rgba8888;
- table[MESA_FORMAT_RGBX8888_REV] = _mesa_texstore_rgba8888;
- table[MESA_FORMAT_XRGB8888] = _mesa_texstore_argb8888;
- table[MESA_FORMAT_XRGB8888_REV] = _mesa_texstore_argb8888;
+ table[MESA_FORMAT_RGBA8888_UNORM] = _mesa_texstore_rgba8888;
+ table[MESA_FORMAT_RGBA8888_REV_UNORM] = _mesa_texstore_rgba8888;
+ table[MESA_FORMAT_ARGB8888_UNORM] = _mesa_texstore_argb8888;
+ table[MESA_FORMAT_ARGB8888_REV_UNORM] = _mesa_texstore_argb8888;
+ table[MESA_FORMAT_RGBX8888_UNORM] = _mesa_texstore_rgba8888;
+ table[MESA_FORMAT_RGBX8888_REV_UNORM] = _mesa_texstore_rgba8888;
+ table[MESA_FORMAT_XRGB8888_UNORM] = _mesa_texstore_argb8888;
+ table[MESA_FORMAT_XRGB8888_REV_UNORM] = _mesa_texstore_argb8888;
table[MESA_FORMAT_RGB888] = _mesa_texstore_rgb888;
table[MESA_FORMAT_BGR888] = _mesa_texstore_bgr888;
- table[MESA_FORMAT_RGB565] = _mesa_texstore_rgb565;
- table[MESA_FORMAT_RGB565_REV] = _mesa_texstore_rgb565;
- table[MESA_FORMAT_ARGB4444] = store_ubyte_texture;
- table[MESA_FORMAT_ARGB4444_REV] = store_ubyte_texture;
- table[MESA_FORMAT_RGBA5551] = store_ubyte_texture;
- table[MESA_FORMAT_ARGB1555] = store_ubyte_texture;
- table[MESA_FORMAT_ARGB1555_REV] = store_ubyte_texture;
- table[MESA_FORMAT_AL44] = _mesa_texstore_unorm44;
- table[MESA_FORMAT_AL88] = _mesa_texstore_unorm88;
- table[MESA_FORMAT_AL88_REV] = _mesa_texstore_unorm88;
- table[MESA_FORMAT_AL1616] = _mesa_texstore_unorm1616;
- table[MESA_FORMAT_AL1616_REV] = _mesa_texstore_unorm1616;
- table[MESA_FORMAT_RGB332] = store_ubyte_texture;
- table[MESA_FORMAT_A8] = _mesa_texstore_unorm8;
- table[MESA_FORMAT_A16] = _mesa_texstore_unorm16;
- table[MESA_FORMAT_L8] = _mesa_texstore_unorm8;
- table[MESA_FORMAT_L16] = _mesa_texstore_unorm16;
- table[MESA_FORMAT_I8] = _mesa_texstore_unorm8;
- table[MESA_FORMAT_I16] = _mesa_texstore_unorm16;
+ table[MESA_FORMAT_RGB565_UNORM] = _mesa_texstore_rgb565;
+ table[MESA_FORMAT_RGB565_REV_UNORM] = _mesa_texstore_rgb565;
+ table[MESA_FORMAT_ARGB4444_UNORM] = store_ubyte_texture;
+ table[MESA_FORMAT_ARGB4444_REV_UNORM] = store_ubyte_texture;
+ table[MESA_FORMAT_RGBA5551_UNORM] = store_ubyte_texture;
+ table[MESA_FORMAT_ARGB1555_UNORM] = store_ubyte_texture;
+ table[MESA_FORMAT_ARGB1555_REV_UNORM] = store_ubyte_texture;
+ table[MESA_FORMAT_AL44_UNORM] = _mesa_texstore_unorm44;
+ table[MESA_FORMAT_AL88_UNORM] = _mesa_texstore_unorm88;
+ table[MESA_FORMAT_AL88_REV_UNORM] = _mesa_texstore_unorm88;
+ table[MESA_FORMAT_AL1616_UNORM] = _mesa_texstore_unorm1616;
+ table[MESA_FORMAT_AL1616_REV_UNORM] = _mesa_texstore_unorm1616;
+ table[MESA_FORMAT_RGB332_UNORM] = store_ubyte_texture;
+ table[MESA_FORMAT_A8_UNORM] = _mesa_texstore_unorm8;
+ table[MESA_FORMAT_A16_UNORM] = _mesa_texstore_unorm16;
+ table[MESA_FORMAT_L8_UNORM] = _mesa_texstore_unorm8;
+ table[MESA_FORMAT_L16_UNORM] = _mesa_texstore_unorm16;
+ table[MESA_FORMAT_I8_UNORM] = _mesa_texstore_unorm8;
+ table[MESA_FORMAT_I16_UNORM] = _mesa_texstore_unorm16;
table[MESA_FORMAT_YCBCR] = _mesa_texstore_ycbcr;
table[MESA_FORMAT_YCBCR_REV] = _mesa_texstore_ycbcr;
- table[MESA_FORMAT_R8] = _mesa_texstore_unorm8;
- table[MESA_FORMAT_GR88] = _mesa_texstore_unorm88;
- table[MESA_FORMAT_RG88] = _mesa_texstore_unorm88;
- table[MESA_FORMAT_R16] = _mesa_texstore_unorm16;
- table[MESA_FORMAT_GR1616] = _mesa_texstore_unorm1616;
- table[MESA_FORMAT_RG1616] = _mesa_texstore_unorm1616;
- table[MESA_FORMAT_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_Z16] = _mesa_texstore_z16;
- table[MESA_FORMAT_X8_Z24] = _mesa_texstore_x8_z24;
- table[MESA_FORMAT_Z24_X8] = _mesa_texstore_z24_x8;
- table[MESA_FORMAT_Z32] = _mesa_texstore_z32;
- table[MESA_FORMAT_S8] = _mesa_texstore_s8;
+ table[MESA_FORMAT_R8_UNORM] = _mesa_texstore_unorm8;
+ table[MESA_FORMAT_GR88_UNORM] = _mesa_texstore_unorm88;
+ table[MESA_FORMAT_RG88_UNORM] = _mesa_texstore_unorm88;
+ table[MESA_FORMAT_R16_UNORM] = _mesa_texstore_unorm16;
+ table[MESA_FORMAT_GR1616_UNORM] = _mesa_texstore_unorm1616;
+ table[MESA_FORMAT_RG1616_UNORM] = _mesa_texstore_unorm1616;
+ table[MESA_FORMAT_ARGB2101010_UNORM] = _mesa_texstore_argb2101010;
+ table[MESA_FORMAT_Z24_UNORM_S8_UINT] = _mesa_texstore_z24_s8;
+ table[MESA_FORMAT_S8_UINT_Z24_UNORM] = _mesa_texstore_s8_z24;
+ table[MESA_FORMAT_Z16_UNORM] = _mesa_texstore_z16;
+ table[MESA_FORMAT_X8_Z24_UNORM] = _mesa_texstore_x8_z24;
+ table[MESA_FORMAT_Z24_X8_UNORM] = _mesa_texstore_z24_x8;
+ table[MESA_FORMAT_Z32_UNORM] = _mesa_texstore_z32;
+ table[MESA_FORMAT_S8_UNORM] = _mesa_texstore_s8;
table[MESA_FORMAT_SRGB8] = _mesa_texstore_srgb8;
table[MESA_FORMAT_SRGBA8] = _mesa_texstore_srgba8;
table[MESA_FORMAT_SARGB8] = _mesa_texstore_sargb8;
@@ -3665,16 +3665,16 @@ _mesa_get_texstore_func(gl_format format)
table[MESA_FORMAT_RG_FLOAT32] = _mesa_texstore_rgba_float32;
table[MESA_FORMAT_RG_FLOAT16] = _mesa_texstore_rgba_float16;
table[MESA_FORMAT_DUDV8] = _mesa_texstore_dudv8;
- table[MESA_FORMAT_SIGNED_R8] = _mesa_texstore_snorm8;
- table[MESA_FORMAT_SIGNED_RG88_REV] = _mesa_texstore_snorm88;
- table[MESA_FORMAT_SIGNED_RGBX8888] = _mesa_texstore_signed_rgbx8888;
- table[MESA_FORMAT_SIGNED_RGBA8888] = _mesa_texstore_signed_rgba8888;
- table[MESA_FORMAT_SIGNED_RGBA8888_REV] = _mesa_texstore_signed_rgba8888;
- table[MESA_FORMAT_SIGNED_R16] = _mesa_texstore_snorm16;
- table[MESA_FORMAT_SIGNED_GR1616] = _mesa_texstore_snorm1616;
- table[MESA_FORMAT_SIGNED_RGB_16] = _mesa_texstore_signed_rgba_16;
- table[MESA_FORMAT_SIGNED_RGBA_16] = _mesa_texstore_signed_rgba_16;
- table[MESA_FORMAT_RGBA_16] = _mesa_texstore_rgba_16;
+ table[MESA_FORMAT_R8_SNORM] = _mesa_texstore_snorm8;
+ table[MESA_FORMAT_RG88_REV_SNORM] = _mesa_texstore_snorm88;
+ table[MESA_FORMAT_RGBX8888_SNORM] = _mesa_texstore_signed_rgbx8888;
+ table[MESA_FORMAT_RGBA8888_SNORM] = _mesa_texstore_signed_rgba8888;
+ table[MESA_FORMAT_RGBA8888_REV_SNORM] = _mesa_texstore_signed_rgba8888;
+ table[MESA_FORMAT_R16_SNORM] = _mesa_texstore_snorm16;
+ table[MESA_FORMAT_GR1616_SNORM] = _mesa_texstore_snorm1616;
+ table[MESA_FORMAT_RGB_16_SNORM] = _mesa_texstore_signed_rgba_16;
+ table[MESA_FORMAT_RGBA_16_SNORM] = _mesa_texstore_signed_rgba_16;
+ table[MESA_FORMAT_RGBA_16_UNORM] = _mesa_texstore_rgba_16;
table[MESA_FORMAT_RED_RGTC1] = _mesa_texstore_red_rgtc1;
table[MESA_FORMAT_SIGNED_RED_RGTC1] = _mesa_texstore_signed_red_rgtc1;
table[MESA_FORMAT_RG_RGTC2] = _mesa_texstore_rg_rgtc2;
@@ -3696,14 +3696,14 @@ _mesa_get_texstore_func(gl_format format)
_mesa_texstore_etc2_rgb8_punchthrough_alpha1;
table[MESA_FORMAT_ETC2_SRGB8_PUNCHTHROUGH_ALPHA1] =
_mesa_texstore_etc2_srgb8_punchthrough_alpha1;
- table[MESA_FORMAT_SIGNED_A8] = _mesa_texstore_snorm8;
- table[MESA_FORMAT_SIGNED_L8] = _mesa_texstore_snorm8;
- table[MESA_FORMAT_SIGNED_AL88] = _mesa_texstore_snorm88;
- table[MESA_FORMAT_SIGNED_I8] = _mesa_texstore_snorm8;
- table[MESA_FORMAT_SIGNED_A16] = _mesa_texstore_snorm16;
- 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_A8_SNORM] = _mesa_texstore_snorm8;
+ table[MESA_FORMAT_L8_SNORM] = _mesa_texstore_snorm8;
+ table[MESA_FORMAT_AL88_SNORM] = _mesa_texstore_snorm88;
+ table[MESA_FORMAT_I8_SNORM] = _mesa_texstore_snorm8;
+ table[MESA_FORMAT_A16_SNORM] = _mesa_texstore_snorm16;
+ table[MESA_FORMAT_L16_SNORM] = _mesa_texstore_snorm16;
+ table[MESA_FORMAT_AL1616_SNORM] = _mesa_texstore_snorm1616;
+ table[MESA_FORMAT_I16_SNORM] = _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_Z32_FLOAT] = _mesa_texstore_z32;
@@ -3712,43 +3712,43 @@ _mesa_get_texstore_func(gl_format format)
table[MESA_FORMAT_ALPHA_UINT8] = _mesa_texstore_rgba_uint8;
table[MESA_FORMAT_ALPHA_UINT16] = _mesa_texstore_rgba_uint16;
table[MESA_FORMAT_ALPHA_UINT32] = _mesa_texstore_rgba_uint32;
- table[MESA_FORMAT_ALPHA_INT8] = _mesa_texstore_rgba_int8;
- table[MESA_FORMAT_ALPHA_INT16] = _mesa_texstore_rgba_int16;
+ table[MESA_FORMAT_ALPHA_SINT8] = _mesa_texstore_rgba_int8;
+ table[MESA_FORMAT_ALPHA_SINT16] = _mesa_texstore_rgba_int16;
table[MESA_FORMAT_ALPHA_INT32] = _mesa_texstore_rgba_int32;
table[MESA_FORMAT_INTENSITY_UINT8] = _mesa_texstore_rgba_uint8;
table[MESA_FORMAT_INTENSITY_UINT16] = _mesa_texstore_rgba_uint16;
table[MESA_FORMAT_INTENSITY_UINT32] = _mesa_texstore_rgba_uint32;
- table[MESA_FORMAT_INTENSITY_INT8] = _mesa_texstore_rgba_int8;
- table[MESA_FORMAT_INTENSITY_INT16] = _mesa_texstore_rgba_int16;
- table[MESA_FORMAT_INTENSITY_INT32] = _mesa_texstore_rgba_int32;
+ table[MESA_FORMAT_INTENSITY_SINT8] = _mesa_texstore_rgba_int8;
+ table[MESA_FORMAT_INTENSITY_SINT16] = _mesa_texstore_rgba_int16;
+ table[MESA_FORMAT_INTENSITY_SINT32] = _mesa_texstore_rgba_int32;
table[MESA_FORMAT_LUMINANCE_UINT8] = _mesa_texstore_rgba_uint8;
table[MESA_FORMAT_LUMINANCE_UINT16] = _mesa_texstore_rgba_uint16;
table[MESA_FORMAT_LUMINANCE_UINT32] = _mesa_texstore_rgba_uint32;
- table[MESA_FORMAT_LUMINANCE_INT8] = _mesa_texstore_rgba_int8;
+ table[MESA_FORMAT_LUMINANCE_SINT8] = _mesa_texstore_rgba_int8;
table[MESA_FORMAT_LUMINANCE_INT16] = _mesa_texstore_rgba_int16;
table[MESA_FORMAT_LUMINANCE_INT32] = _mesa_texstore_rgba_int32;
table[MESA_FORMAT_LUMINANCE_ALPHA_UINT8] = _mesa_texstore_rgba_uint8;
table[MESA_FORMAT_LUMINANCE_ALPHA_UINT16] = _mesa_texstore_rgba_uint16;
table[MESA_FORMAT_LUMINANCE_ALPHA_UINT32] = _mesa_texstore_rgba_uint32;
- table[MESA_FORMAT_LUMINANCE_ALPHA_INT8] = _mesa_texstore_rgba_int8;
- table[MESA_FORMAT_LUMINANCE_ALPHA_INT16] = _mesa_texstore_rgba_int16;
- table[MESA_FORMAT_LUMINANCE_ALPHA_INT32] = _mesa_texstore_rgba_int32;
-
- table[MESA_FORMAT_R_INT8] = _mesa_texstore_rgba_int8;
- table[MESA_FORMAT_RG_INT8] = _mesa_texstore_rgba_int8;
- table[MESA_FORMAT_RGB_INT8] = _mesa_texstore_rgba_int8;
- table[MESA_FORMAT_RGBA_INT8] = _mesa_texstore_rgba_int8;
- table[MESA_FORMAT_R_INT16] = _mesa_texstore_rgba_int16;
- table[MESA_FORMAT_RG_INT16] = _mesa_texstore_rgba_int16;
- table[MESA_FORMAT_RGB_INT16] = _mesa_texstore_rgba_int16;
- table[MESA_FORMAT_RGBA_INT16] = _mesa_texstore_rgba_int16;
- table[MESA_FORMAT_R_INT32] = _mesa_texstore_rgba_int32;
- table[MESA_FORMAT_RG_INT32] = _mesa_texstore_rgba_int32;
- table[MESA_FORMAT_RGB_INT32] = _mesa_texstore_rgba_int32;
- table[MESA_FORMAT_RGBA_INT32] = _mesa_texstore_rgba_int32;
+ table[MESA_FORMAT_LUMINANCE_ALPHA_SINT8] = _mesa_texstore_rgba_int8;
+ table[MESA_FORMAT_LUMINANCE_ALPHA_SINT16] = _mesa_texstore_rgba_int16;
+ table[MESA_FORMAT_LUMINANCE_ALPHA_SINT32] = _mesa_texstore_rgba_int32;
+
+ table[MESA_FORMAT_R_SINT8] = _mesa_texstore_rgba_int8;
+ table[MESA_FORMAT_RG_SINT8] = _mesa_texstore_rgba_int8;
+ table[MESA_FORMAT_RGB_SINT8] = _mesa_texstore_rgba_int8;
+ table[MESA_FORMAT_RGBA_SINT8] = _mesa_texstore_rgba_int8;
+ table[MESA_FORMAT_R_SINT16] = _mesa_texstore_rgba_int16;
+ table[MESA_FORMAT_RG_SINT16] = _mesa_texstore_rgba_int16;
+ table[MESA_FORMAT_RGB_SINT16] = _mesa_texstore_rgba_int16;
+ table[MESA_FORMAT_RGBA_SINT16] = _mesa_texstore_rgba_int16;
+ table[MESA_FORMAT_R_SINT32] = _mesa_texstore_rgba_int32;
+ table[MESA_FORMAT_RG_SINT32] = _mesa_texstore_rgba_int32;
+ table[MESA_FORMAT_RGB_SINT32] = _mesa_texstore_rgba_int32;
+ table[MESA_FORMAT_RGBA_SINT32] = _mesa_texstore_rgba_int32;
table[MESA_FORMAT_R_UINT8] = _mesa_texstore_rgba_uint8;
table[MESA_FORMAT_RG_UINT8] = _mesa_texstore_rgba_uint8;
diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c
index 6acf983..9e0a282 100644
--- a/src/mesa/state_tracker/st_format.c
+++ b/src/mesa/state_tracker/st_format.c
@@ -57,63 +57,63 @@ enum pipe_format
st_mesa_format_to_pipe_format(gl_format mesaFormat)
{
switch (mesaFormat) {
- case MESA_FORMAT_RGBA8888:
+ case MESA_FORMAT_RGBA8888_UNORM:
return PIPE_FORMAT_ABGR8888_UNORM;
- case MESA_FORMAT_RGBA8888_REV:
+ case MESA_FORMAT_RGBA8888_REV_UNORM:
return PIPE_FORMAT_RGBA8888_UNORM;
- case MESA_FORMAT_ARGB8888:
+ case MESA_FORMAT_ARGB8888_UNORM:
return PIPE_FORMAT_BGRA8888_UNORM;
- case MESA_FORMAT_ARGB8888_REV:
+ case MESA_FORMAT_ARGB8888_REV_UNORM:
return PIPE_FORMAT_ARGB8888_UNORM;
- case MESA_FORMAT_RGBX8888:
+ case MESA_FORMAT_RGBX8888_UNORM:
return PIPE_FORMAT_XBGR8888_UNORM;
- case MESA_FORMAT_RGBX8888_REV:
+ case MESA_FORMAT_RGBX8888_REV_UNORM:
return PIPE_FORMAT_RGBX8888_UNORM;
- case MESA_FORMAT_XRGB8888:
+ case MESA_FORMAT_XRGB8888_UNORM:
return PIPE_FORMAT_BGRX8888_UNORM;
- case MESA_FORMAT_XRGB8888_REV:
+ case MESA_FORMAT_XRGB8888_REV_UNORM:
return PIPE_FORMAT_XRGB8888_UNORM;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_ARGB1555_UNORM:
return PIPE_FORMAT_B5G5R5A1_UNORM;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_ARGB4444_UNORM:
return PIPE_FORMAT_B4G4R4A4_UNORM;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_RGB565_UNORM:
return PIPE_FORMAT_B5G6R5_UNORM;
- case MESA_FORMAT_RGB332:
+ case MESA_FORMAT_RGB332_UNORM:
return PIPE_FORMAT_B2G3R3_UNORM;
- case MESA_FORMAT_ARGB2101010:
+ case MESA_FORMAT_ARGB2101010_UNORM:
return PIPE_FORMAT_B10G10R10A2_UNORM;
- case MESA_FORMAT_AL44:
+ case MESA_FORMAT_AL44_UNORM:
return PIPE_FORMAT_L4A4_UNORM;
- case MESA_FORMAT_AL88:
+ case MESA_FORMAT_AL88_UNORM:
return PIPE_FORMAT_L8A8_UNORM;
- case MESA_FORMAT_AL1616:
+ case MESA_FORMAT_AL1616_UNORM:
return PIPE_FORMAT_L16A16_UNORM;
- case MESA_FORMAT_A8:
+ case MESA_FORMAT_A8_UNORM:
return PIPE_FORMAT_A8_UNORM;
- case MESA_FORMAT_A16:
+ case MESA_FORMAT_A16_UNORM:
return PIPE_FORMAT_A16_UNORM;
- case MESA_FORMAT_L8:
+ case MESA_FORMAT_L8_UNORM:
return PIPE_FORMAT_L8_UNORM;
- case MESA_FORMAT_L16:
+ case MESA_FORMAT_L16_UNORM:
return PIPE_FORMAT_L16_UNORM;
- case MESA_FORMAT_I8:
+ case MESA_FORMAT_I8_UNORM:
return PIPE_FORMAT_I8_UNORM;
- case MESA_FORMAT_I16:
+ case MESA_FORMAT_I16_UNORM:
return PIPE_FORMAT_I16_UNORM;
- case MESA_FORMAT_Z16:
+ case MESA_FORMAT_Z16_UNORM:
return PIPE_FORMAT_Z16_UNORM;
- case MESA_FORMAT_Z32:
+ case MESA_FORMAT_Z32_UNORM:
return PIPE_FORMAT_Z32_UNORM;
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
return PIPE_FORMAT_S8_UINT_Z24_UNORM;
- case MESA_FORMAT_S8_Z24:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
return PIPE_FORMAT_Z24_UNORM_S8_UINT;
- case MESA_FORMAT_Z24_X8:
+ case MESA_FORMAT_Z24_X8_UNORM:
return PIPE_FORMAT_X8Z24_UNORM;
- case MESA_FORMAT_X8_Z24:
+ case MESA_FORMAT_X8_Z24_UNORM:
return PIPE_FORMAT_Z24X8_UNORM;
- case MESA_FORMAT_S8:
+ case MESA_FORMAT_S8_UNORM:
return PIPE_FORMAT_S8_UINT;
case MESA_FORMAT_Z32_FLOAT:
return PIPE_FORMAT_Z32_FLOAT;
@@ -180,15 +180,15 @@ st_mesa_format_to_pipe_format(gl_format mesaFormat)
case MESA_FORMAT_RG_FLOAT16:
return PIPE_FORMAT_R16G16_FLOAT;
- case MESA_FORMAT_R8:
+ case MESA_FORMAT_R8_UNORM:
return PIPE_FORMAT_R8_UNORM;
- case MESA_FORMAT_R16:
+ case MESA_FORMAT_R16_UNORM:
return PIPE_FORMAT_R16_UNORM;
- case MESA_FORMAT_GR88:
+ case MESA_FORMAT_GR88_UNORM:
return PIPE_FORMAT_R8G8_UNORM;
- case MESA_FORMAT_GR1616:
+ case MESA_FORMAT_GR1616_UNORM:
return PIPE_FORMAT_R16G16_UNORM;
- case MESA_FORMAT_RGBA_16:
+ case MESA_FORMAT_RGBA_16_UNORM:
return PIPE_FORMAT_R16G16B16A16_UNORM;
/* signed int formats */
@@ -199,9 +199,9 @@ st_mesa_format_to_pipe_format(gl_format mesaFormat)
case MESA_FORMAT_ALPHA_UINT32:
return PIPE_FORMAT_A32_UINT;
- case MESA_FORMAT_ALPHA_INT8:
+ case MESA_FORMAT_ALPHA_SINT8:
return PIPE_FORMAT_A8_SINT;
- case MESA_FORMAT_ALPHA_INT16:
+ case MESA_FORMAT_ALPHA_SINT16:
return PIPE_FORMAT_A16_SINT;
case MESA_FORMAT_ALPHA_INT32:
return PIPE_FORMAT_A32_SINT;
@@ -213,11 +213,11 @@ st_mesa_format_to_pipe_format(gl_format mesaFormat)
case MESA_FORMAT_INTENSITY_UINT32:
return PIPE_FORMAT_I32_UINT;
- case MESA_FORMAT_INTENSITY_INT8:
+ case MESA_FORMAT_INTENSITY_SINT8:
return PIPE_FORMAT_I8_SINT;
- case MESA_FORMAT_INTENSITY_INT16:
+ case MESA_FORMAT_INTENSITY_SINT16:
return PIPE_FORMAT_I16_SINT;
- case MESA_FORMAT_INTENSITY_INT32:
+ case MESA_FORMAT_INTENSITY_SINT32:
return PIPE_FORMAT_I32_SINT;
case MESA_FORMAT_LUMINANCE_UINT8:
@@ -227,7 +227,7 @@ st_mesa_format_to_pipe_format(gl_format mesaFormat)
case MESA_FORMAT_LUMINANCE_UINT32:
return PIPE_FORMAT_L32_UINT;
- case MESA_FORMAT_LUMINANCE_INT8:
+ case MESA_FORMAT_LUMINANCE_SINT8:
return PIPE_FORMAT_L8_SINT;
case MESA_FORMAT_LUMINANCE_INT16:
return PIPE_FORMAT_L16_SINT;
@@ -241,36 +241,36 @@ st_mesa_format_to_pipe_format(gl_format mesaFormat)
case MESA_FORMAT_LUMINANCE_ALPHA_UINT32:
return PIPE_FORMAT_L32A32_UINT;
- case MESA_FORMAT_LUMINANCE_ALPHA_INT8:
+ case MESA_FORMAT_LUMINANCE_ALPHA_SINT8:
return PIPE_FORMAT_L8A8_SINT;
- case MESA_FORMAT_LUMINANCE_ALPHA_INT16:
+ case MESA_FORMAT_LUMINANCE_ALPHA_SINT16:
return PIPE_FORMAT_L16A16_SINT;
- case MESA_FORMAT_LUMINANCE_ALPHA_INT32:
+ case MESA_FORMAT_LUMINANCE_ALPHA_SINT32:
return PIPE_FORMAT_L32A32_SINT;
- case MESA_FORMAT_R_INT8:
+ case MESA_FORMAT_R_SINT8:
return PIPE_FORMAT_R8_SINT;
- case MESA_FORMAT_RG_INT8:
+ case MESA_FORMAT_RG_SINT8:
return PIPE_FORMAT_R8G8_SINT;
- case MESA_FORMAT_RGB_INT8:
+ case MESA_FORMAT_RGB_SINT8:
return PIPE_FORMAT_R8G8B8_SINT;
- case MESA_FORMAT_RGBA_INT8:
+ case MESA_FORMAT_RGBA_SINT8:
return PIPE_FORMAT_R8G8B8A8_SINT;
- case MESA_FORMAT_R_INT16:
+ case MESA_FORMAT_R_SINT16:
return PIPE_FORMAT_R16_SINT;
- case MESA_FORMAT_RG_INT16:
+ case MESA_FORMAT_RG_SINT16:
return PIPE_FORMAT_R16G16_SINT;
- case MESA_FORMAT_RGB_INT16:
+ case MESA_FORMAT_RGB_SINT16:
return PIPE_FORMAT_R16G16B16_SINT;
- case MESA_FORMAT_RGBA_INT16:
+ case MESA_FORMAT_RGBA_SINT16:
return PIPE_FORMAT_R16G16B16A16_SINT;
- case MESA_FORMAT_R_INT32:
+ case MESA_FORMAT_R_SINT32:
return PIPE_FORMAT_R32_SINT;
- case MESA_FORMAT_RG_INT32:
+ case MESA_FORMAT_RG_SINT32:
return PIPE_FORMAT_R32G32_SINT;
- case MESA_FORMAT_RGB_INT32:
+ case MESA_FORMAT_RGB_SINT32:
return PIPE_FORMAT_R32G32B32_SINT;
- case MESA_FORMAT_RGBA_INT32:
+ case MESA_FORMAT_RGBA_SINT32:
return PIPE_FORMAT_R32G32B32A32_SINT;
/* unsigned int formats */
@@ -321,36 +321,36 @@ st_mesa_format_to_pipe_format(gl_format mesaFormat)
return PIPE_FORMAT_ETC1_RGB8;
/* signed normalized formats */
- case MESA_FORMAT_SIGNED_R8:
+ case MESA_FORMAT_R8_SNORM:
return PIPE_FORMAT_R8_SNORM;
- case MESA_FORMAT_SIGNED_RG88_REV:
+ case MESA_FORMAT_RG88_REV_SNORM:
return PIPE_FORMAT_R8G8_SNORM;
- case MESA_FORMAT_SIGNED_RGBA8888_REV:
+ case MESA_FORMAT_RGBA8888_REV_SNORM:
return PIPE_FORMAT_R8G8B8A8_SNORM;
- case MESA_FORMAT_SIGNED_A8:
+ case MESA_FORMAT_A8_SNORM:
return PIPE_FORMAT_A8_SNORM;
- case MESA_FORMAT_SIGNED_L8:
+ case MESA_FORMAT_L8_SNORM:
return PIPE_FORMAT_L8_SNORM;
- case MESA_FORMAT_SIGNED_AL88:
+ case MESA_FORMAT_AL88_SNORM:
return PIPE_FORMAT_L8A8_SNORM;
- case MESA_FORMAT_SIGNED_I8:
+ case MESA_FORMAT_I8_SNORM:
return PIPE_FORMAT_I8_SNORM;
- case MESA_FORMAT_SIGNED_R16:
+ case MESA_FORMAT_R16_SNORM:
return PIPE_FORMAT_R16_SNORM;
- case MESA_FORMAT_SIGNED_GR1616:
+ case MESA_FORMAT_GR1616_SNORM:
return PIPE_FORMAT_R16G16_SNORM;
- case MESA_FORMAT_SIGNED_RGBA_16:
+ case MESA_FORMAT_RGBA_16_SNORM:
return PIPE_FORMAT_R16G16B16A16_SNORM;
- case MESA_FORMAT_SIGNED_A16:
+ case MESA_FORMAT_A16_SNORM:
return PIPE_FORMAT_A16_SNORM;
- case MESA_FORMAT_SIGNED_L16:
+ case MESA_FORMAT_L16_SNORM:
return PIPE_FORMAT_L16_SNORM;
- case MESA_FORMAT_SIGNED_AL1616:
+ case MESA_FORMAT_AL1616_SNORM:
return PIPE_FORMAT_L16A16_SNORM;
- case MESA_FORMAT_SIGNED_I16:
+ case MESA_FORMAT_I16_SNORM:
return PIPE_FORMAT_I16_SNORM;
case MESA_FORMAT_RGB9_E5_FLOAT:
@@ -405,67 +405,67 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
{
switch (format) {
case PIPE_FORMAT_ABGR8888_UNORM:
- return MESA_FORMAT_RGBA8888;
+ return MESA_FORMAT_RGBA8888_UNORM;
case PIPE_FORMAT_RGBA8888_UNORM:
- return MESA_FORMAT_RGBA8888_REV;
+ return MESA_FORMAT_RGBA8888_REV_UNORM;
case PIPE_FORMAT_BGRA8888_UNORM:
- return MESA_FORMAT_ARGB8888;
+ return MESA_FORMAT_ARGB8888_UNORM;
case PIPE_FORMAT_ARGB8888_UNORM:
- return MESA_FORMAT_ARGB8888_REV;
+ return MESA_FORMAT_ARGB8888_REV_UNORM;
case PIPE_FORMAT_XBGR8888_UNORM:
- return MESA_FORMAT_RGBX8888;
+ return MESA_FORMAT_RGBX8888_UNORM;
case PIPE_FORMAT_RGBX8888_UNORM:
- return MESA_FORMAT_RGBX8888_REV;
+ return MESA_FORMAT_RGBX8888_REV_UNORM;
case PIPE_FORMAT_BGRX8888_UNORM:
- return MESA_FORMAT_XRGB8888;
+ return MESA_FORMAT_XRGB8888_UNORM;
case PIPE_FORMAT_XRGB8888_UNORM:
- return MESA_FORMAT_XRGB8888_REV;
+ return MESA_FORMAT_XRGB8888_REV_UNORM;
case PIPE_FORMAT_B5G5R5A1_UNORM:
- return MESA_FORMAT_ARGB1555;
+ return MESA_FORMAT_ARGB1555_UNORM;
case PIPE_FORMAT_B4G4R4A4_UNORM:
- return MESA_FORMAT_ARGB4444;
+ return MESA_FORMAT_ARGB4444_UNORM;
case PIPE_FORMAT_B5G6R5_UNORM:
- return MESA_FORMAT_RGB565;
+ return MESA_FORMAT_RGB565_UNORM;
case PIPE_FORMAT_B2G3R3_UNORM:
- return MESA_FORMAT_RGB332;
+ return MESA_FORMAT_RGB332_UNORM;
case PIPE_FORMAT_B10G10R10A2_UNORM:
- return MESA_FORMAT_ARGB2101010;
+ return MESA_FORMAT_ARGB2101010_UNORM;
case PIPE_FORMAT_L4A4_UNORM:
- return MESA_FORMAT_AL44;
+ return MESA_FORMAT_AL44_UNORM;
case PIPE_FORMAT_L8A8_UNORM:
- return MESA_FORMAT_AL88;
+ return MESA_FORMAT_AL88_UNORM;
case PIPE_FORMAT_L16A16_UNORM:
- return MESA_FORMAT_AL1616;
+ return MESA_FORMAT_AL1616_UNORM;
case PIPE_FORMAT_A8_UNORM:
- return MESA_FORMAT_A8;
+ return MESA_FORMAT_A8_UNORM;
case PIPE_FORMAT_A16_UNORM:
- return MESA_FORMAT_A16;
+ return MESA_FORMAT_A16_UNORM;
case PIPE_FORMAT_L8_UNORM:
- return MESA_FORMAT_L8;
+ return MESA_FORMAT_L8_UNORM;
case PIPE_FORMAT_L16_UNORM:
- return MESA_FORMAT_L16;
+ return MESA_FORMAT_L16_UNORM;
case PIPE_FORMAT_I8_UNORM:
- return MESA_FORMAT_I8;
+ return MESA_FORMAT_I8_UNORM;
case PIPE_FORMAT_I16_UNORM:
- return MESA_FORMAT_I16;
+ return MESA_FORMAT_I16_UNORM;
case PIPE_FORMAT_S8_UINT:
- return MESA_FORMAT_S8;
+ return MESA_FORMAT_S8_UNORM;
case PIPE_FORMAT_R16G16B16A16_UNORM:
- return MESA_FORMAT_RGBA_16;
+ return MESA_FORMAT_RGBA_16_UNORM;
case PIPE_FORMAT_Z16_UNORM:
- return MESA_FORMAT_Z16;
+ return MESA_FORMAT_Z16_UNORM;
case PIPE_FORMAT_Z32_UNORM:
- return MESA_FORMAT_Z32;
+ return MESA_FORMAT_Z32_UNORM;
case PIPE_FORMAT_S8_UINT_Z24_UNORM:
- return MESA_FORMAT_Z24_S8;
+ return MESA_FORMAT_Z24_UNORM_S8_UINT;
case PIPE_FORMAT_X8Z24_UNORM:
- return MESA_FORMAT_Z24_X8;
+ return MESA_FORMAT_Z24_X8_UNORM;
case PIPE_FORMAT_Z24X8_UNORM:
- return MESA_FORMAT_X8_Z24;
+ return MESA_FORMAT_X8_Z24_UNORM;
case PIPE_FORMAT_Z24_UNORM_S8_UINT:
- return MESA_FORMAT_S8_Z24;
+ return MESA_FORMAT_S8_UINT_Z24_UNORM;
case PIPE_FORMAT_Z32_FLOAT:
return MESA_FORMAT_Z32_FLOAT;
case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
@@ -536,13 +536,13 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
return MESA_FORMAT_RG_FLOAT16;
case PIPE_FORMAT_R8_UNORM:
- return MESA_FORMAT_R8;
+ return MESA_FORMAT_R8_UNORM;
case PIPE_FORMAT_R16_UNORM:
- return MESA_FORMAT_R16;
+ return MESA_FORMAT_R16_UNORM;
case PIPE_FORMAT_R8G8_UNORM:
- return MESA_FORMAT_GR88;
+ return MESA_FORMAT_GR88_UNORM;
case PIPE_FORMAT_R16G16_UNORM:
- return MESA_FORMAT_GR1616;
+ return MESA_FORMAT_GR1616_UNORM;
case PIPE_FORMAT_A8_UINT:
return MESA_FORMAT_ALPHA_UINT8;
@@ -551,9 +551,9 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
case PIPE_FORMAT_A32_UINT:
return MESA_FORMAT_ALPHA_UINT32;
case PIPE_FORMAT_A8_SINT:
- return MESA_FORMAT_ALPHA_INT8;
+ return MESA_FORMAT_ALPHA_SINT8;
case PIPE_FORMAT_A16_SINT:
- return MESA_FORMAT_ALPHA_INT16;
+ return MESA_FORMAT_ALPHA_SINT16;
case PIPE_FORMAT_A32_SINT:
return MESA_FORMAT_ALPHA_INT32;
@@ -564,11 +564,11 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
case PIPE_FORMAT_I32_UINT:
return MESA_FORMAT_INTENSITY_UINT32;
case PIPE_FORMAT_I8_SINT:
- return MESA_FORMAT_INTENSITY_INT8;
+ return MESA_FORMAT_INTENSITY_SINT8;
case PIPE_FORMAT_I16_SINT:
- return MESA_FORMAT_INTENSITY_INT16;
+ return MESA_FORMAT_INTENSITY_SINT16;
case PIPE_FORMAT_I32_SINT:
- return MESA_FORMAT_INTENSITY_INT32;
+ return MESA_FORMAT_INTENSITY_SINT32;
case PIPE_FORMAT_L8_UINT:
return MESA_FORMAT_LUMINANCE_UINT8;
@@ -577,7 +577,7 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
case PIPE_FORMAT_L32_UINT:
return MESA_FORMAT_LUMINANCE_UINT32;
case PIPE_FORMAT_L8_SINT:
- return MESA_FORMAT_LUMINANCE_INT8;
+ return MESA_FORMAT_LUMINANCE_SINT8;
case PIPE_FORMAT_L16_SINT:
return MESA_FORMAT_LUMINANCE_INT16;
case PIPE_FORMAT_L32_SINT:
@@ -590,38 +590,38 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
case PIPE_FORMAT_L32A32_UINT:
return MESA_FORMAT_LUMINANCE_ALPHA_UINT32;
case PIPE_FORMAT_L8A8_SINT:
- return MESA_FORMAT_LUMINANCE_ALPHA_INT8;
+ return MESA_FORMAT_LUMINANCE_ALPHA_SINT8;
case PIPE_FORMAT_L16A16_SINT:
- return MESA_FORMAT_LUMINANCE_ALPHA_INT16;
+ return MESA_FORMAT_LUMINANCE_ALPHA_SINT16;
case PIPE_FORMAT_L32A32_SINT:
- return MESA_FORMAT_LUMINANCE_ALPHA_INT32;
+ return MESA_FORMAT_LUMINANCE_ALPHA_SINT32;
case PIPE_FORMAT_R8_SINT:
- return MESA_FORMAT_R_INT8;
+ return MESA_FORMAT_R_SINT8;
case PIPE_FORMAT_R8G8_SINT:
- return MESA_FORMAT_RG_INT8;
+ return MESA_FORMAT_RG_SINT8;
case PIPE_FORMAT_R8G8B8_SINT:
- return MESA_FORMAT_RGB_INT8;
+ return MESA_FORMAT_RGB_SINT8;
case PIPE_FORMAT_R8G8B8A8_SINT:
- return MESA_FORMAT_RGBA_INT8;
+ return MESA_FORMAT_RGBA_SINT8;
case PIPE_FORMAT_R16_SINT:
- return MESA_FORMAT_R_INT16;
+ return MESA_FORMAT_R_SINT16;
case PIPE_FORMAT_R16G16_SINT:
- return MESA_FORMAT_RG_INT16;
+ return MESA_FORMAT_RG_SINT16;
case PIPE_FORMAT_R16G16B16_SINT:
- return MESA_FORMAT_RGB_INT16;
+ return MESA_FORMAT_RGB_SINT16;
case PIPE_FORMAT_R16G16B16A16_SINT:
- return MESA_FORMAT_RGBA_INT16;
+ return MESA_FORMAT_RGBA_SINT16;
case PIPE_FORMAT_R32_SINT:
- return MESA_FORMAT_R_INT32;
+ return MESA_FORMAT_R_SINT32;
case PIPE_FORMAT_R32G32_SINT:
- return MESA_FORMAT_RG_INT32;
+ return MESA_FORMAT_RG_SINT32;
case PIPE_FORMAT_R32G32B32_SINT:
- return MESA_FORMAT_RGB_INT32;
+ return MESA_FORMAT_RGB_SINT32;
case PIPE_FORMAT_R32G32B32A32_SINT:
- return MESA_FORMAT_RGBA_INT32;
+ return MESA_FORMAT_RGBA_SINT32;
/* unsigned int formats */
case PIPE_FORMAT_R8_UINT:
@@ -674,36 +674,36 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
/* signed normalized formats */
case PIPE_FORMAT_R8_SNORM:
- return MESA_FORMAT_SIGNED_R8;
+ return MESA_FORMAT_R8_SNORM;
case PIPE_FORMAT_R8G8_SNORM:
- return MESA_FORMAT_SIGNED_RG88_REV;
+ return MESA_FORMAT_RG88_REV_SNORM;
case PIPE_FORMAT_R8G8B8A8_SNORM:
- return MESA_FORMAT_SIGNED_RGBA8888_REV;
+ return MESA_FORMAT_RGBA8888_REV_SNORM;
case PIPE_FORMAT_A8_SNORM:
- return MESA_FORMAT_SIGNED_A8;
+ return MESA_FORMAT_A8_SNORM;
case PIPE_FORMAT_L8_SNORM:
- return MESA_FORMAT_SIGNED_L8;
+ return MESA_FORMAT_L8_SNORM;
case PIPE_FORMAT_L8A8_SNORM:
- return MESA_FORMAT_SIGNED_AL88;
+ return MESA_FORMAT_AL88_SNORM;
case PIPE_FORMAT_I8_SNORM:
- return MESA_FORMAT_SIGNED_I8;
+ return MESA_FORMAT_I8_SNORM;
case PIPE_FORMAT_R16_SNORM:
- return MESA_FORMAT_SIGNED_R16;
+ return MESA_FORMAT_R16_SNORM;
case PIPE_FORMAT_R16G16_SNORM:
- return MESA_FORMAT_SIGNED_GR1616;
+ return MESA_FORMAT_GR1616_SNORM;
case PIPE_FORMAT_R16G16B16A16_SNORM:
- return MESA_FORMAT_SIGNED_RGBA_16;
+ return MESA_FORMAT_RGBA_16_SNORM;
case PIPE_FORMAT_A16_SNORM:
- return MESA_FORMAT_SIGNED_A16;
+ return MESA_FORMAT_A16_SNORM;
case PIPE_FORMAT_L16_SNORM:
- return MESA_FORMAT_SIGNED_L16;
+ return MESA_FORMAT_L16_SNORM;
case PIPE_FORMAT_L16A16_SNORM:
- return MESA_FORMAT_SIGNED_AL1616;
+ return MESA_FORMAT_AL1616_SNORM;
case PIPE_FORMAT_I16_SNORM:
- return MESA_FORMAT_SIGNED_I16;
+ return MESA_FORMAT_I16_SNORM;
case PIPE_FORMAT_R9G9B9E5_FLOAT:
return MESA_FORMAT_RGB9_E5_FLOAT;
diff --git a/src/mesa/swrast/s_depth.c b/src/mesa/swrast/s_depth.c
index 0f4fb95..940d78a 100644
--- a/src/mesa/swrast/s_depth.c
+++ b/src/mesa/swrast/s_depth.c
@@ -217,7 +217,7 @@ get_z32_values(struct gl_context *ctx, struct gl_renderbuffer *rb,
const GLubyte *map = _swrast_pixel_address(rb, 0, 0);
GLuint i;
- if (rb->Format == MESA_FORMAT_Z32) {
+ if (rb->Format == MESA_FORMAT_Z32_UNORM) {
const GLint rowStride = srb->RowStride;
for (i = 0; i < count; i++) {
if (x[i] >= 0 && y[i] >= 0 && x[i] < w && y[i] < h) {
@@ -252,7 +252,7 @@ put_z32_values(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLubyte *map = _swrast_pixel_address(rb, 0, 0);
GLuint i;
- if (rb->Format == MESA_FORMAT_Z32) {
+ if (rb->Format == MESA_FORMAT_Z32_UNORM) {
const GLint rowStride = srb->RowStride;
for (i = 0; i < count; i++) {
if (mask[i] && x[i] >= 0 && y[i] >= 0 && x[i] < w && y[i] < h) {
@@ -300,12 +300,12 @@ _swrast_depth_test_span(struct gl_context *ctx, SWspan *span)
else
zStart = _swrast_pixel_address(rb, span->x, span->y);
- if (rb->Format == MESA_FORMAT_Z16 && !(span->arrayMask & SPAN_XY)) {
+ if (rb->Format == MESA_FORMAT_Z16_UNORM && !(span->arrayMask & SPAN_XY)) {
/* directly read/write row of 16-bit Z values */
zBufferVals = zStart;
ztest16 = GL_TRUE;
}
- else if (rb->Format == MESA_FORMAT_Z32 && !(span->arrayMask & SPAN_XY)) {
+ else if (rb->Format == MESA_FORMAT_Z32_UNORM && !(span->arrayMask & SPAN_XY)) {
/* directly read/write row of 32-bit Z values */
zBufferVals = zStart;
}
@@ -439,7 +439,7 @@ _swrast_depth_bounds_test( struct gl_context *ctx, SWspan *span )
else
zStart = _swrast_pixel_address(rb, span->x, span->y);
- if (rb->Format == MESA_FORMAT_Z32 && !(span->arrayMask & SPAN_XY)) {
+ if (rb->Format == MESA_FORMAT_Z32_UNORM && !(span->arrayMask & SPAN_XY)) {
/* directly access 32-bit values in the depth buffer */
zBufferVals = (const GLuint *) zStart;
}
@@ -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_S8_UINT_Z24_UNORM ||
+ rb->Format == MESA_FORMAT_X8_Z24_UNORM ||
+ rb->Format == MESA_FORMAT_Z24_UNORM_S8_UINT ||
+ rb->Format == MESA_FORMAT_Z24_X8_UNORM) {
mapMode |= GL_MAP_READ_BIT;
}
@@ -567,7 +567,7 @@ _swrast_clear_depth_buffer(struct gl_context *ctx)
}
switch (rb->Format) {
- case MESA_FORMAT_Z16:
+ case MESA_FORMAT_Z16_UNORM:
{
GLfloat clear = (GLfloat) ctx->Depth.Clear;
GLushort clearVal = 0;
@@ -587,7 +587,7 @@ _swrast_clear_depth_buffer(struct gl_context *ctx)
}
}
break;
- case MESA_FORMAT_Z32:
+ case MESA_FORMAT_Z32_UNORM:
case MESA_FORMAT_Z32_FLOAT:
{
GLfloat clear = (GLfloat) ctx->Depth.Clear;
@@ -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_S8_UINT_Z24_UNORM:
+ case MESA_FORMAT_X8_Z24_UNORM:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
+ case MESA_FORMAT_Z24_X8_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_S8_UINT_Z24_UNORM ||
+ rb->Format == MESA_FORMAT_X8_Z24_UNORM)
mask = 0xff000000;
else
mask = 0xff;
@@ -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_S8_UINT_Z24_UNORM:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
{
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_S8_UINT_Z24_UNORM) {
mask = ((~writeMask) & 0xff) << 24;
clear |= (ctx->Stencil.Clear & writeMask & 0xff) << 24;
}
diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c
index 1786de1..376d2c4 100644
--- a/src/mesa/swrast/s_drawpix.c
+++ b/src/mesa/swrast/s_drawpix.c
@@ -223,8 +223,8 @@ fast_draw_rgba_pixels(struct gl_context *ctx, GLint x, GLint y,
if (format == GL_RGB &&
type == GL_UNSIGNED_BYTE &&
- (rb->Format == MESA_FORMAT_XRGB8888 ||
- rb->Format == MESA_FORMAT_ARGB8888)) {
+ (rb->Format == MESA_FORMAT_XRGB8888_UNORM ||
+ rb->Format == MESA_FORMAT_ARGB8888_UNORM)) {
fast_draw_rgb_ubyte_pixels(ctx, rb, x, y, width, height,
&unpack, pixels);
return GL_TRUE;
@@ -232,8 +232,8 @@ fast_draw_rgba_pixels(struct gl_context *ctx, GLint x, GLint y,
if (format == GL_RGBA &&
type == GL_UNSIGNED_BYTE &&
- (rb->Format == MESA_FORMAT_XRGB8888 ||
- rb->Format == MESA_FORMAT_ARGB8888)) {
+ (rb->Format == MESA_FORMAT_XRGB8888_UNORM ||
+ rb->Format == MESA_FORMAT_ARGB8888_UNORM)) {
fast_draw_rgba_ubyte_pixels(ctx, rb, x, y, width, height,
&unpack, pixels);
return GL_TRUE;
@@ -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_S8_UINT_Z24_UNORM
* 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_Z24_UNORM_S8_UINT ||
+ depthRb->Format == MESA_FORMAT_S8_UINT_Z24_UNORM) &&
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 e3f33de..661d1f4 100644
--- a/src/mesa/swrast/s_renderbuffer.c
+++ b/src/mesa/swrast/s_renderbuffer.c
@@ -81,35 +81,35 @@ soft_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
case GL_RGBA12:
#endif
if (_mesa_little_endian())
- rb->Format = MESA_FORMAT_RGBA8888_REV;
+ rb->Format = MESA_FORMAT_RGBA8888_REV_UNORM;
else
- rb->Format = MESA_FORMAT_RGBA8888;
+ rb->Format = MESA_FORMAT_RGBA8888_UNORM;
break;
case GL_RGBA16:
case GL_RGBA16_SNORM:
/* for accum buffer */
- rb->Format = MESA_FORMAT_SIGNED_RGBA_16;
+ rb->Format = MESA_FORMAT_RGBA_16_SNORM;
break;
case GL_STENCIL_INDEX:
case GL_STENCIL_INDEX1_EXT:
case GL_STENCIL_INDEX4_EXT:
case GL_STENCIL_INDEX8_EXT:
case GL_STENCIL_INDEX16_EXT:
- rb->Format = MESA_FORMAT_S8;
+ rb->Format = MESA_FORMAT_S8_UNORM;
break;
case GL_DEPTH_COMPONENT:
case GL_DEPTH_COMPONENT16:
- rb->Format = MESA_FORMAT_Z16;
+ rb->Format = MESA_FORMAT_Z16_UNORM;
break;
case GL_DEPTH_COMPONENT24:
- rb->Format = MESA_FORMAT_X8_Z24;
+ rb->Format = MESA_FORMAT_X8_Z24_UNORM;
break;
case GL_DEPTH_COMPONENT32:
- rb->Format = MESA_FORMAT_Z32;
+ rb->Format = MESA_FORMAT_Z32_UNORM;
break;
case GL_DEPTH_STENCIL_EXT:
case GL_DEPTH24_STENCIL8_EXT:
- rb->Format = MESA_FORMAT_Z24_S8;
+ rb->Format = MESA_FORMAT_Z24_UNORM_S8_UINT;
break;
default:
/* unsupported format */
diff --git a/src/mesa/swrast/s_stencil.c b/src/mesa/swrast/s_stencil.c
index 3eeeb24..0dc106d 100644
--- a/src/mesa/swrast/s_stencil.c
+++ b/src/mesa/swrast/s_stencil.c
@@ -300,7 +300,7 @@ get_s8_values(struct gl_context *ctx, struct gl_renderbuffer *rb,
const GLubyte *map = _swrast_pixel_address(rb, 0, 0);
GLuint i;
- if (rb->Format == MESA_FORMAT_S8) {
+ if (rb->Format == MESA_FORMAT_S8_UNORM) {
const GLint rowStride = srb->RowStride;
for (i = 0; i < count; i++) {
if (x[i] >= 0 && y[i] >= 0 && x[i] < w && y[i] < h) {
@@ -587,7 +587,7 @@ _swrast_clear_stencil_buffer(struct gl_context *ctx)
}
switch (rb->Format) {
- case MESA_FORMAT_S8:
+ case MESA_FORMAT_S8_UNORM:
{
GLubyte clear = ctx->Stencil.Clear & writeMask & 0xff;
GLubyte mask = (~writeMask) & 0xff;
@@ -614,7 +614,7 @@ _swrast_clear_stencil_buffer(struct gl_context *ctx)
}
}
break;
- case MESA_FORMAT_S8_Z24:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
{
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_Z24_UNORM_S8_UINT:
{
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 0196aed..fd7caed 100644
--- a/src/mesa/swrast/s_texfetch.c
+++ b/src/mesa/swrast/s_texfetch.c
@@ -149,49 +149,49 @@ texfetch_funcs[] =
},
{
- MESA_FORMAT_RGBA8888,
+ MESA_FORMAT_RGBA8888_UNORM,
fetch_texel_1d_f_rgba8888,
fetch_texel_2d_f_rgba8888,
fetch_texel_3d_f_rgba8888
},
{
- MESA_FORMAT_RGBA8888_REV,
+ MESA_FORMAT_RGBA8888_REV_UNORM,
fetch_texel_1d_f_rgba8888_rev,
fetch_texel_2d_f_rgba8888_rev,
fetch_texel_3d_f_rgba8888_rev
},
{
- MESA_FORMAT_ARGB8888,
+ MESA_FORMAT_ARGB8888_UNORM,
fetch_texel_1d_f_argb8888,
fetch_texel_2d_f_argb8888,
fetch_texel_3d_f_argb8888
},
{
- MESA_FORMAT_ARGB8888_REV,
+ MESA_FORMAT_ARGB8888_REV_UNORM,
fetch_texel_1d_f_argb8888_rev,
fetch_texel_2d_f_argb8888_rev,
fetch_texel_3d_f_argb8888_rev
},
{
- MESA_FORMAT_RGBX8888,
+ MESA_FORMAT_RGBX8888_UNORM,
fetch_texel_1d_f_rgbx8888,
fetch_texel_2d_f_rgbx8888,
fetch_texel_3d_f_rgbx8888
},
{
- MESA_FORMAT_RGBX8888_REV,
+ MESA_FORMAT_RGBX8888_REV_UNORM,
fetch_texel_1d_f_rgbx8888_rev,
fetch_texel_2d_f_rgbx8888_rev,
fetch_texel_3d_f_rgbx8888_rev
},
{
- MESA_FORMAT_XRGB8888,
+ MESA_FORMAT_XRGB8888_UNORM,
fetch_texel_1d_f_xrgb8888,
fetch_texel_2d_f_xrgb8888,
fetch_texel_3d_f_xrgb8888
},
{
- MESA_FORMAT_XRGB8888_REV,
+ MESA_FORMAT_XRGB8888_REV_UNORM,
fetch_texel_1d_f_xrgb8888_rev,
fetch_texel_2d_f_xrgb8888_rev,
fetch_texel_3d_f_xrgb8888_rev
@@ -209,115 +209,115 @@ texfetch_funcs[] =
fetch_texel_3d_f_bgr888
},
{
- MESA_FORMAT_RGB565,
+ MESA_FORMAT_RGB565_UNORM,
fetch_texel_1d_f_rgb565,
fetch_texel_2d_f_rgb565,
fetch_texel_3d_f_rgb565
},
{
- MESA_FORMAT_RGB565_REV,
+ MESA_FORMAT_RGB565_REV_UNORM,
fetch_texel_1d_f_rgb565_rev,
fetch_texel_2d_f_rgb565_rev,
fetch_texel_3d_f_rgb565_rev
},
{
- MESA_FORMAT_ARGB4444,
+ MESA_FORMAT_ARGB4444_UNORM,
fetch_texel_1d_f_argb4444,
fetch_texel_2d_f_argb4444,
fetch_texel_3d_f_argb4444
},
{
- MESA_FORMAT_ARGB4444_REV,
+ MESA_FORMAT_ARGB4444_REV_UNORM,
fetch_texel_1d_f_argb4444_rev,
fetch_texel_2d_f_argb4444_rev,
fetch_texel_3d_f_argb4444_rev
},
{
- MESA_FORMAT_RGBA5551,
+ MESA_FORMAT_RGBA5551_UNORM,
fetch_texel_1d_f_rgba5551,
fetch_texel_2d_f_rgba5551,
fetch_texel_3d_f_rgba5551
},
{
- MESA_FORMAT_ARGB1555,
+ MESA_FORMAT_ARGB1555_UNORM,
fetch_texel_1d_f_argb1555,
fetch_texel_2d_f_argb1555,
fetch_texel_3d_f_argb1555
},
{
- MESA_FORMAT_ARGB1555_REV,
+ MESA_FORMAT_ARGB1555_REV_UNORM,
fetch_texel_1d_f_argb1555_rev,
fetch_texel_2d_f_argb1555_rev,
fetch_texel_3d_f_argb1555_rev
},
{
- MESA_FORMAT_AL44,
+ MESA_FORMAT_AL44_UNORM,
fetch_texel_1d_f_al44,
fetch_texel_2d_f_al44,
fetch_texel_3d_f_al44
},
{
- MESA_FORMAT_AL88,
+ MESA_FORMAT_AL88_UNORM,
fetch_texel_1d_f_al88,
fetch_texel_2d_f_al88,
fetch_texel_3d_f_al88
},
{
- MESA_FORMAT_AL88_REV,
+ MESA_FORMAT_AL88_REV_UNORM,
fetch_texel_1d_f_al88_rev,
fetch_texel_2d_f_al88_rev,
fetch_texel_3d_f_al88_rev
},
{
- MESA_FORMAT_AL1616,
+ MESA_FORMAT_AL1616_UNORM,
fetch_texel_1d_f_al1616,
fetch_texel_2d_f_al1616,
fetch_texel_3d_f_al1616
},
{
- MESA_FORMAT_AL1616_REV,
+ MESA_FORMAT_AL1616_REV_UNORM,
fetch_texel_1d_f_al1616_rev,
fetch_texel_2d_f_al1616_rev,
fetch_texel_3d_f_al1616_rev
},
{
- MESA_FORMAT_RGB332,
+ MESA_FORMAT_RGB332_UNORM,
fetch_texel_1d_f_rgb332,
fetch_texel_2d_f_rgb332,
fetch_texel_3d_f_rgb332
},
{
- MESA_FORMAT_A8,
+ MESA_FORMAT_A8_UNORM,
fetch_texel_1d_f_a8,
fetch_texel_2d_f_a8,
fetch_texel_3d_f_a8
},
{
- MESA_FORMAT_A16,
+ MESA_FORMAT_A16_UNORM,
fetch_texel_1d_f_a16,
fetch_texel_2d_f_a16,
fetch_texel_3d_f_a16
},
{
- MESA_FORMAT_L8,
+ MESA_FORMAT_L8_UNORM,
fetch_texel_1d_f_l8,
fetch_texel_2d_f_l8,
fetch_texel_3d_f_l8
},
{
- MESA_FORMAT_L16,
+ MESA_FORMAT_L16_UNORM,
fetch_texel_1d_f_l16,
fetch_texel_2d_f_l16,
fetch_texel_3d_f_l16
},
{
- MESA_FORMAT_I8,
+ MESA_FORMAT_I8_UNORM,
fetch_texel_1d_f_i8,
fetch_texel_2d_f_i8,
fetch_texel_3d_f_i8
},
{
- MESA_FORMAT_I16,
+ MESA_FORMAT_I16_UNORM,
fetch_texel_1d_f_i16,
fetch_texel_2d_f_i16,
fetch_texel_3d_f_i16
@@ -335,85 +335,85 @@ texfetch_funcs[] =
fetch_texel_3d_f_ycbcr_rev
},
{
- MESA_FORMAT_R8,
+ MESA_FORMAT_R8_UNORM,
fetch_texel_1d_f_r8,
fetch_texel_2d_f_r8,
fetch_texel_3d_f_r8
},
{
- MESA_FORMAT_GR88,
+ MESA_FORMAT_GR88_UNORM,
fetch_texel_1d_f_gr88,
fetch_texel_2d_f_gr88,
fetch_texel_3d_f_gr88
},
{
- MESA_FORMAT_RG88,
+ MESA_FORMAT_RG88_UNORM,
fetch_texel_1d_f_rg88,
fetch_texel_2d_f_rg88,
fetch_texel_3d_f_rg88
},
{
- MESA_FORMAT_R16,
+ MESA_FORMAT_R16_UNORM,
fetch_texel_1d_f_r16,
fetch_texel_2d_f_r16,
fetch_texel_3d_f_r16
},
{
- MESA_FORMAT_GR1616,
+ MESA_FORMAT_GR1616_UNORM,
fetch_texel_1d_f_rg1616,
fetch_texel_2d_f_rg1616,
fetch_texel_3d_f_rg1616
},
{
- MESA_FORMAT_RG1616,
+ MESA_FORMAT_RG1616_UNORM,
fetch_texel_1d_f_rg1616_rev,
fetch_texel_2d_f_rg1616_rev,
fetch_texel_3d_f_rg1616_rev
},
{
- MESA_FORMAT_ARGB2101010,
+ MESA_FORMAT_ARGB2101010_UNORM,
fetch_texel_1d_f_argb2101010,
fetch_texel_2d_f_argb2101010,
fetch_texel_3d_f_argb2101010
},
{
- MESA_FORMAT_Z24_S8,
+ MESA_FORMAT_Z24_UNORM_S8_UINT,
fetch_texel_1d_f_z24_s8,
fetch_texel_2d_f_z24_s8,
fetch_texel_3d_f_z24_s8
},
{
- MESA_FORMAT_S8_Z24,
+ MESA_FORMAT_S8_UINT_Z24_UNORM,
fetch_texel_1d_f_s8_z24,
fetch_texel_2d_f_s8_z24,
fetch_texel_3d_f_s8_z24
},
{
- MESA_FORMAT_Z16,
+ MESA_FORMAT_Z16_UNORM,
fetch_texel_1d_f_z16,
fetch_texel_2d_f_z16,
fetch_texel_3d_f_z16
},
{
- MESA_FORMAT_X8_Z24,
+ MESA_FORMAT_X8_Z24_UNORM,
fetch_texel_1d_f_s8_z24,
fetch_texel_2d_f_s8_z24,
fetch_texel_3d_f_s8_z24
},
{
- MESA_FORMAT_Z24_X8,
+ MESA_FORMAT_Z24_X8_UNORM,
fetch_texel_1d_f_z24_s8,
fetch_texel_2d_f_z24_s8,
fetch_texel_3d_f_z24_s8
},
{
- MESA_FORMAT_Z32,
+ MESA_FORMAT_Z32_UNORM,
fetch_texel_1d_f_z32,
fetch_texel_2d_f_z32,
fetch_texel_3d_f_z32
},
{
- MESA_FORMAT_S8,
+ MESA_FORMAT_S8_UNORM,
NULL,
NULL,
NULL
@@ -628,14 +628,14 @@ texfetch_funcs[] =
},
{
- MESA_FORMAT_ALPHA_INT8,
+ MESA_FORMAT_ALPHA_SINT8,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_ALPHA_INT16,
+ MESA_FORMAT_ALPHA_SINT16,
NULL,
NULL,
NULL
@@ -671,21 +671,21 @@ texfetch_funcs[] =
},
{
- MESA_FORMAT_INTENSITY_INT8,
+ MESA_FORMAT_INTENSITY_SINT8,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_INTENSITY_INT16,
+ MESA_FORMAT_INTENSITY_SINT16,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_INTENSITY_INT32,
+ MESA_FORMAT_INTENSITY_SINT32,
NULL,
NULL,
NULL
@@ -714,7 +714,7 @@ texfetch_funcs[] =
},
{
- MESA_FORMAT_LUMINANCE_INT8,
+ MESA_FORMAT_LUMINANCE_SINT8,
NULL,
NULL,
NULL
@@ -757,21 +757,21 @@ texfetch_funcs[] =
},
{
- MESA_FORMAT_LUMINANCE_ALPHA_INT8,
+ MESA_FORMAT_LUMINANCE_ALPHA_SINT8,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_LUMINANCE_ALPHA_INT16,
+ MESA_FORMAT_LUMINANCE_ALPHA_SINT16,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_LUMINANCE_ALPHA_INT32,
+ MESA_FORMAT_LUMINANCE_ALPHA_SINT32,
NULL,
NULL,
NULL
@@ -779,21 +779,21 @@ texfetch_funcs[] =
{
- MESA_FORMAT_R_INT8,
+ MESA_FORMAT_R_SINT8,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_RG_INT8,
+ MESA_FORMAT_RG_SINT8,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_RGB_INT8,
+ MESA_FORMAT_RGB_SINT8,
NULL,
NULL,
NULL
@@ -801,55 +801,55 @@ texfetch_funcs[] =
/* non-normalized, signed int */
{
- MESA_FORMAT_RGBA_INT8,
+ MESA_FORMAT_RGBA_SINT8,
fetch_texel_1d_rgba_int8,
fetch_texel_2d_rgba_int8,
fetch_texel_3d_rgba_int8
},
{
- MESA_FORMAT_R_INT16,
+ MESA_FORMAT_R_SINT16,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_RG_INT16,
+ MESA_FORMAT_RG_SINT16,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_RGB_INT16,
+ MESA_FORMAT_RGB_SINT16,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_RGBA_INT16,
+ MESA_FORMAT_RGBA_SINT16,
fetch_texel_1d_rgba_int16,
fetch_texel_2d_rgba_int16,
fetch_texel_3d_rgba_int16
},
{
- MESA_FORMAT_R_INT32,
+ MESA_FORMAT_R_SINT32,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_RG_INT32,
+ MESA_FORMAT_RG_SINT32,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_RGB_INT32,
+ MESA_FORMAT_RGB_SINT32,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_RGBA_INT32,
+ MESA_FORMAT_RGBA_SINT32,
fetch_texel_1d_rgba_int32,
fetch_texel_2d_rgba_int32,
fetch_texel_3d_rgba_int32
@@ -939,61 +939,61 @@ texfetch_funcs[] =
/* signed, normalized */
{
- MESA_FORMAT_SIGNED_R8,
+ MESA_FORMAT_R8_SNORM,
fetch_texel_1d_signed_r8,
fetch_texel_2d_signed_r8,
fetch_texel_3d_signed_r8
},
{
- MESA_FORMAT_SIGNED_RG88_REV,
+ MESA_FORMAT_RG88_REV_SNORM,
fetch_texel_1d_signed_rg88_rev,
fetch_texel_2d_signed_rg88_rev,
fetch_texel_3d_signed_rg88_rev
},
{
- MESA_FORMAT_SIGNED_RGBX8888,
+ MESA_FORMAT_RGBX8888_SNORM,
fetch_texel_1d_signed_rgbx8888,
fetch_texel_2d_signed_rgbx8888,
fetch_texel_3d_signed_rgbx8888
},
{
- MESA_FORMAT_SIGNED_RGBA8888,
+ MESA_FORMAT_RGBA8888_SNORM,
fetch_texel_1d_signed_rgba8888,
fetch_texel_2d_signed_rgba8888,
fetch_texel_3d_signed_rgba8888
},
{
- MESA_FORMAT_SIGNED_RGBA8888_REV,
+ MESA_FORMAT_RGBA8888_REV_SNORM,
fetch_texel_1d_signed_rgba8888_rev,
fetch_texel_2d_signed_rgba8888_rev,
fetch_texel_3d_signed_rgba8888_rev
},
{
- MESA_FORMAT_SIGNED_R16,
+ MESA_FORMAT_R16_SNORM,
fetch_texel_1d_signed_r16,
fetch_texel_2d_signed_r16,
fetch_texel_3d_signed_r16
},
{
- MESA_FORMAT_SIGNED_GR1616,
+ MESA_FORMAT_GR1616_SNORM,
fetch_texel_1d_signed_rg1616,
fetch_texel_2d_signed_rg1616,
fetch_texel_3d_signed_rg1616
},
{
- MESA_FORMAT_SIGNED_RGB_16,
+ MESA_FORMAT_RGB_16_SNORM,
fetch_texel_1d_signed_rgb_16,
fetch_texel_2d_signed_rgb_16,
fetch_texel_3d_signed_rgb_16
},
{
- MESA_FORMAT_SIGNED_RGBA_16,
+ MESA_FORMAT_RGBA_16_SNORM,
fetch_texel_1d_signed_rgba_16,
fetch_texel_2d_signed_rgba_16,
fetch_texel_3d_signed_rgba_16
},
{
- MESA_FORMAT_RGBA_16,
+ MESA_FORMAT_RGBA_16_UNORM,
fetch_texel_1d_rgba_16,
fetch_texel_2d_rgba_16,
fetch_texel_3d_rgba_16
@@ -1113,49 +1113,49 @@ texfetch_funcs[] =
fetch_compressed
},
{
- MESA_FORMAT_SIGNED_A8,
+ MESA_FORMAT_A8_SNORM,
fetch_texel_1d_signed_a8,
fetch_texel_2d_signed_a8,
fetch_texel_3d_signed_a8
},
{
- MESA_FORMAT_SIGNED_L8,
+ MESA_FORMAT_L8_SNORM,
fetch_texel_1d_signed_l8,
fetch_texel_2d_signed_l8,
fetch_texel_3d_signed_l8
},
{
- MESA_FORMAT_SIGNED_AL88,
+ MESA_FORMAT_AL88_SNORM,
fetch_texel_1d_signed_al88,
fetch_texel_2d_signed_al88,
fetch_texel_3d_signed_al88
},
{
- MESA_FORMAT_SIGNED_I8,
+ MESA_FORMAT_I8_SNORM,
fetch_texel_1d_signed_i8,
fetch_texel_2d_signed_i8,
fetch_texel_3d_signed_i8
},
{
- MESA_FORMAT_SIGNED_A16,
+ MESA_FORMAT_A16_SNORM,
fetch_texel_1d_signed_a16,
fetch_texel_2d_signed_a16,
fetch_texel_3d_signed_a16
},
{
- MESA_FORMAT_SIGNED_L16,
+ MESA_FORMAT_L16_SNORM,
fetch_texel_1d_signed_l16,
fetch_texel_2d_signed_l16,
fetch_texel_3d_signed_l16
},
{
- MESA_FORMAT_SIGNED_AL1616,
+ MESA_FORMAT_AL1616_SNORM,
fetch_texel_1d_signed_al1616,
fetch_texel_2d_signed_al1616,
fetch_texel_3d_signed_al1616
},
{
- MESA_FORMAT_SIGNED_I16,
+ MESA_FORMAT_I16_SNORM,
fetch_texel_1d_signed_i16,
fetch_texel_2d_signed_i16,
fetch_texel_3d_signed_i16
diff --git a/src/mesa/swrast/s_texfetch_tmp.h b/src/mesa/swrast/s_texfetch_tmp.h
index e2521b5..0ffc22f 100644
--- a/src/mesa/swrast/s_texfetch_tmp.h
+++ b/src/mesa/swrast/s_texfetch_tmp.h
@@ -69,7 +69,7 @@
#endif
-/* MESA_FORMAT_Z32 ***********************************************************/
+/* MESA_FORMAT_Z32_UNORM ***********************************************************/
/* Fetch depth texel from 1D, 2D or 3D 32-bit depth texture,
* returning 1 GLfloat.
@@ -83,7 +83,7 @@ static void FETCH(f_z32)( const struct swrast_texture_image *texImage,
}
-/* MESA_FORMAT_Z16 ***********************************************************/
+/* MESA_FORMAT_Z16_UNORM ***********************************************************/
/* Fetch depth texel from 1D, 2D or 3D 16-bit depth texture,
* returning 1 GLfloat.
@@ -388,7 +388,7 @@ static void FETCH(f_rg_f16)( const struct swrast_texture_image *texImage,
* Begin Hardware formats
*/
-/* MESA_FORMAT_RGBA8888 ******************************************************/
+/* MESA_FORMAT_RGBA8888_UNORM ******************************************************/
/* Fetch texel from 1D, 2D or 3D rgba8888 texture, return 4 GLfloats */
static void FETCH(f_rgba8888)( const struct swrast_texture_image *texImage,
@@ -422,7 +422,7 @@ static void FETCH(f_rgba8888_rev)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_ARGB8888 ******************************************************/
+/* MESA_FORMAT_ARGB8888_UNORM ******************************************************/
/* Fetch texel from 1D, 2D or 3D argb8888 texture, return 4 GLchans */
static void FETCH(f_argb8888)( const struct swrast_texture_image *texImage,
@@ -438,7 +438,7 @@ static void FETCH(f_argb8888)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_ARGB8888_REV **************************************************/
+/* MESA_FORMAT_ARGB8888_REV_UNORM **************************************************/
/* Fetch texel from 1D, 2D or 3D argb8888_rev texture, return 4 GLfloats */
static void FETCH(f_argb8888_rev)( const struct swrast_texture_image *texImage,
@@ -454,7 +454,7 @@ static void FETCH(f_argb8888_rev)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_RGBX8888 ******************************************************/
+/* MESA_FORMAT_RGBX8888_UNORM ******************************************************/
/* Fetch texel from 1D, 2D or 3D rgbx8888 texture, return 4 GLfloats */
static void FETCH(f_rgbx8888)( const struct swrast_texture_image *texImage,
@@ -486,7 +486,7 @@ static void FETCH(f_rgbx8888_rev)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_XRGB8888 ******************************************************/
+/* MESA_FORMAT_XRGB8888_UNORM ******************************************************/
/* Fetch texel from 1D, 2D or 3D xrgb8888 texture, return 4 GLchans */
static void FETCH(f_xrgb8888)( const struct swrast_texture_image *texImage,
@@ -502,7 +502,7 @@ static void FETCH(f_xrgb8888)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_XRGB8888_REV **************************************************/
+/* MESA_FORMAT_XRGB8888_REV_UNORM **************************************************/
/* Fetch texel from 1D, 2D or 3D xrgb8888_rev texture, return 4 GLfloats */
static void FETCH(f_xrgb8888_rev)( const struct swrast_texture_image *texImage,
@@ -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_RGB565_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_RGB565_REV_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_ARGB4444_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_ARGB4444_REV_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_RGBA5551_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_ARGB1555_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_ARGB1555_REV_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_ARGB2101010_UNORM ***************************************************/
/* Fetch texel from 1D, 2D or 3D argb2101010 texture, return 4 GLchans */
static void FETCH(f_argb2101010)( const struct swrast_texture_image *texImage,
@@ -686,7 +686,7 @@ static void FETCH(f_argb2101010)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_GR88 **********************************************************/
+/* MESA_FORMAT_GR88_UNORM **********************************************************/
/* Fetch texel from 1D, 2D or 3D rg88 texture, return 4 GLchans */
static void FETCH(f_gr88)( const struct swrast_texture_image *texImage,
@@ -702,7 +702,7 @@ static void FETCH(f_gr88)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_RG88 ******************************************************/
+/* MESA_FORMAT_RG88_UNORM ******************************************************/
/* Fetch texel from 1D, 2D or 3D rg88_rev texture, return 4 GLchans */
static void FETCH(f_rg88)( 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_AL44_UNORM **********************************************************/
/* Fetch texel from 1D, 2D or 3D al44 texture, return 4 GLchans */
static void FETCH(f_al44)( const struct swrast_texture_image *texImage,
@@ -734,7 +734,7 @@ static void FETCH(f_al44)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_AL88 **********************************************************/
+/* MESA_FORMAT_AL88_UNORM **********************************************************/
/* Fetch texel from 1D, 2D or 3D al88 texture, return 4 GLchans */
static void FETCH(f_al88)( const struct swrast_texture_image *texImage,
@@ -750,7 +750,7 @@ static void FETCH(f_al88)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_R8 ************************************************************/
+/* MESA_FORMAT_R8_UNORM ************************************************************/
/* Fetch texel from 1D, 2D or 3D rg88 texture, return 4 GLchans */
static void FETCH(f_r8)(const struct swrast_texture_image *texImage,
@@ -766,7 +766,7 @@ static void FETCH(f_r8)(const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_R16 ***********************************************************/
+/* MESA_FORMAT_R16_UNORM ***********************************************************/
/* Fetch texel from 1D, 2D or 3D r16 texture, return 4 GLchans */
static void FETCH(f_r16)(const struct swrast_texture_image *texImage,
@@ -782,7 +782,7 @@ static void FETCH(f_r16)(const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_AL88_REV ******************************************************/
+/* MESA_FORMAT_AL88_REV_UNORM ******************************************************/
/* Fetch texel from 1D, 2D or 3D al88_rev texture, return 4 GLchans */
static void FETCH(f_al88_rev)( const struct swrast_texture_image *texImage,
@@ -798,7 +798,7 @@ static void FETCH(f_al88_rev)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_GR1616 ********************************************************/
+/* MESA_FORMAT_GR1616_UNORM ********************************************************/
/* Fetch texel from 1D, 2D or 3D rg1616 texture, return 4 GLchans */
static void FETCH(f_rg1616)( const struct swrast_texture_image *texImage,
@@ -814,7 +814,7 @@ static void FETCH(f_rg1616)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_RG1616 ****************************************************/
+/* MESA_FORMAT_RG1616_UNORM ****************************************************/
/* Fetch texel from 1D, 2D or 3D rg1616_rev texture, return 4 GLchans */
static void FETCH(f_rg1616_rev)( const struct swrast_texture_image *texImage,
@@ -830,7 +830,7 @@ static void FETCH(f_rg1616_rev)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_AL1616 ********************************************************/
+/* MESA_FORMAT_AL1616_UNORM ********************************************************/
/* Fetch texel from 1D, 2D or 3D al1616 texture, return 4 GLchans */
static void FETCH(f_al1616)( const struct swrast_texture_image *texImage,
@@ -846,7 +846,7 @@ static void FETCH(f_al1616)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_AL1616_REV ****************************************************/
+/* MESA_FORMAT_AL1616_REV_UNORM ****************************************************/
/* Fetch texel from 1D, 2D or 3D al1616_rev texture, return 4 GLchans */
static void FETCH(f_al1616_rev)( 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_RGB332_UNORM ********************************************************/
/* Fetch texel from 1D, 2D or 3D rgb332 texture, return 4 GLchans */
static void FETCH(f_rgb332)( const struct swrast_texture_image *texImage,
@@ -879,7 +879,7 @@ static void FETCH(f_rgb332)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_A8 ************************************************************/
+/* MESA_FORMAT_A8_UNORM ************************************************************/
/* Fetch texel from 1D, 2D or 3D a8 texture, return 4 GLchans */
static void FETCH(f_a8)( const struct swrast_texture_image *texImage,
@@ -895,7 +895,7 @@ static void FETCH(f_a8)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_A16 ************************************************************/
+/* MESA_FORMAT_A16_UNORM ************************************************************/
/* Fetch texel from 1D, 2D or 3D a8 texture, return 4 GLchans */
static void FETCH(f_a16)( const struct swrast_texture_image *texImage,
@@ -911,7 +911,7 @@ static void FETCH(f_a16)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_L8 ************************************************************/
+/* MESA_FORMAT_L8_UNORM ************************************************************/
/* Fetch texel from 1D, 2D or 3D l8 texture, return 4 GLchans */
static void FETCH(f_l8)( const struct swrast_texture_image *texImage,
@@ -927,7 +927,7 @@ static void FETCH(f_l8)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_L16 ***********************************************************/
+/* MESA_FORMAT_L16_UNORM ***********************************************************/
/* Fetch texel from 1D, 2D or 3D l16 texture, return 4 GLchans */
static void FETCH(f_l16)( const struct swrast_texture_image *texImage,
@@ -943,7 +943,7 @@ static void FETCH(f_l16)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_I8 ************************************************************/
+/* MESA_FORMAT_I8_UNORM ************************************************************/
/* Fetch texel from 1D, 2D or 3D i8 texture, return 4 GLchans */
static void FETCH(f_i8)( const struct swrast_texture_image *texImage,
@@ -959,7 +959,7 @@ static void FETCH(f_i8)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_I16 ***********************************************************/
+/* MESA_FORMAT_I16_UNORM ***********************************************************/
/* Fetch texel from 1D, 2D or 3D i16 texture, return 4 GLchans */
static void FETCH(f_i16)( const struct swrast_texture_image *texImage,
@@ -1042,7 +1042,7 @@ static void FETCH(sla8)(const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_RGBA_INT8 **************************************************/
+/* MESA_FORMAT_RGBA_SINT8 **************************************************/
static void
FETCH(rgba_int8)(const struct swrast_texture_image *texImage,
@@ -1058,7 +1058,7 @@ FETCH(rgba_int8)(const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_RGBA_INT16 **************************************************/
+/* MESA_FORMAT_RGBA_SINT16 **************************************************/
static void
FETCH(rgba_int16)(const struct swrast_texture_image *texImage,
@@ -1074,7 +1074,7 @@ FETCH(rgba_int16)(const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_RGBA_INT32 **************************************************/
+/* MESA_FORMAT_RGBA_SINT32 **************************************************/
static void
FETCH(rgba_int32)(const struct swrast_texture_image *texImage,
@@ -1153,7 +1153,7 @@ static void FETCH(dudv8)(const struct swrast_texture_image *texImage,
}
-/* MESA_FORMAT_SIGNED_R8 ***********************************************/
+/* MESA_FORMAT_R8_SNORM ***********************************************/
static void FETCH(signed_r8)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
@@ -1168,7 +1168,7 @@ static void FETCH(signed_r8)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_SIGNED_A8 ***********************************************/
+/* MESA_FORMAT_A8_SNORM ***********************************************/
static void FETCH(signed_a8)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
@@ -1183,7 +1183,7 @@ static void FETCH(signed_a8)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_SIGNED_L8 ***********************************************/
+/* MESA_FORMAT_L8_SNORM ***********************************************/
static void FETCH(signed_l8)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
@@ -1198,7 +1198,7 @@ static void FETCH(signed_l8)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_SIGNED_I8 ***********************************************/
+/* MESA_FORMAT_I8_SNORM ***********************************************/
static void FETCH(signed_i8)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
@@ -1213,7 +1213,7 @@ static void FETCH(signed_i8)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_SIGNED_RG88_REV ***********************************************/
+/* MESA_FORMAT_RG88_REV_SNORM ***********************************************/
static void FETCH(signed_rg88_rev)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
@@ -1228,7 +1228,7 @@ static void FETCH(signed_rg88_rev)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_SIGNED_AL88 ***********************************************/
+/* MESA_FORMAT_AL88_SNORM ***********************************************/
static void FETCH(signed_al88)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
@@ -1243,7 +1243,7 @@ static void FETCH(signed_al88)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_SIGNED_RGBX8888 ***********************************************/
+/* MESA_FORMAT_RGBX8888_SNORM ***********************************************/
static void FETCH(signed_rgbx8888)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
@@ -1258,7 +1258,7 @@ static void FETCH(signed_rgbx8888)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_SIGNED_RGBA8888 ***********************************************/
+/* MESA_FORMAT_RGBA8888_SNORM ***********************************************/
static void FETCH(signed_rgba8888)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
@@ -1286,7 +1286,7 @@ static void FETCH(signed_rgba8888_rev)( const struct swrast_texture_image *texIm
-/* MESA_FORMAT_SIGNED_R16 ***********************************************/
+/* MESA_FORMAT_R16_SNORM ***********************************************/
static void
FETCH(signed_r16)(const struct swrast_texture_image *texImage,
@@ -1302,7 +1302,7 @@ FETCH(signed_r16)(const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_SIGNED_A16 ***********************************************/
+/* MESA_FORMAT_A16_SNORM ***********************************************/
static void
FETCH(signed_a16)(const struct swrast_texture_image *texImage,
@@ -1318,7 +1318,7 @@ FETCH(signed_a16)(const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_SIGNED_L16 ***********************************************/
+/* MESA_FORMAT_L16_SNORM ***********************************************/
static void
FETCH(signed_l16)(const struct swrast_texture_image *texImage,
@@ -1334,7 +1334,7 @@ FETCH(signed_l16)(const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_SIGNED_I16 ***********************************************/
+/* MESA_FORMAT_I16_SNORM ***********************************************/
static void
FETCH(signed_i16)(const struct swrast_texture_image *texImage,
@@ -1366,7 +1366,7 @@ FETCH(signed_rg1616)(const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_SIGNED_AL1616 ***********************************************/
+/* MESA_FORMAT_AL1616_SNORM ***********************************************/
static void
FETCH(signed_al1616)(const struct swrast_texture_image *texImage,
@@ -1382,7 +1382,7 @@ FETCH(signed_al1616)(const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_SIGNED_RGB_16 ***********************************************/
+/* MESA_FORMAT_RGB_16_SNORM ***********************************************/
static void
FETCH(signed_rgb_16)(const struct swrast_texture_image *texImage,
@@ -1398,7 +1398,7 @@ FETCH(signed_rgb_16)(const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_SIGNED_RGBA_16 ***********************************************/
+/* MESA_FORMAT_RGBA_16_SNORM ***********************************************/
static void
FETCH(signed_rgba_16)(const struct swrast_texture_image *texImage,
@@ -1415,7 +1415,7 @@ FETCH(signed_rgba_16)(const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_RGBA_16 ***********************************************/
+/* MESA_FORMAT_RGBA_16_UNORM ***********************************************/
static void
FETCH(rgba_16)(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_Z24_UNORM_S8_UINT ||
+ texImage->Base.TexFormat == MESA_FORMAT_Z24_X8_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_S8_UINT_Z24_UNORM ||
+ texImage->Base.TexFormat == MESA_FORMAT_X8_Z24_UNORM);
ASSERT(texel[0] >= 0.0F);
ASSERT(texel[0] <= 1.0F);
}
diff --git a/src/mesa/swrast/s_texfilter.c b/src/mesa/swrast/s_texfilter.c
index 312b9ce..c102325 100644
--- a/src/mesa/swrast/s_texfilter.c
+++ b/src/mesa/swrast/s_texfilter.c
@@ -1473,7 +1473,7 @@ opt_sample_rgba_2d(struct gl_context *ctx,
ASSERT(samp->WrapS==GL_REPEAT);
ASSERT(samp->WrapT==GL_REPEAT);
ASSERT(img->Border==0);
- ASSERT(img->TexFormat == MESA_FORMAT_RGBA8888);
+ ASSERT(img->TexFormat == MESA_FORMAT_RGBA8888_UNORM);
ASSERT(swImg->_IsPowerOfTwo);
(void) swImg;
@@ -1525,7 +1525,7 @@ sample_lambda_2d(struct gl_context *ctx,
opt_sample_rgb_2d(ctx, samp, tObj, m, texcoords + minStart,
NULL, rgba + minStart);
break;
- case MESA_FORMAT_RGBA8888:
+ case MESA_FORMAT_RGBA8888_UNORM:
opt_sample_rgba_2d(ctx, samp, tObj, m, texcoords + minStart,
NULL, rgba + minStart);
break;
@@ -1582,7 +1582,7 @@ sample_lambda_2d(struct gl_context *ctx,
opt_sample_rgb_2d(ctx, samp, tObj, m, texcoords + magStart,
NULL, rgba + magStart);
break;
- case MESA_FORMAT_RGBA8888:
+ case MESA_FORMAT_RGBA8888_UNORM:
opt_sample_rgba_2d(ctx, samp, tObj, m, texcoords + magStart,
NULL, rgba + magStart);
break;
@@ -3762,7 +3762,7 @@ _swrast_choose_texture_sample_func( struct gl_context *ctx,
img->Border == 0) {
if (img->TexFormat == MESA_FORMAT_RGB888)
func = &opt_sample_rgb_2d;
- else if (img->TexFormat == MESA_FORMAT_RGBA8888)
+ else if (img->TexFormat == MESA_FORMAT_RGBA8888_UNORM)
func = &opt_sample_rgba_2d;
}
diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c
index 085021b..a8f822b 100644
--- a/src/mesa/swrast/s_triangle.c
+++ b/src/mesa/swrast/s_triangle.c
@@ -437,7 +437,7 @@ affine_span(struct gl_context *ctx, SWspan *span,
return;
}
break;
- case MESA_FORMAT_RGBA8888:
+ case MESA_FORMAT_RGBA8888_UNORM:
switch(info->envmode) {
case GL_MODULATE:
SPAN_NEAREST(NEAREST_RGBA;MODULATE,4);
@@ -486,7 +486,7 @@ affine_span(struct gl_context *ctx, SWspan *span,
return;
}
break;
- case MESA_FORMAT_RGBA8888:
+ case MESA_FORMAT_RGBA8888_UNORM:
switch (info->envmode) {
case GL_MODULATE:
SPAN_LINEAR(LINEAR_RGBA;MODULATE,4);
@@ -575,7 +575,7 @@ affine_span(struct gl_context *ctx, SWspan *span,
case MESA_FORMAT_RGB888: \
info.tbytesline = texImg->Width * 3; \
break; \
- case MESA_FORMAT_RGBA8888: \
+ case MESA_FORMAT_RGBA8888_UNORM: \
info.tbytesline = texImg->Width * 4; \
break; \
default: \
@@ -709,7 +709,7 @@ fast_persp_span(struct gl_context *ctx, SWspan *span,
return;
}
break;
- case MESA_FORMAT_RGBA8888:
+ case MESA_FORMAT_RGBA8888_UNORM:
switch(info->envmode) {
case GL_MODULATE:
SPAN_NEAREST(NEAREST_RGBA;MODULATE,4);
@@ -756,7 +756,7 @@ fast_persp_span(struct gl_context *ctx, SWspan *span,
return;
}
break;
- case MESA_FORMAT_RGBA8888:
+ case MESA_FORMAT_RGBA8888_UNORM:
switch (info->envmode) {
case GL_MODULATE:
SPAN_LINEAR(LINEAR_RGBA;MODULATE,4);
@@ -841,7 +841,7 @@ fast_persp_span(struct gl_context *ctx, SWspan *span,
case MESA_FORMAT_RGB888: \
info.tbytesline = texImg->Width * 3; \
break; \
- case MESA_FORMAT_RGBA8888: \
+ case MESA_FORMAT_RGBA8888_UNORM: \
info.tbytesline = texImg->Width * 4; \
break; \
default: \
@@ -887,7 +887,7 @@ fast_persp_span(struct gl_context *ctx, SWspan *span,
ASSERT(ctx->Depth.Test); \
ASSERT(!ctx->Depth.Mask); \
ASSERT(ctx->Depth.Func == GL_LESS); \
- assert(rb->Format == MESA_FORMAT_Z16); \
+ assert(rb->Format == MESA_FORMAT_Z16_UNORM); \
if (!q) { \
return; \
}
@@ -1025,7 +1025,7 @@ _swrast_choose_triangle( struct gl_context *ctx )
ctx->Depth.Func == GL_LESS &&
!ctx->Stencil._Enabled &&
depthRb &&
- depthRb->Format == MESA_FORMAT_Z16) {
+ depthRb->Format == MESA_FORMAT_Z16_UNORM) {
if (ctx->Color.ColorMask[0][0] == 0 &&
ctx->Color.ColorMask[0][1] == 0 &&
ctx->Color.ColorMask[0][2] == 0 &&
@@ -1080,7 +1080,7 @@ _swrast_choose_triangle( struct gl_context *ctx )
&& texImg->Border == 0
&& (_mesa_format_row_stride(format, texImg->Width) ==
swImg->RowStride)
- && (format == MESA_FORMAT_RGB888 || format == MESA_FORMAT_RGBA8888)
+ && (format == MESA_FORMAT_RGB888 || format == MESA_FORMAT_RGBA8888_UNORM)
&& minFilter == magFilter
&& ctx->Light.Model.ColorControl == GL_SINGLE_COLOR
&& !swrast->_FogEnabled
@@ -1107,7 +1107,7 @@ _swrast_choose_triangle( struct gl_context *ctx )
#if CHAN_BITS != 8
USE(general_triangle);
#else
- if (format == MESA_FORMAT_RGBA8888 && !_mesa_little_endian()) {
+ if (format == MESA_FORMAT_RGBA8888_UNORM && !_mesa_little_endian()) {
/* We only handle RGBA8888 correctly on little endian
* in the optimized code above.
*/
--
1.8.3.1
More information about the mesa-dev
mailing list