static const mesa_format mesa_formats[3] = {
MESA_FORMAT_B8G8R8A8_UNORM,
MESA_FORMAT_B8G8R8X8_UNORM,
- MESA_FORMAT_RGB565,
+ MESA_FORMAT_B5G6R5_UNORM,
};
static const enum pipe_format pipe_formats[3] = {
PIPE_FORMAT_BGRA8888_UNORM,
driGLFormatToImageFormat(mesa_format format)
{
switch (format) {
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
return __DRI_IMAGE_FORMAT_RGB565;
case MESA_FORMAT_B8G8R8X8_UNORM:
return __DRI_IMAGE_FORMAT_XRGB8888;
- case MESA_FORMAT_ARGB2101010:
+ case MESA_FORMAT_B10G10R10A2_UNORM:
return __DRI_IMAGE_FORMAT_ARGB2101010;
- case MESA_FORMAT_XRGB2101010_UNORM:
+ case MESA_FORMAT_B10G10R10X2_UNORM:
return __DRI_IMAGE_FORMAT_XRGB2101010;
case MESA_FORMAT_B8G8R8A8_UNORM:
return __DRI_IMAGE_FORMAT_ARGB8888;
return __DRI_IMAGE_FORMAT_XBGR8888;
case MESA_FORMAT_R_UNORM8:
return __DRI_IMAGE_FORMAT_R8;
- case MESA_FORMAT_GR88:
+ case MESA_FORMAT_R8G8_UNORM:
return __DRI_IMAGE_FORMAT_GR88;
case MESA_FORMAT_NONE:
return __DRI_IMAGE_FORMAT_NONE;
- case MESA_FORMAT_SARGB8:
+ case MESA_FORMAT_B8G8R8A8_SRGB:
return __DRI_IMAGE_FORMAT_SARGB8;
default:
return 0;
{
switch (image_format) {
case __DRI_IMAGE_FORMAT_RGB565:
- return MESA_FORMAT_RGB565;
+ return MESA_FORMAT_B5G6R5_UNORM;
case __DRI_IMAGE_FORMAT_XRGB8888:
return MESA_FORMAT_B8G8R8X8_UNORM;
case __DRI_IMAGE_FORMAT_ARGB2101010:
- return MESA_FORMAT_ARGB2101010;
+ return MESA_FORMAT_B10G10R10A2_UNORM;
case __DRI_IMAGE_FORMAT_XRGB2101010:
- return MESA_FORMAT_XRGB2101010_UNORM;
+ return MESA_FORMAT_B10G10R10X2_UNORM;
case __DRI_IMAGE_FORMAT_ARGB8888:
return MESA_FORMAT_B8G8R8A8_UNORM;
case __DRI_IMAGE_FORMAT_ABGR8888:
case __DRI_IMAGE_FORMAT_R8:
return MESA_FORMAT_R_UNORM8;
case __DRI_IMAGE_FORMAT_GR88:
- return MESA_FORMAT_GR88;
+ return MESA_FORMAT_R8G8_UNORM;
case __DRI_IMAGE_FORMAT_SARGB8:
- return MESA_FORMAT_SARGB8;
+ return MESA_FORMAT_B8G8R8A8_SRGB;
case __DRI_IMAGE_FORMAT_NONE:
return MESA_FORMAT_NONE;
default:
GLboolean enable_accum)
{
static const uint32_t masks_table[][4] = {
- /* MESA_FORMAT_RGB565 */
+ /* MESA_FORMAT_B5G6R5_UNORM */
{ 0x0000F800, 0x000007E0, 0x0000001F, 0x00000000 },
/* MESA_FORMAT_B8G8R8X8_UNORM */
{ 0x00FF0000, 0x0000FF00, 0x000000FF, 0x00000000 },
/* MESA_FORMAT_B8G8R8A8_UNORM */
{ 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000 },
- /* MESA_FORMAT_XRGB2101010_UNORM */
+ /* MESA_FORMAT_B10G10R10X2_UNORM */
{ 0x3FF00000, 0x000FFC00, 0x000003FF, 0x00000000 },
- /* MESA_FORMAT_ARGB2101010 */
+ /* MESA_FORMAT_B10G10R10A2_UNORM */
{ 0x3FF00000, 0x000FFC00, 0x000003FF, 0xC0000000 },
};
bool is_srgb;
switch (format) {
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
masks = masks_table[0];
break;
case MESA_FORMAT_B8G8R8X8_UNORM:
masks = masks_table[1];
break;
case MESA_FORMAT_B8G8R8A8_UNORM:
- case MESA_FORMAT_SARGB8:
+ case MESA_FORMAT_B8G8R8A8_SRGB:
masks = masks_table[2];
break;
- case MESA_FORMAT_XRGB2101010_UNORM:
+ case MESA_FORMAT_B10G10R10X2_UNORM:
masks = masks_table[3];
break;
- case MESA_FORMAT_ARGB2101010:
+ case MESA_FORMAT_B10G10R10A2_UNORM:
masks = masks_table[4];
break;
default:
return MAPSURF_8BIT | MT_8BIT_I8;
case MESA_FORMAT_A_UNORM8:
return MAPSURF_8BIT | MT_8BIT_I8; /* Kludge! */
- case MESA_FORMAT_AL88:
+ case MESA_FORMAT_L8A8_UNORM:
return MAPSURF_16BIT | MT_16BIT_AY88;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
return MAPSURF_16BIT | MT_16BIT_RGB565;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
return MAPSURF_16BIT | MT_16BIT_ARGB1555;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
return MAPSURF_16BIT | MT_16BIT_ARGB4444;
case MESA_FORMAT_B8G8R8A8_UNORM:
return MAPSURF_32BIT | MT_32BIT_ARGB8888;
{
[MESA_FORMAT_B8G8R8A8_UNORM] = DV_PF_8888,
[MESA_FORMAT_B8G8R8X8_UNORM] = DV_PF_8888,
- [MESA_FORMAT_RGB565] = DV_PF_565,
- [MESA_FORMAT_ARGB1555] = DV_PF_1555,
- [MESA_FORMAT_ARGB4444] = DV_PF_4444,
+ [MESA_FORMAT_B5G6R5_UNORM] = DV_PF_565,
+ [MESA_FORMAT_B5G5R5A1_UNORM] = DV_PF_1555,
+ [MESA_FORMAT_B4G4R4A4_UNORM] = DV_PF_4444,
};
static bool
{
mesa_format format = rb->Format;
- if (format == MESA_FORMAT_S8_Z24 ||
- format == MESA_FORMAT_X8_Z24 ||
+ if (format == MESA_FORMAT_Z24_UNORM_X8_UINT ||
+ format == MESA_FORMAT_Z24_UNORM_S8_UINT ||
format == MESA_FORMAT_Z_UNORM16) {
return true;
}
/* Check for stencil fallback. */
if (irbStencil && irbStencil->mt) {
- assert(intel_rb_format(irbStencil) == MESA_FORMAT_S8_Z24);
+ assert(intel_rb_format(irbStencil) == MESA_FORMAT_Z24_UNORM_X8_UINT);
FALLBACK(intel, INTEL_FALLBACK_STENCIL_BUFFER, false);
} else if (irbStencil && !irbStencil->mt) {
FALLBACK(intel, INTEL_FALLBACK_STENCIL_BUFFER, true);
* we still need to set up the shared depth/stencil state so we can use it.
*/
if (depthRegion == NULL && irbStencil && irbStencil->mt
- && intel_rb_format(irbStencil) == MESA_FORMAT_S8_Z24) {
+ && intel_rb_format(irbStencil) == MESA_FORMAT_Z24_UNORM_X8_UINT) {
depthRegion = irbStencil->mt->region;
}
intel_screen->deviceID != PCI_CHIP_845_G)
ctx->TextureFormatSupported[MESA_FORMAT_B8G8R8X8_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_B8G8R8A8_SRGB] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_B4G4R4A4_UNORM] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_B5G5R5A1_UNORM] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_B5G6R5_UNORM] = true;
ctx->TextureFormatSupported[MESA_FORMAT_L_UNORM8] = true;
ctx->TextureFormatSupported[MESA_FORMAT_A_UNORM8] = true;
ctx->TextureFormatSupported[MESA_FORMAT_I_UNORM8] = true;
- ctx->TextureFormatSupported[MESA_FORMAT_AL88] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_L8A8_UNORM] = true;
/* Depth and stencil */
- ctx->TextureFormatSupported[MESA_FORMAT_S8_Z24] = true;
- ctx->TextureFormatSupported[MESA_FORMAT_X8_Z24] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_Z24_UNORM_X8_UINT] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_Z24_UNORM_S8_UINT] = true;
/*
* This was disabled in initial FBO enabling to avoid combinations
return MAPSURF_8BIT | MT_8BIT_I8;
case MESA_FORMAT_A_UNORM8:
return MAPSURF_8BIT | MT_8BIT_A8;
- case MESA_FORMAT_AL88:
+ case MESA_FORMAT_L8A8_UNORM:
return MAPSURF_16BIT | MT_16BIT_AY88;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
return MAPSURF_16BIT | MT_16BIT_RGB565;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
return MAPSURF_16BIT | MT_16BIT_ARGB1555;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
return MAPSURF_16BIT | MT_16BIT_ARGB4444;
- case MESA_FORMAT_SARGB8:
+ case MESA_FORMAT_B8G8R8A8_SRGB:
case MESA_FORMAT_B8G8R8A8_UNORM:
return MAPSURF_32BIT | MT_32BIT_ARGB8888;
case MESA_FORMAT_B8G8R8X8_UNORM:
case MESA_FORMAT_RGBA_DXT5:
case MESA_FORMAT_SRGBA_DXT5:
return (MAPSURF_COMPRESSED | MT_COMPRESS_DXT4_5);
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_X8_Z24:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
if (DepthMode == GL_ALPHA)
return (MAPSURF_32BIT | MT_32BIT_x8A24);
else if (DepthMode == GL_INTENSITY)
{
[MESA_FORMAT_B8G8R8A8_UNORM] = DV_PF_8888,
[MESA_FORMAT_B8G8R8X8_UNORM] = DV_PF_8888,
- [MESA_FORMAT_RGB565] = DV_PF_565 | DITHER_FULL_ALWAYS,
- [MESA_FORMAT_ARGB1555] = DV_PF_1555 | DITHER_FULL_ALWAYS,
- [MESA_FORMAT_ARGB4444] = DV_PF_4444 | DITHER_FULL_ALWAYS,
+ [MESA_FORMAT_B5G6R5_UNORM] = DV_PF_565 | DITHER_FULL_ALWAYS,
+ [MESA_FORMAT_B5G5R5A1_UNORM] = DV_PF_1555 | DITHER_FULL_ALWAYS,
+ [MESA_FORMAT_B4G4R4A4_UNORM] = DV_PF_4444 | DITHER_FULL_ALWAYS,
};
static bool
{
mesa_format format = rb->Format;
- if (format == MESA_FORMAT_S8_Z24 ||
- format == MESA_FORMAT_X8_Z24 ||
+ if (format == MESA_FORMAT_Z24_UNORM_X8_UINT ||
+ format == MESA_FORMAT_Z24_UNORM_S8_UINT ||
format == MESA_FORMAT_Z_UNORM16) {
return true;
}
/* Check for stencil fallback. */
if (irbStencil && irbStencil->mt) {
- assert(intel_rb_format(irbStencil) == MESA_FORMAT_S8_Z24);
+ assert(intel_rb_format(irbStencil) == MESA_FORMAT_Z24_UNORM_X8_UINT);
FALLBACK(intel, INTEL_FALLBACK_STENCIL_BUFFER, false);
} else if (irbStencil && !irbStencil->mt) {
FALLBACK(intel, INTEL_FALLBACK_STENCIL_BUFFER, true);
* we still need to set up the shared depth/stencil state so we can use it.
*/
if (depthRegion == NULL && irbStencil && irbStencil->mt
- && intel_rb_format(irbStencil) == MESA_FORMAT_S8_Z24) {
+ && intel_rb_format(irbStencil) == MESA_FORMAT_Z24_UNORM_X8_UINT) {
depthRegion = irbStencil->mt->region;
}
clear_val = PACK_COLOR_8888(clear[3], clear[0],
clear[1], clear[2]);
break;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
clear_val = PACK_COLOR_565(clear[0], clear[1], clear[2]);
break;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
clear_val = PACK_COLOR_4444(clear[3], clear[0],
clear[1], clear[2]);
break;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
clear_val = PACK_COLOR_1555(clear[3], clear[0],
clear[1], clear[2]);
break;
case GL_STENCIL_INDEX8_EXT:
case GL_STENCIL_INDEX16_EXT:
/* These aren't actual texture formats, so force them here. */
- rb->Format = MESA_FORMAT_S8_Z24;
+ rb->Format = MESA_FORMAT_Z24_UNORM_X8_UINT;
break;
}
case MESA_FORMAT_B8G8R8X8_UNORM:
color = PACK_COLOR_8888(ubcolor[3], ubcolor[0], ubcolor[1], ubcolor[2]);
break;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
color = PACK_COLOR_565(ubcolor[0], ubcolor[1], ubcolor[2]);
break;
default:
_mesa_initialize_window_framebuffer(fb, mesaVis);
if (mesaVis->redBits == 5)
- rgbFormat = MESA_FORMAT_RGB565;
+ rgbFormat = MESA_FORMAT_B5G6R5_UNORM;
else if (mesaVis->sRGBCapable)
- rgbFormat = MESA_FORMAT_SARGB8;
+ rgbFormat = MESA_FORMAT_B8G8R8A8_SRGB;
else if (mesaVis->alphaBits == 0)
rgbFormat = MESA_FORMAT_B8G8R8X8_UNORM;
else
* Use combined depth/stencil. Note that the renderbuffer is
* attached to two attachment points.
*/
- rb = intel_create_private_renderbuffer(MESA_FORMAT_S8_Z24);
+ rb = intel_create_private_renderbuffer(MESA_FORMAT_Z24_UNORM_X8_UINT);
_mesa_add_renderbuffer(fb, BUFFER_DEPTH, &rb->Base.Base);
_mesa_add_renderbuffer(fb, BUFFER_STENCIL, &rb->Base.Base);
}
intel_screen_make_configs(__DRIscreen *dri_screen)
{
static const mesa_format formats[] = {
- MESA_FORMAT_RGB565,
+ MESA_FORMAT_B5G6R5_UNORM,
MESA_FORMAT_B8G8R8A8_UNORM
};
depth_bits[0] = 0;
stencil_bits[0] = 0;
- if (formats[i] == MESA_FORMAT_RGB565) {
+ if (formats[i] == MESA_FORMAT_B5G6R5_UNORM) {
depth_bits[1] = 16;
stencil_bits[1] = 0;
} else {
for (int i = 0; i < ARRAY_SIZE(formats); i++) {
__DRIconfig **new_configs;
- if (formats[i] == MESA_FORMAT_RGB565) {
+ if (formats[i] == MESA_FORMAT_B5G6R5_UNORM) {
depth_bits[0] = 16;
stencil_bits[0] = 0;
} else {
}
} else if (rb->mt->cpp == 2) {
internalFormat = GL_RGB;
- texFormat = MESA_FORMAT_RGB565;
+ texFormat = MESA_FORMAT_B5G6R5_UNORM;
}
_mesa_lock_texture(&intel->ctx, texObj);
this->map_stencil_as_y_tiled = true;
this->brw_surfaceformat = BRW_SURFACEFORMAT_R8_UNORM;
break;
- case MESA_FORMAT_X8_Z24:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
/* It would make sense to use BRW_SURFACEFORMAT_R24_UNORM_X8_TYPELESS
* here, but unfortunately it isn't supported as a render target, which
* would prevent us from blitting to 24-bit depth.
switch (mt->format) {
case MESA_FORMAT_Z_UNORM16: depth_format = BRW_DEPTHFORMAT_D16_UNORM; break;
case MESA_FORMAT_Z_FLOAT32: depth_format = BRW_DEPTHFORMAT_D32_FLOAT; break;
- case MESA_FORMAT_X8_Z24: depth_format = BRW_DEPTHFORMAT_D24_UNORM_X8_UINT; break;
+ case MESA_FORMAT_Z24_UNORM_S8_UINT: depth_format = BRW_DEPTHFORMAT_D24_UNORM_X8_UINT; break;
default: assert(0); break;
}
}
{
/* Note: don't just check gl_renderbuffer::Format, because in some cases
* multiple gl_formats resolve to the same native type in the miptree (for
- * example MESA_FORMAT_X8_Z24 and MESA_FORMAT_S8_Z24), and we can blit
+ * example MESA_FORMAT_Z24_UNORM_S8_UINT and MESA_FORMAT_Z24_UNORM_X8_UINT), and we can blit
* between those formats.
*/
mesa_format src_format = find_miptree(buffer_bit, src_irb)->format;
* we have to lie about the surface format. See the comments in
* brw_blorp_surface_info::set().
*/
- if ((src_mt->format == MESA_FORMAT_X8_Z24) !=
- (dst_mt->format == MESA_FORMAT_X8_Z24)) {
+ if ((src_mt->format == MESA_FORMAT_Z24_UNORM_S8_UINT) !=
+ (dst_mt->format == MESA_FORMAT_Z24_UNORM_S8_UINT)) {
return false;
}
uint32_t depth_clear_value;
switch (mt->format) {
- case MESA_FORMAT_Z32_FLOAT_X24S8:
- case MESA_FORMAT_S8_Z24:
+ case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
/* From the Sandy Bridge PRM, volume 2 part 1, page 314:
*
* "[DevSNB+]: Several cases exist where Depth Buffer Clear cannot be
fb->Visual.sRGBCapable = false;
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_B8G8R8A8_SRGB) {
fb->Attachment[i].Renderbuffer->Format = MESA_FORMAT_B8G8R8A8_UNORM;
}
}
if (!drb &&
(srb = intel_get_renderbuffer(fb, BUFFER_STENCIL)) &&
!srb->mt->stencil_mt &&
- (intel_rb_format(srb) == MESA_FORMAT_S8_Z24 ||
- intel_rb_format(srb) == MESA_FORMAT_Z32_FLOAT_X24S8)) {
+ (intel_rb_format(srb) == MESA_FORMAT_Z24_UNORM_X8_UINT ||
+ intel_rb_format(srb) == MESA_FORMAT_Z32_FLOAT_S8X24_UINT)) {
drb = srb;
}
return BRW_DEPTHFORMAT_D16_UNORM;
case MESA_FORMAT_Z_FLOAT32:
return BRW_DEPTHFORMAT_D32_FLOAT;
- case MESA_FORMAT_X8_Z24:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
if (brw->gen >= 6) {
return BRW_DEPTHFORMAT_D24_UNORM_X8_UINT;
} else {
*/
return BRW_DEPTHFORMAT_D24_UNORM_S8_UINT;
}
- case MESA_FORMAT_S8_Z24:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
return BRW_DEPTHFORMAT_D24_UNORM_S8_UINT;
- case MESA_FORMAT_Z32_FLOAT_X24S8:
+ case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
return BRW_DEPTHFORMAT_D32_FLOAT_S8X24_UINT;
default:
_mesa_problem(ctx, "Unexpected depth format %s\n",
[MESA_FORMAT_X8R8G8B8_UNORM] = 0,
[MESA_FORMAT_BGR_UNORM8] = 0,
[MESA_FORMAT_RGB_UNORM8] = BRW_SURFACEFORMAT_R8G8B8_UNORM,
- [MESA_FORMAT_RGB565] = BRW_SURFACEFORMAT_B5G6R5_UNORM,
- [MESA_FORMAT_RGB565_REV] = 0,
- [MESA_FORMAT_ARGB4444] = BRW_SURFACEFORMAT_B4G4R4A4_UNORM,
- [MESA_FORMAT_ARGB4444_REV] = 0,
- [MESA_FORMAT_RGBA5551] = 0,
- [MESA_FORMAT_ARGB1555] = BRW_SURFACEFORMAT_B5G5R5A1_UNORM,
- [MESA_FORMAT_ARGB1555_REV] = 0,
- [MESA_FORMAT_AL44] = 0,
- [MESA_FORMAT_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_B5G6R5_UNORM] = BRW_SURFACEFORMAT_B5G6R5_UNORM,
+ [MESA_FORMAT_R5G6B5_UNORM] = 0,
+ [MESA_FORMAT_B4G4R4A4_UNORM] = BRW_SURFACEFORMAT_B4G4R4A4_UNORM,
+ [MESA_FORMAT_A4R4G4B4_UNORM] = 0,
+ [MESA_FORMAT_A1B5G5R5_UNORM] = 0,
+ [MESA_FORMAT_B5G5R5A1_UNORM] = BRW_SURFACEFORMAT_B5G5R5A1_UNORM,
+ [MESA_FORMAT_A1R5G5B5_UNORM] = 0,
+ [MESA_FORMAT_L4A4_UNORM] = 0,
+ [MESA_FORMAT_L8A8_UNORM] = BRW_SURFACEFORMAT_L8A8_UNORM,
+ [MESA_FORMAT_A8L8_UNORM] = 0,
+ [MESA_FORMAT_L16A16_UNORM] = BRW_SURFACEFORMAT_L16A16_UNORM,
+ [MESA_FORMAT_A16L16_UNORM] = 0,
+ [MESA_FORMAT_B2G3R3_UNORM] = 0,
[MESA_FORMAT_A_UNORM8] = BRW_SURFACEFORMAT_A8_UNORM,
[MESA_FORMAT_A_UNORM16] = BRW_SURFACEFORMAT_A16_UNORM,
[MESA_FORMAT_L_UNORM8] = BRW_SURFACEFORMAT_L8_UNORM,
[MESA_FORMAT_YCBCR_REV] = BRW_SURFACEFORMAT_YCRCB_NORMAL,
[MESA_FORMAT_YCBCR] = BRW_SURFACEFORMAT_YCRCB_SWAPUVY,
[MESA_FORMAT_R_UNORM8] = BRW_SURFACEFORMAT_R8_UNORM,
- [MESA_FORMAT_GR88] = BRW_SURFACEFORMAT_R8G8_UNORM,
- [MESA_FORMAT_RG88] = 0,
+ [MESA_FORMAT_R8G8_UNORM] = BRW_SURFACEFORMAT_R8G8_UNORM,
+ [MESA_FORMAT_G8R8_UNORM] = 0,
[MESA_FORMAT_R_UNORM16] = 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_R16G16_UNORM] = BRW_SURFACEFORMAT_R16G16_UNORM,
+ [MESA_FORMAT_G16R16_UNORM] = 0,
+ [MESA_FORMAT_B10G10R10A2_UNORM] = BRW_SURFACEFORMAT_B10G10R10A2_UNORM,
+ [MESA_FORMAT_S8_UINT_Z24_UNORM] = 0,
+ [MESA_FORMAT_Z24_UNORM_X8_UINT] = 0,
[MESA_FORMAT_Z_UNORM16] = 0,
- [MESA_FORMAT_X8_Z24] = 0,
- [MESA_FORMAT_Z24_X8] = 0,
+ [MESA_FORMAT_Z24_UNORM_S8_UINT] = 0,
+ [MESA_FORMAT_X8Z24_UNORM] = 0,
[MESA_FORMAT_Z_UNORM32] = 0,
[MESA_FORMAT_S_UINT8] = 0,
[MESA_FORMAT_BGR_SRGB8] = 0,
- [MESA_FORMAT_SRGBA8] = 0,
- [MESA_FORMAT_SARGB8] = BRW_SURFACEFORMAT_B8G8R8A8_UNORM_SRGB,
+ [MESA_FORMAT_A8B8G8R8_SRGB] = 0,
+ [MESA_FORMAT_B8G8R8A8_SRGB] = BRW_SURFACEFORMAT_B8G8R8A8_UNORM_SRGB,
[MESA_FORMAT_L_SRGB8] = BRW_SURFACEFORMAT_L8_UNORM_SRGB,
- [MESA_FORMAT_SLA8] = BRW_SURFACEFORMAT_L8A8_UNORM_SRGB,
+ [MESA_FORMAT_L8A8_SRGB] = BRW_SURFACEFORMAT_L8A8_UNORM_SRGB,
[MESA_FORMAT_SRGB_DXT1] = BRW_SURFACEFORMAT_DXT1_RGB_SRGB,
[MESA_FORMAT_SRGBA_DXT1] = BRW_SURFACEFORMAT_BC1_UNORM_SRGB,
[MESA_FORMAT_SRGBA_DXT3] = BRW_SURFACEFORMAT_BC2_UNORM_SRGB,
[MESA_FORMAT_SIGNED_AL1616] = 0,
[MESA_FORMAT_SIGNED_I16] = 0,
- [MESA_FORMAT_RGB9_E5_FLOAT] = BRW_SURFACEFORMAT_R9G9B9E5_SHAREDEXP,
- [MESA_FORMAT_R11_G11_B10_FLOAT] = BRW_SURFACEFORMAT_R11G11B10_FLOAT,
+ [MESA_FORMAT_R9G9B9E5_FLOAT] = BRW_SURFACEFORMAT_R9G9B9E5_SHAREDEXP,
+ [MESA_FORMAT_R11G11B10_FLOAT] = BRW_SURFACEFORMAT_R11G11B10_FLOAT,
[MESA_FORMAT_Z_FLOAT32] = 0,
- [MESA_FORMAT_Z32_FLOAT_X24S8] = 0,
+ [MESA_FORMAT_Z32_FLOAT_S8X24_UINT] = 0,
- [MESA_FORMAT_ARGB2101010_UINT] = BRW_SURFACEFORMAT_B10G10R10A2_UINT,
- [MESA_FORMAT_ABGR2101010_UINT] = BRW_SURFACEFORMAT_R10G10B10A2_UINT,
+ [MESA_FORMAT_B10G10R10A2_UINT] = BRW_SURFACEFORMAT_B10G10R10A2_UINT,
+ [MESA_FORMAT_R10G10B10A2_UINT] = BRW_SURFACEFORMAT_R10G10B10A2_UINT,
- [MESA_FORMAT_XRGB4444_UNORM] = 0,
- [MESA_FORMAT_XRGB1555_UNORM] = BRW_SURFACEFORMAT_B5G5R5X1_UNORM,
- [MESA_FORMAT_XBGR8888_SNORM] = 0,
- [MESA_FORMAT_XBGR8888_SRGB] = 0,
+ [MESA_FORMAT_B4G4R4X4_UNORM] = 0,
+ [MESA_FORMAT_B5G5R5X1_UNORM] = BRW_SURFACEFORMAT_B5G5R5X1_UNORM,
+ [MESA_FORMAT_R8G8B8X8_SNORM] = 0,
+ [MESA_FORMAT_R8G8B8X8_SRGB] = 0,
[MESA_FORMAT_RGBX_UINT8] = 0,
[MESA_FORMAT_RGBX_SINT8] = 0,
- [MESA_FORMAT_XRGB2101010_UNORM] = BRW_SURFACEFORMAT_B10G10R10X2_UNORM,
+ [MESA_FORMAT_B10G10R10X2_UNORM] = BRW_SURFACEFORMAT_B10G10R10X2_UNORM,
[MESA_FORMAT_RGBX_UNORM16] = BRW_SURFACEFORMAT_R16G16B16X16_UNORM,
[MESA_FORMAT_RGBX_SNORM16] = 0,
[MESA_FORMAT_RGBX_FLOAT16] = BRW_SURFACEFORMAT_R16G16B16X16_FLOAT,
/* We will check this table for FBO completeness, but the surface format
* table above only covered color rendering.
*/
- brw->format_supported_as_render_target[MESA_FORMAT_S8_Z24] = true;
- brw->format_supported_as_render_target[MESA_FORMAT_X8_Z24] = true;
+ brw->format_supported_as_render_target[MESA_FORMAT_Z24_UNORM_X8_UINT] = true;
+ brw->format_supported_as_render_target[MESA_FORMAT_Z24_UNORM_S8_UINT] = true;
brw->format_supported_as_render_target[MESA_FORMAT_S_UINT8] = true;
brw->format_supported_as_render_target[MESA_FORMAT_Z_UNORM16] = true;
brw->format_supported_as_render_target[MESA_FORMAT_Z_FLOAT32] = true;
- brw->format_supported_as_render_target[MESA_FORMAT_Z32_FLOAT_X24S8] = true;
+ brw->format_supported_as_render_target[MESA_FORMAT_Z32_FLOAT_S8X24_UINT] = true;
/* We remap depth formats to a supported texturing format in
* translate_tex_format().
*/
- ctx->TextureFormatSupported[MESA_FORMAT_S8_Z24] = true;
- ctx->TextureFormatSupported[MESA_FORMAT_X8_Z24] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_Z24_UNORM_X8_UINT] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_Z24_UNORM_S8_UINT] = true;
ctx->TextureFormatSupported[MESA_FORMAT_Z_FLOAT32] = true;
- ctx->TextureFormatSupported[MESA_FORMAT_Z32_FLOAT_X24S8] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_Z32_FLOAT_S8X24_UINT] = true;
/* It appears that Z16 is slower than Z24 (on Intel Ivybridge and newer
* hardware at least), so there's no real reason to prefer it unless you're
case MESA_FORMAT_Z_UNORM16:
return BRW_SURFACEFORMAT_R16_UNORM;
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_X8_Z24:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
return BRW_SURFACEFORMAT_R24_UNORM_X8_TYPELESS;
case MESA_FORMAT_Z_FLOAT32:
return BRW_SURFACEFORMAT_R32_FLOAT;
- case MESA_FORMAT_Z32_FLOAT_X24S8:
+ case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
return BRW_SURFACEFORMAT_R32_FLOAT_X8X24_TYPELESS;
case MESA_FORMAT_RGBA_FLOAT32:
switch (format) {
case MESA_FORMAT_Z_FLOAT32:
- case MESA_FORMAT_Z32_FLOAT_X24S8:
- case MESA_FORMAT_X8_Z24:
- case MESA_FORMAT_S8_Z24:
+ case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
case MESA_FORMAT_Z_UNORM16:
return true;
default:
rb->Format = MESA_FORMAT_S_UINT8;
} else {
assert(!brw->must_use_separate_stencil);
- rb->Format = MESA_FORMAT_S8_Z24;
+ rb->Format = MESA_FORMAT_Z24_UNORM_X8_UINT;
}
break;
}
/* Fix up the Z miptree format for how we're splitting out separate
* stencil. Gen7 expects there to be no stencil bits in its depth buffer.
*/
- if (mt->format == MESA_FORMAT_S8_Z24) {
- mt->format = MESA_FORMAT_X8_Z24;
- } else if (mt->format == MESA_FORMAT_Z32_FLOAT_X24S8) {
+ if (mt->format == MESA_FORMAT_Z24_UNORM_X8_UINT) {
+ mt->format = MESA_FORMAT_Z24_UNORM_S8_UINT;
+ } else if (mt->format == MESA_FORMAT_Z32_FLOAT_S8X24_UINT) {
mt->format = MESA_FORMAT_Z_FLOAT32;
mt->cpp = 4;
} else {
case MESA_FORMAT_ETC2_SRGB8:
case MESA_FORMAT_ETC2_SRGB8_ALPHA8_EAC:
case MESA_FORMAT_ETC2_SRGB8_PUNCHTHROUGH_ALPHA1:
- format = MESA_FORMAT_SARGB8;
+ format = MESA_FORMAT_B8G8R8A8_SRGB;
break;
case MESA_FORMAT_ETC2_RGBA8_EAC:
case MESA_FORMAT_ETC2_RGB8_PUNCHTHROUGH_ALPHA1:
format = MESA_FORMAT_SIGNED_R16;
break;
case MESA_FORMAT_ETC2_RG11_EAC:
- format = MESA_FORMAT_GR1616;
+ format = MESA_FORMAT_R16G16_UNORM;
break;
case MESA_FORMAT_ETC2_SIGNED_RG11_EAC:
format = MESA_FORMAT_SIGNED_GR1616;
assert(target_to_target(image->TexObject->Target) == mt->target);
mesa_format mt_format = mt->format;
- if (mt->format == MESA_FORMAT_X8_Z24 && mt->stencil_mt)
- mt_format = MESA_FORMAT_S8_Z24;
+ if (mt->format == MESA_FORMAT_Z24_UNORM_S8_UINT && mt->stencil_mt)
+ mt_format = MESA_FORMAT_Z24_UNORM_X8_UINT;
if (mt->format == MESA_FORMAT_Z_FLOAT32 && mt->stencil_mt)
- mt_format = MESA_FORMAT_Z32_FLOAT_X24S8;
+ mt_format = MESA_FORMAT_Z32_FLOAT_S8X24_UINT;
if (mt->etc_format != MESA_FORMAT_NONE)
mt_format = mt->etc_format;
* However, for textures and renderbuffers with packed depth/stencil formats
* on hardware where we want or need to use separate stencil, there will be
* two miptrees for storing the data. If the depthstencil texture or rb is
- * MESA_FORMAT_Z32_FLOAT_X24S8, then mt->format will be
- * MESA_FORMAT_Z_FLOAT32, otherwise for MESA_FORMAT_S8_Z24 objects it will be
- * MESA_FORMAT_X8_Z24.
+ * MESA_FORMAT_Z32_FLOAT_S8X24_UINT, then mt->format will be
+ * MESA_FORMAT_Z_FLOAT32, otherwise for MESA_FORMAT_Z24_UNORM_X8_UINT objects it will be
+ * MESA_FORMAT_Z24_UNORM_S8_UINT.
*
* For ETC1/ETC2 textures, this is one of the uncompressed mesa texture
* formats if the hardware lacks support for ETC1/ETC2. See @ref wraps_etc.
case MESA_FORMAT_B8G8R8X8_UNORM:
color = PACK_COLOR_8888(ubcolor[3], ubcolor[0], ubcolor[1], ubcolor[2]);
break;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
color = PACK_COLOR_565(ubcolor[0], ubcolor[1], ubcolor[2]);
break;
default:
_mesa_initialize_window_framebuffer(fb, mesaVis);
if (mesaVis->redBits == 5)
- rgbFormat = MESA_FORMAT_RGB565;
+ rgbFormat = MESA_FORMAT_B5G6R5_UNORM;
else if (mesaVis->sRGBCapable)
- rgbFormat = MESA_FORMAT_SARGB8;
+ rgbFormat = MESA_FORMAT_B8G8R8A8_SRGB;
else if (mesaVis->alphaBits == 0)
rgbFormat = MESA_FORMAT_B8G8R8X8_UNORM;
else {
- rgbFormat = MESA_FORMAT_SARGB8;
+ rgbFormat = MESA_FORMAT_B8G8R8A8_SRGB;
fb->Visual.sRGBCapable = true;
}
assert(mesaVis->stencilBits == 8);
if (screen->devinfo->has_hiz_and_separate_stencil) {
- rb = intel_create_private_renderbuffer(MESA_FORMAT_X8_Z24,
+ rb = intel_create_private_renderbuffer(MESA_FORMAT_Z24_UNORM_S8_UINT,
num_samples);
_mesa_add_renderbuffer(fb, BUFFER_DEPTH, &rb->Base.Base);
rb = intel_create_private_renderbuffer(MESA_FORMAT_S_UINT8,
* Use combined depth/stencil. Note that the renderbuffer is
* attached to two attachment points.
*/
- rb = intel_create_private_renderbuffer(MESA_FORMAT_S8_Z24,
+ rb = intel_create_private_renderbuffer(MESA_FORMAT_Z24_UNORM_X8_UINT,
num_samples);
_mesa_add_renderbuffer(fb, BUFFER_DEPTH, &rb->Base.Base);
_mesa_add_renderbuffer(fb, BUFFER_STENCIL, &rb->Base.Base);
intel_screen_make_configs(__DRIscreen *dri_screen)
{
static const mesa_format formats[] = {
- MESA_FORMAT_RGB565,
+ MESA_FORMAT_B5G6R5_UNORM,
MESA_FORMAT_B8G8R8A8_UNORM
};
depth_bits[0] = 0;
stencil_bits[0] = 0;
- if (formats[i] == MESA_FORMAT_RGB565) {
+ if (formats[i] == MESA_FORMAT_B5G6R5_UNORM) {
depth_bits[1] = 16;
stencil_bits[1] = 0;
if (devinfo->gen >= 6) {
for (int i = 0; i < ARRAY_SIZE(formats); i++) {
__DRIconfig **new_configs;
- if (formats[i] == MESA_FORMAT_RGB565) {
+ if (formats[i] == MESA_FORMAT_B5G6R5_UNORM) {
depth_bits[0] = 16;
stencil_bits[0] = 0;
} else {
depth_bits[0] = 0;
stencil_bits[0] = 0;
- if (formats[i] == MESA_FORMAT_RGB565) {
+ if (formats[i] == MESA_FORMAT_B5G6R5_UNORM) {
depth_bits[1] = 16;
stencil_bits[1] = 0;
} else {
}
} else if (rb->mt->cpp == 2) {
internalFormat = GL_RGB;
- texFormat = MESA_FORMAT_RGB565;
+ texFormat = MESA_FORMAT_B5G6R5_UNORM;
}
_mesa_lock_texture(&brw->ctx, texObj);
break;
case GL_RGB5:
rb->_BaseFormat = GL_RGB;
- rb->Format = MESA_FORMAT_RGB565;
+ rb->Format = MESA_FORMAT_B5G6R5_UNORM;
s->cpp = 2;
break;
case GL_DEPTH_COMPONENT16:
case GL_STENCIL_INDEX8_EXT:
case GL_DEPTH24_STENCIL8_EXT:
rb->_BaseFormat = GL_DEPTH_STENCIL;
- rb->Format = MESA_FORMAT_Z24_S8;
+ rb->Format = MESA_FORMAT_S8_UINT_Z24_UNORM;
s->cpp = 4;
break;
default:
switch (format) {
case MESA_FORMAT_B8G8R8X8_UNORM:
case MESA_FORMAT_B8G8R8A8_UNORM:
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
return 32;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
case MESA_FORMAT_Z_UNORM16:
return 16;
default:
const uint8_t msaa_samples[] = { 0 };
static const mesa_format formats[3] = {
- MESA_FORMAT_RGB565,
+ MESA_FORMAT_B5G6R5_UNORM,
MESA_FORMAT_B8G8R8A8_UNORM,
MESA_FORMAT_B8G8R8X8_UNORM,
};
case GL_COMPRESSED_RGBA:
return MESA_FORMAT_B8G8R8A8_UNORM;
case GL_RGB5_A1:
- return MESA_FORMAT_ARGB1555;
+ return MESA_FORMAT_B5G5R5A1_UNORM;
case GL_RGB:
case GL_RGB8:
case GL_R3_G3_B2:
case GL_RGB4:
case GL_RGB5:
- return MESA_FORMAT_RGB565;
+ return MESA_FORMAT_B5G6R5_UNORM;
case 2:
case GL_LUMINANCE_ALPHA:
return PACK_COLOR_8888(c[RCOMP], c[GCOMP], c[BCOMP], c[ACOMP]);
case MESA_FORMAT_R8G8B8A8_UNORM:
return PACK_COLOR_8888(c[ACOMP], c[BCOMP], c[GCOMP], c[RCOMP]);
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
return PACK_COLOR_565(c[RCOMP], c[GCOMP], c[BCOMP]);
default:
assert(0);
pack_zs_i(mesa_format f, uint32_t z, uint8_t s)
{
switch (f) {
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
return (z & 0xffffff00) | (s & 0xff);
- case MESA_FORMAT_Z24_X8:
+ case MESA_FORMAT_X8Z24_UNORM:
return (z & 0xffffff00);
case MESA_FORMAT_Z_UNORM16:
return (z & 0xffff0000) >> 16;
return NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_X8R8G8B8_X8R8G8B8;
case MESA_FORMAT_B8G8R8A8_UNORM:
return NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_A8R8G8B8;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
return NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_R5G6B5;
default:
assert(0);
case MESA_FORMAT_L_UNORM8:
case MESA_FORMAT_I_UNORM8:
return NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_Y8;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
return NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_A1R5G5B5;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
return NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_A4R4G4B4;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
return NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_R5G6B5;
case MESA_FORMAT_B8G8R8A8_UNORM:
return NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_A8R8G8B8;
case MESA_FORMAT_A_UNORM8:
case MESA_FORMAT_L_UNORM8:
case MESA_FORMAT_I_UNORM8:
- case MESA_FORMAT_RGB332:
+ case MESA_FORMAT_B2G3R3_UNORM:
return NV04_SWIZZLED_SURFACE_FORMAT_COLOR_Y8;
- case MESA_FORMAT_RGB565:
- case MESA_FORMAT_RGB565_REV:
- case MESA_FORMAT_ARGB4444:
- case MESA_FORMAT_ARGB4444_REV:
- case MESA_FORMAT_ARGB1555:
- case MESA_FORMAT_RGBA5551:
- case MESA_FORMAT_ARGB1555_REV:
- case MESA_FORMAT_AL88:
- case MESA_FORMAT_AL88_REV:
+ case MESA_FORMAT_B5G6R5_UNORM:
+ case MESA_FORMAT_R5G6B5_UNORM:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
+ case MESA_FORMAT_A4R4G4B4_UNORM:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
+ case MESA_FORMAT_A1B5G5R5_UNORM:
+ case MESA_FORMAT_A1R5G5B5_UNORM:
+ case MESA_FORMAT_L8A8_UNORM:
+ case MESA_FORMAT_A8L8_UNORM:
case MESA_FORMAT_YCBCR:
case MESA_FORMAT_YCBCR_REV:
case MESA_FORMAT_Z_UNORM16:
case MESA_FORMAT_B8G8R8X8_UNORM:
case MESA_FORMAT_B8G8R8A8_UNORM:
case MESA_FORMAT_A8R8G8B8_UNORM:
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
case MESA_FORMAT_Z_UNORM32:
return NV04_SWIZZLED_SURFACE_FORMAT_COLOR_A8R8G8B8;
case MESA_FORMAT_A_UNORM8:
case MESA_FORMAT_L_UNORM8:
case MESA_FORMAT_I_UNORM8:
- case MESA_FORMAT_RGB332:
+ case MESA_FORMAT_B2G3R3_UNORM:
return NV04_CONTEXT_SURFACES_2D_FORMAT_Y8;
- case MESA_FORMAT_RGB565:
- case MESA_FORMAT_RGB565_REV:
- case MESA_FORMAT_ARGB4444:
- case MESA_FORMAT_ARGB4444_REV:
- case MESA_FORMAT_ARGB1555:
- case MESA_FORMAT_RGBA5551:
- case MESA_FORMAT_ARGB1555_REV:
- case MESA_FORMAT_AL88:
- case MESA_FORMAT_AL88_REV:
+ case MESA_FORMAT_B5G6R5_UNORM:
+ case MESA_FORMAT_R5G6B5_UNORM:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
+ case MESA_FORMAT_A4R4G4B4_UNORM:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
+ case MESA_FORMAT_A1B5G5R5_UNORM:
+ case MESA_FORMAT_A1R5G5B5_UNORM:
+ case MESA_FORMAT_L8A8_UNORM:
+ case MESA_FORMAT_A8L8_UNORM:
case MESA_FORMAT_YCBCR:
case MESA_FORMAT_YCBCR_REV:
case MESA_FORMAT_Z_UNORM16:
case MESA_FORMAT_B8G8R8X8_UNORM:
case MESA_FORMAT_B8G8R8A8_UNORM:
case MESA_FORMAT_A8R8G8B8_UNORM:
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
case MESA_FORMAT_Z_UNORM32:
return NV04_CONTEXT_SURFACES_2D_FORMAT_Y32;
case MESA_FORMAT_A_UNORM8:
case MESA_FORMAT_L_UNORM8:
case MESA_FORMAT_I_UNORM8:
- case MESA_FORMAT_RGB332:
+ case MESA_FORMAT_B2G3R3_UNORM:
return NV04_GDI_RECTANGLE_TEXT_COLOR_FORMAT_A8R8G8B8;
- case MESA_FORMAT_RGB565:
- case MESA_FORMAT_RGB565_REV:
- case MESA_FORMAT_ARGB4444:
- case MESA_FORMAT_ARGB4444_REV:
- case MESA_FORMAT_ARGB1555:
- case MESA_FORMAT_RGBA5551:
- case MESA_FORMAT_ARGB1555_REV:
- case MESA_FORMAT_AL88:
- case MESA_FORMAT_AL88_REV:
+ case MESA_FORMAT_B5G6R5_UNORM:
+ case MESA_FORMAT_R5G6B5_UNORM:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
+ case MESA_FORMAT_A4R4G4B4_UNORM:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
+ case MESA_FORMAT_A1B5G5R5_UNORM:
+ case MESA_FORMAT_A1R5G5B5_UNORM:
+ case MESA_FORMAT_L8A8_UNORM:
+ case MESA_FORMAT_A8L8_UNORM:
case MESA_FORMAT_YCBCR:
case MESA_FORMAT_YCBCR_REV:
case MESA_FORMAT_Z_UNORM16:
case MESA_FORMAT_B8G8R8X8_UNORM:
case MESA_FORMAT_B8G8R8A8_UNORM:
case MESA_FORMAT_A8R8G8B8_UNORM:
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
case MESA_FORMAT_Z_UNORM32:
return NV04_GDI_RECTANGLE_TEXT_COLOR_FORMAT_A8R8G8B8;
case MESA_FORMAT_A_UNORM8:
case MESA_FORMAT_L_UNORM8:
case MESA_FORMAT_I_UNORM8:
- case MESA_FORMAT_RGB332:
+ case MESA_FORMAT_B2G3R3_UNORM:
return NV03_SCALED_IMAGE_FROM_MEMORY_COLOR_FORMAT_AY8;
- case MESA_FORMAT_RGB565:
- case MESA_FORMAT_RGB565_REV:
- case MESA_FORMAT_ARGB4444:
- case MESA_FORMAT_ARGB4444_REV:
- case MESA_FORMAT_ARGB1555:
- case MESA_FORMAT_RGBA5551:
- case MESA_FORMAT_ARGB1555_REV:
- case MESA_FORMAT_AL88:
- case MESA_FORMAT_AL88_REV:
+ case MESA_FORMAT_B5G6R5_UNORM:
+ case MESA_FORMAT_R5G6B5_UNORM:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
+ case MESA_FORMAT_A4R4G4B4_UNORM:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
+ case MESA_FORMAT_A1B5G5R5_UNORM:
+ case MESA_FORMAT_A1R5G5B5_UNORM:
+ case MESA_FORMAT_L8A8_UNORM:
+ case MESA_FORMAT_A8L8_UNORM:
case MESA_FORMAT_YCBCR:
case MESA_FORMAT_YCBCR_REV:
case MESA_FORMAT_Z_UNORM16:
case MESA_FORMAT_B8G8R8X8_UNORM:
case MESA_FORMAT_B8G8R8A8_UNORM:
case MESA_FORMAT_A8R8G8B8_UNORM:
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
case MESA_FORMAT_Z_UNORM32:
return NV03_SCALED_IMAGE_FROM_MEMORY_COLOR_FORMAT_A8R8G8B8;
return NV10_3D_RT_FORMAT_COLOR_X8R8G8B8;
case MESA_FORMAT_B8G8R8A8_UNORM:
return NV10_3D_RT_FORMAT_COLOR_A8R8G8B8;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
return NV10_3D_RT_FORMAT_COLOR_R5G6B5;
case MESA_FORMAT_Z_UNORM16:
return NV10_3D_RT_FORMAT_DEPTH_Z16;
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
return NV10_3D_RT_FORMAT_DEPTH_Z24S8;
default:
assert(0);
case MESA_FORMAT_B8G8R8X8_UNORM:
return NV10_3D_TEX_FORMAT_FORMAT_X8R8G8B8;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
return NV10_3D_TEX_FORMAT_FORMAT_A1R5G5B5;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
return NV10_3D_TEX_FORMAT_FORMAT_A4R4G4B4;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
return NV10_3D_TEX_FORMAT_FORMAT_R5G6B5;
case MESA_FORMAT_A_UNORM8:
get_tex_format_rect(struct gl_texture_image *ti)
{
switch (ti->TexFormat) {
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
return NV10_3D_TEX_FORMAT_FORMAT_A1R5G5B5_RECT;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
return NV10_3D_TEX_FORMAT_FORMAT_R5G6B5_RECT;
case MESA_FORMAT_B8G8R8A8_UNORM:
return NV20_3D_RT_FORMAT_COLOR_X8R8G8B8;
case MESA_FORMAT_B8G8R8A8_UNORM:
return NV20_3D_RT_FORMAT_COLOR_A8R8G8B8;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
return NV20_3D_RT_FORMAT_COLOR_R5G6B5;
case MESA_FORMAT_Z_UNORM16:
return NV20_3D_RT_FORMAT_DEPTH_Z16;
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
return NV20_3D_RT_FORMAT_DEPTH_Z24S8;
default:
assert(0);
if (context_chipset(ctx) >= 0x25)
setup_hierz_buffer(ctx);
} else {
- rt_format |= get_rt_format(MESA_FORMAT_Z24_S8);
+ rt_format |= get_rt_format(MESA_FORMAT_S8_UINT_Z24_UNORM);
zeta_pitch = rt_pitch;
}
case MESA_FORMAT_B8G8R8A8_UNORM:
return NV20_3D_TEX_FORMAT_FORMAT_A8R8G8B8;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
return NV20_3D_TEX_FORMAT_FORMAT_A1R5G5B5;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
return NV20_3D_TEX_FORMAT_FORMAT_A4R4G4B4;
case MESA_FORMAT_B8G8R8X8_UNORM:
return NV20_3D_TEX_FORMAT_FORMAT_X8R8G8B8;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
return NV20_3D_TEX_FORMAT_FORMAT_R5G6B5;
case MESA_FORMAT_A_UNORM8:
case MESA_FORMAT_B8G8R8A8_UNORM:
return NV20_3D_TEX_FORMAT_FORMAT_A8R8G8B8_RECT;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
return NV20_3D_TEX_FORMAT_FORMAT_A1R5G5B5_RECT;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
return NV20_3D_TEX_FORMAT_FORMAT_A4R4G4B4_RECT;
case MESA_FORMAT_B8G8R8X8_UNORM:
return NV20_3D_TEX_FORMAT_FORMAT_R8G8B8_RECT;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
return NV20_3D_TEX_FORMAT_FORMAT_R5G6B5_RECT;
case MESA_FORMAT_L_UNORM8:
switch (mesa_format) {
case MESA_FORMAT_B8G8R8A8_UNORM:
case MESA_FORMAT_B8G8R8X8_UNORM:
- case MESA_FORMAT_RGB565:
- case MESA_FORMAT_ARGB4444:
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_B5G6R5_UNORM:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
case MESA_FORMAT_A_UNORM8:
case MESA_FORMAT_L_UNORM8:
case MESA_FORMAT_I_UNORM8:
case MESA_FORMAT_B8G8R8X8_UNORM:
txformat |= R200_TXFORMAT_ARGB8888;
break;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
txformat |= R200_TXFORMAT_RGB565;
break;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
txformat |= R200_TXFORMAT_ARGB4444 | R200_TXFORMAT_ALPHA_IN_MAP;
break;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
txformat |= R200_TXFORMAT_ARGB1555 | R200_TXFORMAT_ALPHA_IN_MAP;
break;
case MESA_FORMAT_A_UNORM8:
case MESA_FORMAT_L_UNORM8:
txformat |= R200_TXFORMAT_I8;
break;
- case MESA_FORMAT_AL88:
+ case MESA_FORMAT_L8A8_UNORM:
txformat |= R200_TXFORMAT_AI88 | R200_TXFORMAT_ALPHA_IN_MAP;
break;
default:
switch (dst_mesa_format) {
case MESA_FORMAT_B8G8R8A8_UNORM:
case MESA_FORMAT_B8G8R8X8_UNORM:
- case MESA_FORMAT_RGB565:
- case MESA_FORMAT_ARGB4444:
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_B5G6R5_UNORM:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
case MESA_FORMAT_A_UNORM8:
case MESA_FORMAT_L_UNORM8:
case MESA_FORMAT_I_UNORM8:
case MESA_FORMAT_R8G8B8A8_UNORM:
dst_format = RADEON_COLOR_FORMAT_ARGB8888;
break;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
dst_format = RADEON_COLOR_FORMAT_RGB565;
break;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
dst_format = RADEON_COLOR_FORMAT_ARGB4444;
break;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
dst_format = RADEON_COLOR_FORMAT_ARGB1555;
break;
case MESA_FORMAT_A_UNORM8:
if (rrb->cpp == 4)
atom->cmd[CTX_RB3D_CNTL] |= RADEON_COLOR_FORMAT_ARGB8888;
else switch (rrb->base.Base.Format) {
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
atom->cmd[CTX_RB3D_CNTL] |= RADEON_COLOR_FORMAT_RGB565;
break;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
atom->cmd[CTX_RB3D_CNTL] |= RADEON_COLOR_FORMAT_ARGB4444;
break;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
atom->cmd[CTX_RB3D_CNTL] |= RADEON_COLOR_FORMAT_ARGB1555;
break;
default:
[ MESA_FORMAT_B8G8R8A8_UNORM ] = { R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
[ MESA_FORMAT_A8R8G8B8_UNORM ] = { R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
[ MESA_FORMAT_BGR_UNORM8 ] = { 0xffffffff, 0 },
- [ MESA_FORMAT_RGB565 ] = { R200_TXFORMAT_RGB565, 0 },
- [ MESA_FORMAT_RGB565_REV ] = { R200_TXFORMAT_RGB565, 0 },
- [ MESA_FORMAT_ARGB4444 ] = { R200_TXFORMAT_ARGB4444 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
- [ MESA_FORMAT_ARGB4444_REV ] = { R200_TXFORMAT_ARGB4444 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
- [ MESA_FORMAT_ARGB1555 ] = { R200_TXFORMAT_ARGB1555 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
- [ MESA_FORMAT_ARGB1555_REV ] = { R200_TXFORMAT_ARGB1555 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
- [ MESA_FORMAT_AL88 ] = { R200_TXFORMAT_AL88 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
- [ MESA_FORMAT_AL88_REV ] = { R200_TXFORMAT_AL88 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
+ [ MESA_FORMAT_B5G6R5_UNORM ] = { R200_TXFORMAT_RGB565, 0 },
+ [ MESA_FORMAT_R5G6B5_UNORM ] = { R200_TXFORMAT_RGB565, 0 },
+ [ MESA_FORMAT_B4G4R4A4_UNORM ] = { R200_TXFORMAT_ARGB4444 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
+ [ MESA_FORMAT_A4R4G4B4_UNORM ] = { R200_TXFORMAT_ARGB4444 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
+ [ MESA_FORMAT_B5G5R5A1_UNORM ] = { R200_TXFORMAT_ARGB1555 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
+ [ MESA_FORMAT_A1R5G5B5_UNORM ] = { R200_TXFORMAT_ARGB1555 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
+ [ MESA_FORMAT_L8A8_UNORM ] = { R200_TXFORMAT_AL88 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
+ [ MESA_FORMAT_A8L8_UNORM ] = { R200_TXFORMAT_AL88 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
[ MESA_FORMAT_A_UNORM8 ] = { R200_TXFORMAT_A8 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
[ MESA_FORMAT_L_UNORM8 ] = { R200_TXFORMAT_L8, 0 },
[ MESA_FORMAT_I_UNORM8 ] = { R200_TXFORMAT_I8 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
[ MESA_FORMAT_B8G8R8A8_UNORM ] = { R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
[ MESA_FORMAT_A8R8G8B8_UNORM ] = { R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
[ MESA_FORMAT_BGR_UNORM8 ] = { R200_TXFORMAT_ARGB8888, 0 },
- [ MESA_FORMAT_RGB565 ] = { R200_TXFORMAT_RGB565, 0 },
- [ MESA_FORMAT_RGB565_REV ] = { R200_TXFORMAT_RGB565, 0 },
- [ MESA_FORMAT_ARGB4444 ] = { R200_TXFORMAT_ARGB4444 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
- [ MESA_FORMAT_ARGB4444_REV ] = { R200_TXFORMAT_ARGB4444 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
- [ MESA_FORMAT_ARGB1555 ] = { R200_TXFORMAT_ARGB1555 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
- [ MESA_FORMAT_ARGB1555_REV ] = { R200_TXFORMAT_ARGB1555 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
- [ MESA_FORMAT_AL88 ] = { R200_TXFORMAT_AL88 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
- [ MESA_FORMAT_AL88_REV ] = { R200_TXFORMAT_AL88 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
+ [ MESA_FORMAT_B5G6R5_UNORM ] = { R200_TXFORMAT_RGB565, 0 },
+ [ MESA_FORMAT_R5G6B5_UNORM ] = { R200_TXFORMAT_RGB565, 0 },
+ [ MESA_FORMAT_B4G4R4A4_UNORM ] = { R200_TXFORMAT_ARGB4444 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
+ [ MESA_FORMAT_A4R4G4B4_UNORM ] = { R200_TXFORMAT_ARGB4444 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
+ [ MESA_FORMAT_B5G5R5A1_UNORM ] = { R200_TXFORMAT_ARGB1555 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
+ [ MESA_FORMAT_A1R5G5B5_UNORM ] = { R200_TXFORMAT_ARGB1555 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
+ [ MESA_FORMAT_L8A8_UNORM ] = { R200_TXFORMAT_AL88 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
+ [ MESA_FORMAT_A8L8_UNORM ] = { R200_TXFORMAT_AL88 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
[ MESA_FORMAT_A_UNORM8 ] = { R200_TXFORMAT_A8 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
[ MESA_FORMAT_L_UNORM8 ] = { R200_TXFORMAT_L8, 0 },
[ MESA_FORMAT_I_UNORM8 ] = { R200_TXFORMAT_I8 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
t->pp_txfilter |= tx_table_le[MESA_FORMAT_BGR_UNORM8].filter;
break;
case 2:
- texFormat = MESA_FORMAT_RGB565;
- t->pp_txformat = tx_table_le[MESA_FORMAT_RGB565].format;
- t->pp_txfilter |= tx_table_le[MESA_FORMAT_RGB565].filter;
+ texFormat = MESA_FORMAT_B5G6R5_UNORM;
+ t->pp_txformat = tx_table_le[MESA_FORMAT_B5G6R5_UNORM].format;
+ t->pp_txfilter |= tx_table_le[MESA_FORMAT_B5G6R5_UNORM].filter;
break;
}
switch (mesa_format) {
case MESA_FORMAT_B8G8R8A8_UNORM:
case MESA_FORMAT_B8G8R8X8_UNORM:
- case MESA_FORMAT_RGB565:
- case MESA_FORMAT_ARGB4444:
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_B5G6R5_UNORM:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
case MESA_FORMAT_A_UNORM8:
case MESA_FORMAT_L_UNORM8:
case MESA_FORMAT_I_UNORM8:
case MESA_FORMAT_B8G8R8X8_UNORM:
txformat |= RADEON_TXFORMAT_ARGB8888;
break;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
txformat |= RADEON_TXFORMAT_RGB565;
break;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
txformat |= RADEON_TXFORMAT_ARGB4444 | RADEON_TXFORMAT_ALPHA_IN_MAP;
break;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
txformat |= RADEON_TXFORMAT_ARGB1555 | RADEON_TXFORMAT_ALPHA_IN_MAP;
break;
case MESA_FORMAT_A_UNORM8:
case MESA_FORMAT_L_UNORM8:
txformat |= RADEON_TXFORMAT_I8;
break;
- case MESA_FORMAT_AL88:
+ case MESA_FORMAT_L8A8_UNORM:
txformat |= RADEON_TXFORMAT_AI88 | RADEON_TXFORMAT_ALPHA_IN_MAP;
break;
default:
case MESA_FORMAT_B8G8R8X8_UNORM:
dst_format = RADEON_COLOR_FORMAT_ARGB8888;
break;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
dst_format = RADEON_COLOR_FORMAT_RGB565;
break;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
dst_format = RADEON_COLOR_FORMAT_ARGB4444;
break;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
dst_format = RADEON_COLOR_FORMAT_ARGB1555;
break;
case MESA_FORMAT_A_UNORM8:
}
if ((rmesa->radeonScreen->chip_flags & RADEON_CHIPSET_DEPTH_ALWAYS_TILED) && !rrb->has_surface) {
- if (rb->Format == MESA_FORMAT_S8_Z24 || rb->Format == MESA_FORMAT_X8_Z24) {
+ if (rb->Format == MESA_FORMAT_Z24_UNORM_X8_UINT || rb->Format == MESA_FORMAT_Z24_UNORM_S8_UINT) {
radeon_map_renderbuffer_s8z24(ctx, rb, x, y, w, h,
mode, out_map, out_stride);
return;
GLboolean ok;
if ((rmesa->radeonScreen->chip_flags & RADEON_CHIPSET_DEPTH_ALWAYS_TILED) && !rrb->has_surface) {
- if (rb->Format == MESA_FORMAT_S8_Z24 || rb->Format == MESA_FORMAT_X8_Z24) {
+ if (rb->Format == MESA_FORMAT_Z24_UNORM_X8_UINT || rb->Format == MESA_FORMAT_Z24_UNORM_S8_UINT) {
radeon_unmap_renderbuffer_s8z24(ctx, rb);
return;
}
case GL_STENCIL_INDEX8_EXT:
case GL_STENCIL_INDEX16_EXT:
/* alloc a depth+stencil buffer */
- rb->Format = MESA_FORMAT_S8_Z24;
+ rb->Format = MESA_FORMAT_Z24_UNORM_X8_UINT;
cpp = 4;
break;
case GL_DEPTH_COMPONENT16:
case GL_DEPTH_COMPONENT:
case GL_DEPTH_COMPONENT24:
case GL_DEPTH_COMPONENT32:
- rb->Format = MESA_FORMAT_X8_Z24;
+ rb->Format = MESA_FORMAT_Z24_UNORM_S8_UINT;
cpp = 4;
break;
case GL_DEPTH_STENCIL_EXT:
case GL_DEPTH24_STENCIL8_EXT:
- rb->Format = MESA_FORMAT_S8_Z24;
+ rb->Format = MESA_FORMAT_Z24_UNORM_X8_UINT;
cpp = 4;
break;
default:
case GL_RGB:
switch (type) {
case GL_UNSIGNED_SHORT_5_6_5:
- return MESA_FORMAT_RGB565;
+ return MESA_FORMAT_B5G6R5_UNORM;
case GL_UNSIGNED_SHORT_5_6_5_REV:
- return MESA_FORMAT_RGB565_REV;
+ return MESA_FORMAT_R5G6B5_UNORM;
}
break;
case GL_RGBA:
case GL_FLOAT:
return MESA_FORMAT_RGBA_FLOAT32;
case GL_UNSIGNED_SHORT_5_5_5_1:
- return MESA_FORMAT_RGBA5551;
+ return MESA_FORMAT_A1B5G5R5_UNORM;
case GL_UNSIGNED_INT_8_8_8_8:
return MESA_FORMAT_A8B8G8R8_UNORM;
case GL_UNSIGNED_BYTE:
case GL_BGRA:
switch (type) {
case GL_UNSIGNED_SHORT_4_4_4_4:
- return MESA_FORMAT_ARGB4444_REV;
+ return MESA_FORMAT_A4R4G4B4_UNORM;
case GL_UNSIGNED_SHORT_4_4_4_4_REV:
- return MESA_FORMAT_ARGB4444;
+ return MESA_FORMAT_B4G4R4A4_UNORM;
case GL_UNSIGNED_SHORT_5_5_5_1:
- return MESA_FORMAT_ARGB1555_REV;
+ return MESA_FORMAT_A1R5G5B5_UNORM;
case GL_UNSIGNED_SHORT_1_5_5_5_REV:
- return MESA_FORMAT_ARGB1555;
+ return MESA_FORMAT_B5G5R5A1_UNORM;
case GL_UNSIGNED_INT_8_8_8_8:
return MESA_FORMAT_A8R8G8B8_UNORM;
case GL_UNSIGNED_BYTE:
switch (format) {
case __DRI_IMAGE_FORMAT_RGB565:
- image->format = MESA_FORMAT_RGB565;
+ image->format = MESA_FORMAT_B5G6R5_UNORM;
image->internal_format = GL_RGB;
image->data_type = GL_UNSIGNED_BYTE;
break;
switch (format) {
case __DRI_IMAGE_FORMAT_RGB565:
- image->format = MESA_FORMAT_RGB565;
+ image->format = MESA_FORMAT_B5G6R5_UNORM;
image->internal_format = GL_RGB;
image->data_type = GL_UNSIGNED_BYTE;
break;
_mesa_initialize_window_framebuffer(&rfb->base, mesaVis);
if (mesaVis->redBits == 5)
- rgbFormat = _mesa_little_endian() ? MESA_FORMAT_RGB565 : MESA_FORMAT_RGB565_REV;
+ rgbFormat = _mesa_little_endian() ? MESA_FORMAT_B5G6R5_UNORM : MESA_FORMAT_R5G6B5_UNORM;
else if (mesaVis->alphaBits == 0)
rgbFormat = _mesa_little_endian() ? MESA_FORMAT_B8G8R8X8_UNORM : MESA_FORMAT_X8R8G8B8_UNORM;
else
if (mesaVis->depthBits == 24) {
if (mesaVis->stencilBits == 8) {
struct radeon_renderbuffer *depthStencilRb =
- radeon_create_renderbuffer(MESA_FORMAT_S8_Z24, driDrawPriv);
+ radeon_create_renderbuffer(MESA_FORMAT_Z24_UNORM_X8_UINT, driDrawPriv);
_mesa_add_renderbuffer(&rfb->base, BUFFER_DEPTH, &depthStencilRb->base.Base);
_mesa_add_renderbuffer(&rfb->base, BUFFER_STENCIL, &depthStencilRb->base.Base);
depthStencilRb->has_surface = screen->depthHasSurface;
} else {
/* depth renderbuffer */
struct radeon_renderbuffer *depth =
- radeon_create_renderbuffer(MESA_FORMAT_X8_Z24, driDrawPriv);
+ radeon_create_renderbuffer(MESA_FORMAT_Z24_UNORM_S8_UINT, driDrawPriv);
_mesa_add_renderbuffer(&rfb->base, BUFFER_DEPTH, &depth->base.Base);
depth->has_surface = screen->depthHasSurface;
}
__DRIconfig **radeonInitScreen2(__DRIscreen *psp)
{
static const mesa_format formats[3] = {
- MESA_FORMAT_RGB565,
+ MESA_FORMAT_B5G6R5_UNORM,
MESA_FORMAT_B8G8R8X8_UNORM,
MESA_FORMAT_B8G8R8A8_UNORM
};
if (rrb->cpp == 4)
atom->cmd[CTX_RB3D_CNTL] |= RADEON_COLOR_FORMAT_ARGB8888;
else switch (rrb->base.Base.Format) {
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
atom->cmd[CTX_RB3D_CNTL] |= RADEON_COLOR_FORMAT_RGB565;
break;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
atom->cmd[CTX_RB3D_CNTL] |= RADEON_COLOR_FORMAT_ARGB4444;
break;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
atom->cmd[CTX_RB3D_CNTL] |= RADEON_COLOR_FORMAT_ARGB1555;
break;
default:
switch (dst_bpp) {
case 2:
- src_mesaformat = MESA_FORMAT_RGB565;
- dst_mesaformat = MESA_FORMAT_RGB565;
+ src_mesaformat = MESA_FORMAT_B5G6R5_UNORM;
+ dst_mesaformat = MESA_FORMAT_B5G6R5_UNORM;
break;
case 4:
src_mesaformat = MESA_FORMAT_B8G8R8A8_UNORM;
[ MESA_FORMAT_B8G8R8A8_UNORM ] = { RADEON_TXFORMAT_ARGB8888 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
[ MESA_FORMAT_A8R8G8B8_UNORM ] = { RADEON_TXFORMAT_ARGB8888 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
[ MESA_FORMAT_BGR_UNORM8 ] = { RADEON_TXFORMAT_ARGB8888, 0 },
- [ MESA_FORMAT_RGB565 ] = { RADEON_TXFORMAT_RGB565, 0 },
- [ MESA_FORMAT_RGB565_REV ] = { RADEON_TXFORMAT_RGB565, 0 },
- [ MESA_FORMAT_ARGB4444 ] = { RADEON_TXFORMAT_ARGB4444 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
- [ MESA_FORMAT_ARGB4444_REV ] = { RADEON_TXFORMAT_ARGB4444 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
- [ MESA_FORMAT_ARGB1555 ] = { RADEON_TXFORMAT_ARGB1555 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
- [ MESA_FORMAT_ARGB1555_REV ] = { RADEON_TXFORMAT_ARGB1555 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
- [ MESA_FORMAT_AL88 ] = { RADEON_TXFORMAT_AL88 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
- [ MESA_FORMAT_AL88_REV ] = { RADEON_TXFORMAT_AL88 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
+ [ MESA_FORMAT_B5G6R5_UNORM ] = { RADEON_TXFORMAT_RGB565, 0 },
+ [ MESA_FORMAT_R5G6B5_UNORM ] = { RADEON_TXFORMAT_RGB565, 0 },
+ [ MESA_FORMAT_B4G4R4A4_UNORM ] = { RADEON_TXFORMAT_ARGB4444 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
+ [ MESA_FORMAT_A4R4G4B4_UNORM ] = { RADEON_TXFORMAT_ARGB4444 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
+ [ MESA_FORMAT_B5G5R5A1_UNORM ] = { RADEON_TXFORMAT_ARGB1555 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
+ [ MESA_FORMAT_A1R5G5B5_UNORM ] = { RADEON_TXFORMAT_ARGB1555 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
+ [ MESA_FORMAT_L8A8_UNORM ] = { RADEON_TXFORMAT_AL88 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
+ [ MESA_FORMAT_A8L8_UNORM ] = { RADEON_TXFORMAT_AL88 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
[ MESA_FORMAT_A_UNORM8 ] = { RADEON_TXFORMAT_A8 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
[ MESA_FORMAT_L_UNORM8 ] = { RADEON_TXFORMAT_L8, 0 },
[ MESA_FORMAT_I_UNORM8 ] = { RADEON_TXFORMAT_I8 | RADEON_TXFORMAT_ALPHA_IN_MAP, 0 },
t->pp_txfilter |= tx_table[MESA_FORMAT_BGR_UNORM8].filter;
break;
case 2:
- texFormat = MESA_FORMAT_RGB565;
- t->pp_txformat = tx_table[MESA_FORMAT_RGB565].format;
- t->pp_txfilter |= tx_table[MESA_FORMAT_RGB565].filter;
+ texFormat = MESA_FORMAT_B5G6R5_UNORM;
+ t->pp_txformat = tx_table[MESA_FORMAT_B5G6R5_UNORM].format;
+ t->pp_txfilter |= tx_table[MESA_FORMAT_B5G6R5_UNORM].filter;
break;
}
case GL_DEPTH_COMPONENT32:
case GL_DEPTH_STENCIL_EXT:
case GL_DEPTH24_STENCIL8_EXT:
- return MESA_FORMAT_S8_Z24;
+ return MESA_FORMAT_Z24_UNORM_X8_UINT;
/* EXT_texture_sRGB */
case GL_SRGB:
case GL_SRGB8_ALPHA8:
case GL_COMPRESSED_SRGB:
case GL_COMPRESSED_SRGB_ALPHA:
- return MESA_FORMAT_SARGB8;
+ return MESA_FORMAT_B8G8R8A8_SRGB;
case GL_SLUMINANCE:
case GL_SLUMINANCE8:
case GL_SLUMINANCE_ALPHA:
case GL_SLUMINANCE8_ALPHA8:
case GL_COMPRESSED_SLUMINANCE_ALPHA:
- return MESA_FORMAT_SLA8;
+ return MESA_FORMAT_L8A8_SRGB;
case GL_COMPRESSED_SRGB_S3TC_DXT1_EXT:
return MESA_FORMAT_SRGB_DXT1;
switch (mesa_format)
{
case MESA_FORMAT_Z_UNORM16:
- case MESA_FORMAT_S8_Z24:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
return 1;
default:
return 0;
if (_mesa_little_endian()) {
_radeon_texformat_rgba8888 = MESA_FORMAT_A8B8G8R8_UNORM;
_radeon_texformat_argb8888 = MESA_FORMAT_B8G8R8A8_UNORM;
- _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_rgb565 = MESA_FORMAT_B5G6R5_UNORM;
+ _radeon_texformat_argb4444 = MESA_FORMAT_B4G4R4A4_UNORM;
+ _radeon_texformat_argb1555 = MESA_FORMAT_B5G5R5A1_UNORM;
+ _radeon_texformat_al88 = MESA_FORMAT_L8A8_UNORM;
}
else {
_radeon_texformat_rgba8888 = MESA_FORMAT_R8G8B8A8_UNORM;
_radeon_texformat_argb8888 = MESA_FORMAT_A8R8G8B8_UNORM;
- _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_rgb565 = MESA_FORMAT_R5G6B5_UNORM;
+ _radeon_texformat_argb4444 = MESA_FORMAT_A4R4G4B4_UNORM;
+ _radeon_texformat_argb1555 = MESA_FORMAT_A1R5G5B5_UNORM;
+ _radeon_texformat_al88 = MESA_FORMAT_A8L8_UNORM;
}
}
switch (pixel_bits) {
case 16:
- format = MESA_FORMAT_RGB565;
+ format = MESA_FORMAT_B5G6R5_UNORM;
break;
case 24:
format = MESA_FORMAT_B8G8R8X8_UNORM;
xrb->bpp = 32;
break;
case PF_R5G6B5:
- rb->Format = MESA_FORMAT_RGB565;
+ rb->Format = MESA_FORMAT_B5G6R5_UNORM;
rb->InternalFormat = GL_RGB;
rb->_BaseFormat = GL_RGB;
xrb->bpp = 16;
break;
case PF_R3G3B2:
- rb->Format = MESA_FORMAT_RGB332;
+ rb->Format = MESA_FORMAT_B2G3R3_UNORM;
rb->InternalFormat = GL_RGB;
rb->_BaseFormat = GL_RGB;
xrb->bpp = 8;
break;
case B_RGB16:
rb->_BaseFormat = GL_RGB;
- rb->Format = MESA_FORMAT_RGB565;
+ rb->Format = MESA_FORMAT_B5G6R5_UNORM;
break;
case B_RGB15:
rb->_BaseFormat = GL_RGB;
- rb->Format = MESA_FORMAT_ARGB1555;
+ rb->Format = MESA_FORMAT_B5G5R5A1_UNORM;
break;
default:
fprintf(stderr, "Unsupported screen color space %s\n",
}
else if (osmesa->format == OSMESA_RGB_565) {
ASSERT(osmesa->DataType == GL_UNSIGNED_BYTE);
- rb->Format = MESA_FORMAT_RGB565;
+ rb->Format = MESA_FORMAT_B5G6R5_UNORM;
}
else {
_mesa_problem(ctx, "bad pixel format in osmesa renderbuffer_storage");
xrb->Base.Base.Format = MESA_FORMAT_R8G8B8A8_UNORM;
break;
case PF_5R6G5B:
- xrb->Base.Base.Format = MESA_FORMAT_RGB565;
+ xrb->Base.Base.Format = MESA_FORMAT_B5G6R5_UNORM;
break;
default:
_mesa_warning(ctx, "Bad pixel format in xmesa_new_renderbuffer");
case MESA_FORMAT_I_UNORM8:
c = 1;
break;
- case MESA_FORMAT_AL88:
- case MESA_FORMAT_AL88_REV:
+ case MESA_FORMAT_L8A8_UNORM:
+ case MESA_FORMAT_A8L8_UNORM:
c = 2;
break;
case MESA_FORMAT_BGR_UNORM8:
default:
switch (rb->Format) {
/* XXX This list is likely incomplete. */
- case MESA_FORMAT_RGB9_E5_FLOAT:
+ case MESA_FORMAT_R9G9B9E5_FLOAT:
fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED;
return;
default:;
break;
}
- if (format == MESA_FORMAT_ARGB2101010 && internalFormat != GL_RGB10_A2) {
+ if (format == MESA_FORMAT_B10G10R10A2_UNORM && internalFormat != GL_RGB10_A2) {
return GL_FALSE;
}
/* special cases */
*params = GL_INDEX;
}
- else if (format == MESA_FORMAT_Z32_FLOAT_X24S8) {
+ else if (format == MESA_FORMAT_Z32_FLOAT_S8X24_UINT) {
/* depends on the attachment parameter */
if (attachment == GL_STENCIL_ATTACHMENT) {
*params = GL_INDEX;
#include "../../gallium/auxiliary/util/u_format_r11g11b10f.h"
-/** Helper struct for MESA_FORMAT_Z32_FLOAT_X24S8 */
+/** Helper struct for MESA_FORMAT_Z32_FLOAT_S8X24_UINT */
struct z32f_x24s8
{
float z;
/*
- * MESA_FORMAT_RGB565
+ * MESA_FORMAT_B5G6R5_UNORM
*/
static void
/*
- * MESA_FORMAT_RGB565_REV
+ * MESA_FORMAT_R5G6B5_UNORM
*/
static void
/*
- * MESA_FORMAT_ARGB4444
+ * MESA_FORMAT_B4G4R4A4_UNORM
*/
static void
/*
- * MESA_FORMAT_ARGB4444_REV
+ * MESA_FORMAT_A4R4G4B4_UNORM
*/
static void
/*
- * MESA_FORMAT_RGBA5551
+ * MESA_FORMAT_A1B5G5R5_UNORM
*/
static void
/*
- * MESA_FORMAT_ARGB1555
+ * MESA_FORMAT_B5G5R5A1_UNORM
*/
static void
}
-/* MESA_FORMAT_ARGB1555_REV */
+/* MESA_FORMAT_A1R5G5B5_UNORM */
static void
pack_ubyte_ARGB1555_REV(const GLubyte src[4], void *dst)
}
-/* MESA_FORMAT_AL44 */
+/* MESA_FORMAT_L4A4_UNORM */
static void
pack_ubyte_AL44(const GLubyte src[4], void *dst)
}
-/* MESA_FORMAT_AL88 */
+/* MESA_FORMAT_L8A8_UNORM */
static void
pack_ubyte_AL88(const GLubyte src[4], void *dst)
}
-/* MESA_FORMAT_AL88_REV */
+/* MESA_FORMAT_A8L8_UNORM */
static void
pack_ubyte_AL88_REV(const GLubyte src[4], void *dst)
}
-/* MESA_FORMAT_AL1616 */
+/* MESA_FORMAT_L16A16_UNORM */
static void
pack_ubyte_AL1616(const GLubyte src[4], void *dst)
}
-/* MESA_FORMAT_AL1616_REV */
+/* MESA_FORMAT_A16L16_UNORM */
static void
pack_ubyte_AL1616_REV(const GLubyte src[4], void *dst)
}
-/* MESA_FORMAT_RGB332 */
+/* MESA_FORMAT_B2G3R3_UNORM */
static void
pack_ubyte_RGB332(const GLubyte src[4], void *dst)
}
-/* MESA_FORMAT_GR88 */
+/* MESA_FORMAT_R8G8_UNORM */
static void
pack_ubyte_GR88(const GLubyte src[4], void *dst)
}
-/* MESA_FORMAT_RG88 */
+/* MESA_FORMAT_G8R8_UNORM */
static void
pack_ubyte_RG88(const GLubyte src[4], void *dst)
}
-/* MESA_FORMAT_GR1616 */
+/* MESA_FORMAT_R16G16_UNORM */
static void
pack_ubyte_GR1616(const GLubyte src[4], void *dst)
}
-/* MESA_FORMAT_RG1616 */
+/* MESA_FORMAT_G16R16_UNORM */
static void
pack_ubyte_RG1616(const GLubyte src[4], void *dst)
}
-/* MESA_FORMAT_ARGB2101010 */
+/* MESA_FORMAT_B10G10R10A2_UNORM */
static void
pack_ubyte_ARGB2101010(const GLubyte src[4], void *dst)
}
-/* MESA_FORMAT_ABGR2101010_UINT */
+/* MESA_FORMAT_R10G10B10A2_UINT */
static void
pack_ubyte_ABGR2101010_UINT(const GLubyte src[4], void *dst)
}
-/* MESA_FORMAT_SRGBA8 */
+/* MESA_FORMAT_A8B8G8R8_SRGB */
static void
pack_ubyte_SRGBA8(const GLubyte src[4], void *dst)
}
-/* MESA_FORMAT_SARGB8 */
+/* MESA_FORMAT_B8G8R8A8_SRGB */
static void
pack_ubyte_SARGB8(const GLubyte src[4], void *dst)
}
-/* MESA_FORMAT_SLA8 */
+/* MESA_FORMAT_L8A8_SRGB */
static void
pack_ubyte_SLA8(const GLubyte src[4], void *dst)
/*
- * MESA_FORMAT_RGB9_E5_FLOAT;
+ * MESA_FORMAT_R9G9B9E5_FLOAT;
*/
static void
/*
- * MESA_FORMAT_R11_G11_B10_FLOAT;
+ * MESA_FORMAT_R11G11B10_FLOAT;
*/
static void
/*
- * MESA_FORMAT_XRGB4444_UNORM
+ * MESA_FORMAT_B4G4R4X4_UNORM
*/
static void
/*
- * MESA_FORMAT_XRGB1555_UNORM
+ * MESA_FORMAT_B5G5R5X1_UNORM
*/
static void
/*
- * MESA_FORMAT_XBGR8888_SNORM
+ * MESA_FORMAT_R8G8B8X8_SNORM
*/
static void
/*
- * MESA_FORMAT_XBGR8888_SRGB
+ * MESA_FORMAT_R8G8B8X8_SRGB
*/
static void
}
-/* MESA_FORMAT_XRGB2101010_UNORM */
+/* MESA_FORMAT_B10G10R10X2_UNORM */
static void
pack_ubyte_XRGB2101010_UNORM(const GLubyte src[4], void *dst)
d[3] = 1.0;
}
-/* MESA_FORMAT_ABGR2101010 */
+/* MESA_FORMAT_R10G10B10A2_UNORM */
static void
pack_ubyte_ABGR2101010(const GLubyte src[4], void *dst)
table[MESA_FORMAT_X8R8G8B8_UNORM] = pack_ubyte_XRGB8888_REV;
table[MESA_FORMAT_BGR_UNORM8] = pack_ubyte_RGB888;
table[MESA_FORMAT_RGB_UNORM8] = pack_ubyte_BGR888;
- table[MESA_FORMAT_RGB565] = pack_ubyte_RGB565;
- table[MESA_FORMAT_RGB565_REV] = pack_ubyte_RGB565_REV;
- table[MESA_FORMAT_ARGB4444] = pack_ubyte_ARGB4444;
- table[MESA_FORMAT_ARGB4444_REV] = pack_ubyte_ARGB4444_REV;
- table[MESA_FORMAT_RGBA5551] = pack_ubyte_RGBA5551;
- table[MESA_FORMAT_ARGB1555] = pack_ubyte_ARGB1555;
- table[MESA_FORMAT_ARGB1555_REV] = pack_ubyte_ARGB1555_REV;
- table[MESA_FORMAT_AL44] = pack_ubyte_AL44;
- table[MESA_FORMAT_AL88] = pack_ubyte_AL88;
- table[MESA_FORMAT_AL88_REV] = pack_ubyte_AL88_REV;
- table[MESA_FORMAT_AL1616] = pack_ubyte_AL1616;
- table[MESA_FORMAT_AL1616_REV] = pack_ubyte_AL1616_REV;
- table[MESA_FORMAT_RGB332] = pack_ubyte_RGB332;
+ table[MESA_FORMAT_B5G6R5_UNORM] = pack_ubyte_RGB565;
+ table[MESA_FORMAT_R5G6B5_UNORM] = pack_ubyte_RGB565_REV;
+ table[MESA_FORMAT_B4G4R4A4_UNORM] = pack_ubyte_ARGB4444;
+ table[MESA_FORMAT_A4R4G4B4_UNORM] = pack_ubyte_ARGB4444_REV;
+ table[MESA_FORMAT_A1B5G5R5_UNORM] = pack_ubyte_RGBA5551;
+ table[MESA_FORMAT_B5G5R5A1_UNORM] = pack_ubyte_ARGB1555;
+ table[MESA_FORMAT_A1R5G5B5_UNORM] = pack_ubyte_ARGB1555_REV;
+ table[MESA_FORMAT_L4A4_UNORM] = pack_ubyte_AL44;
+ table[MESA_FORMAT_L8A8_UNORM] = pack_ubyte_AL88;
+ table[MESA_FORMAT_A8L8_UNORM] = pack_ubyte_AL88_REV;
+ table[MESA_FORMAT_L16A16_UNORM] = pack_ubyte_AL1616;
+ table[MESA_FORMAT_A16L16_UNORM] = pack_ubyte_AL1616_REV;
+ table[MESA_FORMAT_B2G3R3_UNORM] = pack_ubyte_RGB332;
table[MESA_FORMAT_A_UNORM8] = pack_ubyte_A8;
table[MESA_FORMAT_A_UNORM16] = pack_ubyte_A16;
table[MESA_FORMAT_L_UNORM8] = pack_ubyte_L8;
table[MESA_FORMAT_YCBCR] = pack_ubyte_YCBCR;
table[MESA_FORMAT_YCBCR_REV] = pack_ubyte_YCBCR_REV;
table[MESA_FORMAT_R_UNORM8] = pack_ubyte_R8;
- table[MESA_FORMAT_GR88] = pack_ubyte_GR88;
- table[MESA_FORMAT_RG88] = pack_ubyte_RG88;
+ table[MESA_FORMAT_R8G8_UNORM] = pack_ubyte_GR88;
+ table[MESA_FORMAT_G8R8_UNORM] = pack_ubyte_RG88;
table[MESA_FORMAT_R_UNORM16] = pack_ubyte_R16;
- table[MESA_FORMAT_GR1616] = pack_ubyte_GR1616;
- table[MESA_FORMAT_RG1616] = pack_ubyte_RG1616;
- table[MESA_FORMAT_ARGB2101010] = pack_ubyte_ARGB2101010;
- table[MESA_FORMAT_ABGR2101010_UINT] = pack_ubyte_ABGR2101010_UINT;
+ table[MESA_FORMAT_R16G16_UNORM] = pack_ubyte_GR1616;
+ table[MESA_FORMAT_G16R16_UNORM] = pack_ubyte_RG1616;
+ table[MESA_FORMAT_B10G10R10A2_UNORM] = pack_ubyte_ARGB2101010;
+ table[MESA_FORMAT_R10G10B10A2_UINT] = pack_ubyte_ABGR2101010_UINT;
/* should never convert RGBA to these formats */
- table[MESA_FORMAT_Z24_S8] = NULL;
- table[MESA_FORMAT_S8_Z24] = NULL;
+ table[MESA_FORMAT_S8_UINT_Z24_UNORM] = NULL;
+ table[MESA_FORMAT_Z24_UNORM_X8_UINT] = NULL;
table[MESA_FORMAT_Z_UNORM16] = NULL;
- table[MESA_FORMAT_X8_Z24] = NULL;
- table[MESA_FORMAT_Z24_X8] = NULL;
+ table[MESA_FORMAT_Z24_UNORM_S8_UINT] = NULL;
+ table[MESA_FORMAT_X8Z24_UNORM] = NULL;
table[MESA_FORMAT_Z_UNORM32] = NULL;
table[MESA_FORMAT_S_UINT8] = NULL;
/* sRGB */
table[MESA_FORMAT_BGR_SRGB8] = pack_ubyte_SRGB8;
- table[MESA_FORMAT_SRGBA8] = pack_ubyte_SRGBA8;
- table[MESA_FORMAT_SARGB8] = pack_ubyte_SARGB8;
+ table[MESA_FORMAT_A8B8G8R8_SRGB] = pack_ubyte_SRGBA8;
+ table[MESA_FORMAT_B8G8R8A8_SRGB] = pack_ubyte_SARGB8;
table[MESA_FORMAT_L_SRGB8] = pack_ubyte_SL8;
- table[MESA_FORMAT_SLA8] = pack_ubyte_SLA8;
-
+ table[MESA_FORMAT_L8A8_SRGB] = pack_ubyte_SLA8;
/* n/a */
table[MESA_FORMAT_SRGB_DXT1] = NULL; /* pack_ubyte_SRGB_DXT1; */
table[MESA_FORMAT_SRGBA_DXT1] = NULL; /* pack_ubyte_SRGBA_DXT1; */
table[MESA_FORMAT_RGBA_UNORM16] = pack_ubyte_RGBA_16;
- table[MESA_FORMAT_RGB9_E5_FLOAT] = pack_ubyte_RGB9_E5_FLOAT;
- table[MESA_FORMAT_R11_G11_B10_FLOAT] = pack_ubyte_R11_G11_B10_FLOAT;
+ table[MESA_FORMAT_R9G9B9E5_FLOAT] = pack_ubyte_RGB9_E5_FLOAT;
+ table[MESA_FORMAT_R11G11B10_FLOAT] = pack_ubyte_R11_G11_B10_FLOAT;
- table[MESA_FORMAT_XRGB4444_UNORM] = pack_ubyte_XRGB4444_UNORM;
- table[MESA_FORMAT_XRGB1555_UNORM] = pack_ubyte_XRGB1555_UNORM;
- table[MESA_FORMAT_XBGR8888_SNORM] = NULL;
- table[MESA_FORMAT_XBGR8888_SRGB] = NULL;
+ table[MESA_FORMAT_B4G4R4X4_UNORM] = pack_ubyte_XRGB4444_UNORM;
+ table[MESA_FORMAT_B5G5R5X1_UNORM] = pack_ubyte_XRGB1555_UNORM;
+ table[MESA_FORMAT_R8G8B8X8_SNORM] = NULL;
+ table[MESA_FORMAT_R8G8B8X8_SRGB] = NULL;
table[MESA_FORMAT_RGBX_UINT8] = NULL;
table[MESA_FORMAT_RGBX_SINT8] = NULL;
- table[MESA_FORMAT_XRGB2101010_UNORM] = pack_ubyte_XRGB2101010_UNORM;
+ table[MESA_FORMAT_B10G10R10X2_UNORM] = pack_ubyte_XRGB2101010_UNORM;
table[MESA_FORMAT_RGBX_UNORM16] = pack_ubyte_XBGR16161616_UNORM;
table[MESA_FORMAT_RGBX_SNORM16] = NULL;
table[MESA_FORMAT_RGBX_FLOAT16] = NULL;
table[MESA_FORMAT_RGBX_UINT32] = NULL;
table[MESA_FORMAT_RGBX_SINT32] = NULL;
- table[MESA_FORMAT_ABGR2101010] = pack_ubyte_ABGR2101010;
+ table[MESA_FORMAT_R10G10B10A2_UNORM] = pack_ubyte_ABGR2101010;
initialized = GL_TRUE;
}
table[MESA_FORMAT_X8R8G8B8_UNORM] = pack_float_XRGB8888_REV;
table[MESA_FORMAT_BGR_UNORM8] = pack_float_RGB888;
table[MESA_FORMAT_RGB_UNORM8] = pack_float_BGR888;
- table[MESA_FORMAT_RGB565] = pack_float_RGB565;
- table[MESA_FORMAT_RGB565_REV] = pack_float_RGB565_REV;
- table[MESA_FORMAT_ARGB4444] = pack_float_ARGB4444;
- table[MESA_FORMAT_ARGB4444_REV] = pack_float_ARGB4444_REV;
- table[MESA_FORMAT_RGBA5551] = pack_float_RGBA5551;
- table[MESA_FORMAT_ARGB1555] = pack_float_ARGB1555;
- table[MESA_FORMAT_ARGB1555_REV] = pack_float_ARGB1555_REV;
-
- table[MESA_FORMAT_AL44] = pack_float_AL44;
- table[MESA_FORMAT_AL88] = pack_float_AL88;
- table[MESA_FORMAT_AL88_REV] = pack_float_AL88_REV;
- table[MESA_FORMAT_AL1616] = pack_float_AL1616;
- table[MESA_FORMAT_AL1616_REV] = pack_float_AL1616_REV;
- table[MESA_FORMAT_RGB332] = pack_float_RGB332;
+ table[MESA_FORMAT_B5G6R5_UNORM] = pack_float_RGB565;
+ table[MESA_FORMAT_R5G6B5_UNORM] = pack_float_RGB565_REV;
+ table[MESA_FORMAT_B4G4R4A4_UNORM] = pack_float_ARGB4444;
+ table[MESA_FORMAT_A4R4G4B4_UNORM] = pack_float_ARGB4444_REV;
+ table[MESA_FORMAT_A1B5G5R5_UNORM] = pack_float_RGBA5551;
+ table[MESA_FORMAT_B5G5R5A1_UNORM] = pack_float_ARGB1555;
+ table[MESA_FORMAT_A1R5G5B5_UNORM] = pack_float_ARGB1555_REV;
+
+ table[MESA_FORMAT_L4A4_UNORM] = pack_float_AL44;
+ table[MESA_FORMAT_L8A8_UNORM] = pack_float_AL88;
+ table[MESA_FORMAT_A8L8_UNORM] = pack_float_AL88_REV;
+ table[MESA_FORMAT_L16A16_UNORM] = pack_float_AL1616;
+ table[MESA_FORMAT_A16L16_UNORM] = pack_float_AL1616_REV;
+ table[MESA_FORMAT_B2G3R3_UNORM] = pack_float_RGB332;
table[MESA_FORMAT_A_UNORM8] = pack_float_A8;
table[MESA_FORMAT_A_UNORM16] = pack_float_A16;
table[MESA_FORMAT_L_UNORM8] = pack_float_L8;
table[MESA_FORMAT_YCBCR] = pack_float_YCBCR;
table[MESA_FORMAT_YCBCR_REV] = pack_float_YCBCR_REV;
table[MESA_FORMAT_R_UNORM8] = pack_float_R8;
- table[MESA_FORMAT_GR88] = pack_float_GR88;
- table[MESA_FORMAT_RG88] = pack_float_RG88;
+ table[MESA_FORMAT_R8G8_UNORM] = pack_float_GR88;
+ table[MESA_FORMAT_G8R8_UNORM] = pack_float_RG88;
table[MESA_FORMAT_R_UNORM16] = pack_float_R16;
- table[MESA_FORMAT_GR1616] = pack_float_GR1616;
- table[MESA_FORMAT_RG1616] = pack_float_RG1616;
- table[MESA_FORMAT_ARGB2101010] = pack_float_ARGB2101010;
- table[MESA_FORMAT_ABGR2101010_UINT] = pack_float_ABGR2101010_UINT;
+ table[MESA_FORMAT_R16G16_UNORM] = pack_float_GR1616;
+ table[MESA_FORMAT_G16R16_UNORM] = pack_float_RG1616;
+ table[MESA_FORMAT_B10G10R10A2_UNORM] = pack_float_ARGB2101010;
+ table[MESA_FORMAT_R10G10B10A2_UINT] = pack_float_ABGR2101010_UINT;
/* should never convert RGBA to these formats */
- table[MESA_FORMAT_Z24_S8] = NULL;
- table[MESA_FORMAT_S8_Z24] = NULL;
+ table[MESA_FORMAT_S8_UINT_Z24_UNORM] = NULL;
+ table[MESA_FORMAT_Z24_UNORM_X8_UINT] = NULL;
table[MESA_FORMAT_Z_UNORM16] = NULL;
- table[MESA_FORMAT_X8_Z24] = NULL;
- table[MESA_FORMAT_Z24_X8] = NULL;
+ table[MESA_FORMAT_Z24_UNORM_S8_UINT] = NULL;
+ table[MESA_FORMAT_X8Z24_UNORM] = NULL;
table[MESA_FORMAT_Z_UNORM32] = NULL;
table[MESA_FORMAT_S_UINT8] = NULL;
table[MESA_FORMAT_BGR_SRGB8] = pack_float_SRGB8;
- table[MESA_FORMAT_SRGBA8] = pack_float_SRGBA8;
- table[MESA_FORMAT_SARGB8] = pack_float_SARGB8;
+ table[MESA_FORMAT_A8B8G8R8_SRGB] = pack_float_SRGBA8;
+ table[MESA_FORMAT_B8G8R8A8_SRGB] = pack_float_SARGB8;
table[MESA_FORMAT_L_SRGB8] = pack_float_SL8;
- table[MESA_FORMAT_SLA8] = pack_float_SLA8;
+ table[MESA_FORMAT_L8A8_SRGB] = pack_float_SLA8;
/* n/a */
table[MESA_FORMAT_SRGB_DXT1] = NULL;
table[MESA_FORMAT_SIGNED_AL1616] = pack_float_SIGNED_AL1616;
table[MESA_FORMAT_SIGNED_I16] = pack_float_SIGNED_L16; /* reused */
- table[MESA_FORMAT_RGB9_E5_FLOAT] = pack_float_RGB9_E5_FLOAT;
- table[MESA_FORMAT_R11_G11_B10_FLOAT] = pack_float_R11_G11_B10_FLOAT;
+ table[MESA_FORMAT_R9G9B9E5_FLOAT] = pack_float_RGB9_E5_FLOAT;
+ table[MESA_FORMAT_R11G11B10_FLOAT] = pack_float_R11_G11_B10_FLOAT;
- table[MESA_FORMAT_XRGB4444_UNORM] = pack_float_XRGB4444_UNORM;
- table[MESA_FORMAT_XRGB1555_UNORM] = pack_float_XRGB1555_UNORM;
- table[MESA_FORMAT_XBGR8888_SNORM] = pack_float_XBGR8888_SNORM;
- table[MESA_FORMAT_XBGR8888_SRGB] = pack_float_XBGR8888_SRGB;
+ table[MESA_FORMAT_B4G4R4X4_UNORM] = pack_float_XRGB4444_UNORM;
+ table[MESA_FORMAT_B5G5R5X1_UNORM] = pack_float_XRGB1555_UNORM;
+ table[MESA_FORMAT_R8G8B8X8_SNORM] = pack_float_XBGR8888_SNORM;
+ table[MESA_FORMAT_R8G8B8X8_SRGB] = pack_float_XBGR8888_SRGB;
table[MESA_FORMAT_RGBX_UINT8] = NULL;
table[MESA_FORMAT_RGBX_SINT8] = NULL;
- table[MESA_FORMAT_XRGB2101010_UNORM] = pack_float_XRGB2101010_UNORM;
+ table[MESA_FORMAT_B10G10R10X2_UNORM] = pack_float_XRGB2101010_UNORM;
table[MESA_FORMAT_RGBX_UNORM16] = pack_float_XBGR16161616_UNORM;
table[MESA_FORMAT_RGBX_SNORM16] = pack_float_XBGR16161616_SNORM;
table[MESA_FORMAT_RGBX_FLOAT16] = pack_float_XBGR16161616_FLOAT;
table[MESA_FORMAT_RGBX_UINT32] = NULL;
table[MESA_FORMAT_RGBX_SINT32] = NULL;
- table[MESA_FORMAT_ABGR2101010] = pack_float_ABGR2101010;
+ table[MESA_FORMAT_R10G10B10A2_UNORM] = pack_float_ABGR2101010;
table[MESA_FORMAT_SIGNED_RG88] = pack_float_SIGNED_RG88;
table[MESA_FORMAT_SIGNED_RG1616] = pack_float_SIGNED_RG1616;
table[MESA_FORMAT_X8R8G8B8_UNORM] = pack_row_float_XRGB8888_REV;
table[MESA_FORMAT_BGR_UNORM8] = pack_row_float_RGB888;
table[MESA_FORMAT_RGB_UNORM8] = pack_row_float_BGR888;
- table[MESA_FORMAT_RGB565] = pack_row_float_RGB565;
- table[MESA_FORMAT_RGB565_REV] = pack_row_float_RGB565_REV;
+ table[MESA_FORMAT_B5G6R5_UNORM] = pack_row_float_RGB565;
+ table[MESA_FORMAT_R5G6B5_UNORM] = pack_row_float_RGB565_REV;
initialized = GL_TRUE;
}
table[MESA_FORMAT_X8R8G8B8_UNORM] = pack_row_ubyte_XRGB8888_REV;
table[MESA_FORMAT_BGR_UNORM8] = pack_row_ubyte_RGB888;
table[MESA_FORMAT_RGB_UNORM8] = pack_row_ubyte_BGR888;
- table[MESA_FORMAT_RGB565] = pack_row_ubyte_RGB565;
- table[MESA_FORMAT_RGB565_REV] = pack_row_ubyte_RGB565_REV;
+ table[MESA_FORMAT_B5G6R5_UNORM] = pack_row_ubyte_RGB565;
+ table[MESA_FORMAT_R5G6B5_UNORM] = pack_row_ubyte_RGB565_REV;
initialized = GL_TRUE;
}
_mesa_get_pack_float_z_func(mesa_format format)
{
switch (format) {
- case MESA_FORMAT_Z24_S8:
- case MESA_FORMAT_Z24_X8:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
+ case MESA_FORMAT_X8Z24_UNORM:
return pack_float_z_Z24_S8;
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_X8_Z24:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
return pack_float_z_S8_Z24;
case MESA_FORMAT_Z_UNORM16:
return pack_float_z_Z16;
case MESA_FORMAT_Z_UNORM32:
return pack_float_z_Z32;
case MESA_FORMAT_Z_FLOAT32:
- case MESA_FORMAT_Z32_FLOAT_X24S8:
+ case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
return pack_float_z_Z32_FLOAT;
default:
_mesa_problem(NULL,
_mesa_get_pack_uint_z_func(mesa_format format)
{
switch (format) {
- case MESA_FORMAT_Z24_S8:
- case MESA_FORMAT_Z24_X8:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
+ case MESA_FORMAT_X8Z24_UNORM:
return pack_uint_z_Z24_S8;
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_X8_Z24:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
return pack_uint_z_S8_Z24;
case MESA_FORMAT_Z_UNORM16:
return pack_uint_z_Z16;
return pack_uint_z_Z32;
case MESA_FORMAT_Z_FLOAT32:
return pack_uint_z_Z32_FLOAT;
- case MESA_FORMAT_Z32_FLOAT_X24S8:
+ case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
return pack_uint_z_Z32_FLOAT_X24S8;
default:
_mesa_problem(NULL, "unexpected format in _mesa_get_pack_uint_z_func()");
_mesa_get_pack_ubyte_stencil_func(mesa_format format)
{
switch (format) {
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
return pack_ubyte_stencil_Z24_S8;
- case MESA_FORMAT_S8_Z24:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
return pack_ubyte_stencil_S8_Z24;
case MESA_FORMAT_S_UINT8:
return pack_ubyte_stencil_S8;
- case MESA_FORMAT_Z32_FLOAT_X24S8:
+ case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
return pack_ubyte_stencil_Z32_FLOAT_X24S8;
default:
_mesa_problem(NULL,
const GLfloat *src, void *dst)
{
switch (format) {
- case MESA_FORMAT_Z24_S8:
- case MESA_FORMAT_Z24_X8:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
+ case MESA_FORMAT_X8Z24_UNORM:
{
/* don't disturb the stencil values */
GLuint *d = ((GLuint *) dst);
}
}
break;
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_X8_Z24:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
{
/* don't disturb the stencil values */
GLuint *d = ((GLuint *) dst);
case MESA_FORMAT_Z_FLOAT32:
memcpy(dst, src, n * sizeof(GLfloat));
break;
- case MESA_FORMAT_Z32_FLOAT_X24S8:
+ case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
{
struct z32f_x24s8 *d = (struct z32f_x24s8 *) dst;
GLuint i;
const GLuint *src, void *dst)
{
switch (format) {
- case MESA_FORMAT_Z24_S8:
- case MESA_FORMAT_Z24_X8:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
+ case MESA_FORMAT_X8Z24_UNORM:
{
/* don't disturb the stencil values */
GLuint *d = ((GLuint *) dst);
}
}
break;
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_X8_Z24:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
{
/* don't disturb the stencil values */
GLuint *d = ((GLuint *) dst);
}
}
break;
- case MESA_FORMAT_Z32_FLOAT_X24S8:
+ case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
{
struct z32f_x24s8 *d = (struct z32f_x24s8 *) dst;
const GLdouble scale = 1.0 / (GLdouble) 0xffffffff;
const GLubyte *src, void *dst)
{
switch (format) {
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
{
/* don't disturb the Z values */
GLuint *d = ((GLuint *) dst);
}
}
break;
- case MESA_FORMAT_S8_Z24:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
{
/* don't disturb the Z values */
GLuint *d = ((GLuint *) dst);
case MESA_FORMAT_S_UINT8:
memcpy(dst, src, n * sizeof(GLubyte));
break;
- case MESA_FORMAT_Z32_FLOAT_X24S8:
+ case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
{
struct z32f_x24s8 *d = (struct z32f_x24s8 *) dst;
GLuint i;
const GLuint *src, void *dst)
{
switch (format) {
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
memcpy(dst, src, n * sizeof(GLuint));
break;
- case MESA_FORMAT_S8_Z24:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
{
GLuint *d = ((GLuint *) dst);
GLuint i;
}
}
break;
- case MESA_FORMAT_Z32_FLOAT_X24S8:
+ case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
{
const GLdouble scale = 1.0 / (GLdouble) 0xffffff;
struct z32f_x24s8 *d = (struct z32f_x24s8 *) dst;
#include "../../gallium/auxiliary/util/u_format_r11g11b10f.h"
-/** Helper struct for MESA_FORMAT_Z32_FLOAT_X24S8 */
+/** Helper struct for MESA_FORMAT_Z32_FLOAT_S8X24_UINT */
struct z32f_x24s8
{
float z;
table[MESA_FORMAT_X8R8G8B8_UNORM] = unpack_XRGB8888_REV;
table[MESA_FORMAT_BGR_UNORM8] = unpack_RGB888;
table[MESA_FORMAT_RGB_UNORM8] = unpack_BGR888;
- table[MESA_FORMAT_RGB565] = unpack_RGB565;
- table[MESA_FORMAT_RGB565_REV] = unpack_RGB565_REV;
- table[MESA_FORMAT_ARGB4444] = unpack_ARGB4444;
- table[MESA_FORMAT_ARGB4444_REV] = unpack_ARGB4444_REV;
- table[MESA_FORMAT_RGBA5551] = unpack_RGBA5551;
- table[MESA_FORMAT_ARGB1555] = unpack_ARGB1555;
- table[MESA_FORMAT_ARGB1555_REV] = unpack_ARGB1555_REV;
- table[MESA_FORMAT_AL44] = unpack_AL44;
- table[MESA_FORMAT_AL88] = unpack_AL88;
- table[MESA_FORMAT_AL88_REV] = unpack_AL88_REV;
- table[MESA_FORMAT_AL1616] = unpack_AL1616;
- table[MESA_FORMAT_AL1616_REV] = unpack_AL1616_REV;
- table[MESA_FORMAT_RGB332] = unpack_RGB332;
+ table[MESA_FORMAT_B5G6R5_UNORM] = unpack_RGB565;
+ table[MESA_FORMAT_R5G6B5_UNORM] = unpack_RGB565_REV;
+ table[MESA_FORMAT_B4G4R4A4_UNORM] = unpack_ARGB4444;
+ table[MESA_FORMAT_A4R4G4B4_UNORM] = unpack_ARGB4444_REV;
+ table[MESA_FORMAT_A1B5G5R5_UNORM] = unpack_RGBA5551;
+ table[MESA_FORMAT_B5G5R5A1_UNORM] = unpack_ARGB1555;
+ table[MESA_FORMAT_A1R5G5B5_UNORM] = unpack_ARGB1555_REV;
+ table[MESA_FORMAT_L4A4_UNORM] = unpack_AL44;
+ table[MESA_FORMAT_L8A8_UNORM] = unpack_AL88;
+ table[MESA_FORMAT_A8L8_UNORM] = unpack_AL88_REV;
+ table[MESA_FORMAT_L16A16_UNORM] = unpack_AL1616;
+ table[MESA_FORMAT_A16L16_UNORM] = unpack_AL1616_REV;
+ table[MESA_FORMAT_B2G3R3_UNORM] = unpack_RGB332;
table[MESA_FORMAT_A_UNORM8] = unpack_A8;
table[MESA_FORMAT_A_UNORM16] = unpack_A16;
table[MESA_FORMAT_L_UNORM8] = unpack_L8;
table[MESA_FORMAT_YCBCR] = unpack_YCBCR;
table[MESA_FORMAT_YCBCR_REV] = unpack_YCBCR_REV;
table[MESA_FORMAT_R_UNORM8] = unpack_R8;
- table[MESA_FORMAT_GR88] = unpack_GR88;
- table[MESA_FORMAT_RG88] = unpack_RG88;
+ table[MESA_FORMAT_R8G8_UNORM] = unpack_GR88;
+ table[MESA_FORMAT_G8R8_UNORM] = unpack_RG88;
table[MESA_FORMAT_R_UNORM16] = unpack_R16;
- table[MESA_FORMAT_GR1616] = unpack_GR1616;
- table[MESA_FORMAT_RG1616] = unpack_RG1616;
- table[MESA_FORMAT_ARGB2101010] = unpack_ARGB2101010;
- table[MESA_FORMAT_ARGB2101010_UINT] = unpack_ARGB2101010_UINT;
- table[MESA_FORMAT_ABGR2101010_UINT] = unpack_ABGR2101010_UINT;
- table[MESA_FORMAT_Z24_S8] = unpack_Z24_S8;
- table[MESA_FORMAT_S8_Z24] = unpack_S8_Z24;
+ table[MESA_FORMAT_R16G16_UNORM] = unpack_GR1616;
+ table[MESA_FORMAT_G16R16_UNORM] = unpack_RG1616;
+ table[MESA_FORMAT_B10G10R10A2_UNORM] = unpack_ARGB2101010;
+ table[MESA_FORMAT_B10G10R10A2_UINT] = unpack_ARGB2101010_UINT;
+ table[MESA_FORMAT_R10G10B10A2_UINT] = unpack_ABGR2101010_UINT;
+ table[MESA_FORMAT_S8_UINT_Z24_UNORM] = unpack_Z24_S8;
+ table[MESA_FORMAT_Z24_UNORM_X8_UINT] = unpack_S8_Z24;
table[MESA_FORMAT_Z_UNORM16] = unpack_Z16;
- table[MESA_FORMAT_X8_Z24] = unpack_X8_Z24;
- table[MESA_FORMAT_Z24_X8] = unpack_Z24_X8;
+ table[MESA_FORMAT_Z24_UNORM_S8_UINT] = unpack_X8_Z24;
+ table[MESA_FORMAT_X8Z24_UNORM] = unpack_Z24_X8;
table[MESA_FORMAT_Z_UNORM32] = unpack_Z32;
table[MESA_FORMAT_S_UINT8] = unpack_S8;
table[MESA_FORMAT_BGR_SRGB8] = unpack_SRGB8;
- table[MESA_FORMAT_SRGBA8] = unpack_SRGBA8;
- table[MESA_FORMAT_SARGB8] = unpack_SARGB8;
+ table[MESA_FORMAT_A8B8G8R8_SRGB] = unpack_SRGBA8;
+ table[MESA_FORMAT_B8G8R8A8_SRGB] = unpack_SARGB8;
table[MESA_FORMAT_L_SRGB8] = unpack_SL8;
- table[MESA_FORMAT_SLA8] = unpack_SLA8;
+ table[MESA_FORMAT_L8A8_SRGB] = unpack_SLA8;
table[MESA_FORMAT_SRGB_DXT1] = unpack_SRGB_DXT1;
table[MESA_FORMAT_SRGBA_DXT1] = unpack_SRGBA_DXT1;
table[MESA_FORMAT_SRGBA_DXT3] = unpack_SRGBA_DXT3;
table[MESA_FORMAT_SIGNED_AL1616] = unpack_SIGNED_AL1616;
table[MESA_FORMAT_SIGNED_I16] = unpack_SIGNED_I16;
- table[MESA_FORMAT_RGB9_E5_FLOAT] = unpack_RGB9_E5_FLOAT;
- table[MESA_FORMAT_R11_G11_B10_FLOAT] = unpack_R11_G11_B10_FLOAT;
+ table[MESA_FORMAT_R9G9B9E5_FLOAT] = unpack_RGB9_E5_FLOAT;
+ table[MESA_FORMAT_R11G11B10_FLOAT] = unpack_R11_G11_B10_FLOAT;
table[MESA_FORMAT_Z_FLOAT32] = unpack_Z32_FLOAT;
- table[MESA_FORMAT_Z32_FLOAT_X24S8] = unpack_Z32_FLOAT_X24S8;
+ table[MESA_FORMAT_Z32_FLOAT_S8X24_UINT] = unpack_Z32_FLOAT_X24S8;
- table[MESA_FORMAT_XRGB4444_UNORM] = unpack_XRGB4444_UNORM;
- table[MESA_FORMAT_XRGB1555_UNORM] = unpack_XRGB1555_UNORM;
- table[MESA_FORMAT_XBGR8888_SNORM] = unpack_XBGR8888_SNORM;
- table[MESA_FORMAT_XBGR8888_SRGB] = unpack_XBGR8888_SRGB;
+ table[MESA_FORMAT_B4G4R4X4_UNORM] = unpack_XRGB4444_UNORM;
+ table[MESA_FORMAT_B5G5R5X1_UNORM] = unpack_XRGB1555_UNORM;
+ table[MESA_FORMAT_R8G8B8X8_SNORM] = unpack_XBGR8888_SNORM;
+ table[MESA_FORMAT_R8G8B8X8_SRGB] = unpack_XBGR8888_SRGB;
table[MESA_FORMAT_RGBX_UINT8] = unpack_XBGR8888_UINT;
table[MESA_FORMAT_RGBX_SINT8] = unpack_XBGR8888_SINT;
- table[MESA_FORMAT_XRGB2101010_UNORM] = unpack_XRGB2101010_UNORM;
+ table[MESA_FORMAT_B10G10R10X2_UNORM] = unpack_XRGB2101010_UNORM;
table[MESA_FORMAT_RGBX_UNORM16] = unpack_XBGR16161616_UNORM;
table[MESA_FORMAT_RGBX_SNORM16] = unpack_XBGR16161616_SNORM;
table[MESA_FORMAT_RGBX_FLOAT16] = unpack_XBGR16161616_FLOAT;
table[MESA_FORMAT_RGBX_UINT32] = unpack_XBGR32323232_UINT;
table[MESA_FORMAT_RGBX_SINT32] = unpack_XBGR32323232_SINT;
- table[MESA_FORMAT_ABGR2101010] = unpack_ABGR2101010;
+ table[MESA_FORMAT_R10G10B10A2_UNORM] = unpack_ABGR2101010;
table[MESA_FORMAT_SIGNED_RG88] = unpack_SIGNED_RG88;
table[MESA_FORMAT_SIGNED_RG1616] = unpack_SIGNED_RG1616;
case MESA_FORMAT_RGB_UNORM8:
unpack_ubyte_BGR888(src, dst, n);
break;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
unpack_ubyte_RGB565(src, dst, n);
break;
- case MESA_FORMAT_RGB565_REV:
+ case MESA_FORMAT_R5G6B5_UNORM:
unpack_ubyte_RGB565_REV(src, dst, n);
break;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
unpack_ubyte_ARGB4444(src, dst, n);
break;
- case MESA_FORMAT_ARGB4444_REV:
+ case MESA_FORMAT_A4R4G4B4_UNORM:
unpack_ubyte_ARGB4444_REV(src, dst, n);
break;
- case MESA_FORMAT_RGBA5551:
+ case MESA_FORMAT_A1B5G5R5_UNORM:
unpack_ubyte_RGBA5551(src, dst, n);
break;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
unpack_ubyte_ARGB1555(src, dst, n);
break;
- case MESA_FORMAT_ARGB1555_REV:
+ case MESA_FORMAT_A1R5G5B5_UNORM:
unpack_ubyte_ARGB1555_REV(src, dst, n);
break;
- case MESA_FORMAT_AL44:
+ case MESA_FORMAT_L4A4_UNORM:
unpack_ubyte_AL44(src, dst, n);
break;
- case MESA_FORMAT_AL88:
+ case MESA_FORMAT_L8A8_UNORM:
unpack_ubyte_AL88(src, dst, n);
break;
- case MESA_FORMAT_AL88_REV:
+ case MESA_FORMAT_A8L8_UNORM:
unpack_ubyte_AL88_REV(src, dst, n);
break;
- case MESA_FORMAT_RGB332:
+ case MESA_FORMAT_B2G3R3_UNORM:
unpack_ubyte_RGB332(src, dst, n);
break;
case MESA_FORMAT_A_UNORM8:
case MESA_FORMAT_R_UNORM8:
unpack_ubyte_R8(src, dst, n);
break;
- case MESA_FORMAT_GR88:
+ case MESA_FORMAT_R8G8_UNORM:
unpack_ubyte_GR88(src, dst, n);
break;
- case MESA_FORMAT_RG88:
+ case MESA_FORMAT_G8R8_UNORM:
unpack_ubyte_RG88(src, dst, n);
break;
default:
unpack_int_rgba_INTENSITY_INT8(src, dst, n);
break;
- case MESA_FORMAT_ARGB2101010_UINT:
+ case MESA_FORMAT_B10G10R10A2_UINT:
unpack_int_rgba_ARGB2101010_UINT(src, dst, n);
break;
- case MESA_FORMAT_ABGR2101010_UINT:
+ case MESA_FORMAT_R10G10B10A2_UINT:
unpack_int_rgba_ABGR2101010_UINT(src, dst, n);
break;
- case MESA_FORMAT_ARGB2101010:
+ case MESA_FORMAT_B10G10R10A2_UNORM:
unpack_int_rgba_ARGB2101010(src, dst, n);
break;
unpack_int_rgba_XBGR32323232_UINT(src, dst, n);
break;
- case MESA_FORMAT_ABGR2101010:
+ case MESA_FORMAT_R10G10B10A2_UNORM:
unpack_int_rgba_ABGR2101010(src, dst, n);
break;
unpack_float_z_func unpack;
switch (format) {
- case MESA_FORMAT_Z24_S8:
- case MESA_FORMAT_Z24_X8:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
+ case MESA_FORMAT_X8Z24_UNORM:
unpack = unpack_float_z_Z24_X8;
break;
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_X8_Z24:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
unpack = unpack_float_z_X8_Z24;
break;
case MESA_FORMAT_Z_UNORM16:
case MESA_FORMAT_Z_FLOAT32:
unpack = unpack_float_z_Z32F;
break;
- case MESA_FORMAT_Z32_FLOAT_X24S8:
+ case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
unpack = unpack_float_z_Z32X24S8;
break;
default:
const GLubyte *srcPtr = (GLubyte *) src;
switch (format) {
- case MESA_FORMAT_Z24_S8:
- case MESA_FORMAT_Z24_X8:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
+ case MESA_FORMAT_X8Z24_UNORM:
unpack = unpack_uint_z_Z24_X8;
break;
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_X8_Z24:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
unpack = unpack_uint_z_X8_Z24;
break;
case MESA_FORMAT_Z_UNORM16:
case MESA_FORMAT_Z_FLOAT32:
unpack = unpack_uint_z_Z32_FLOAT;
break;
- case MESA_FORMAT_Z32_FLOAT_X24S8:
+ case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
unpack = unpack_uint_z_Z32_FLOAT_X24S8;
break;
default:
case MESA_FORMAT_S_UINT8:
unpack_ubyte_s_S8(src, dst, n);
break;
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
unpack_ubyte_s_Z24_S8(src, dst, n);
break;
- case MESA_FORMAT_S8_Z24:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
unpack_ubyte_s_S8_Z24(src, dst, n);
break;
- case MESA_FORMAT_Z32_FLOAT_X24S8:
+ case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
unpack_ubyte_s_Z32_FLOAT_X24S8(src, dst, n);
break;
default:
const void *src, GLuint *dst)
{
switch (format) {
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
unpack_uint_24_8_depth_stencil_Z24_S8(src, dst, n);
break;
- case MESA_FORMAT_S8_Z24:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
unpack_uint_24_8_depth_stencil_S8_Z24(src, dst, n);
break;
default:
1, 1, 3 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_RGB565, /* Name */
- "MESA_FORMAT_RGB565", /* StrName */
+ MESA_FORMAT_B5G6R5_UNORM, /* Name */
+ "MESA_FORMAT_B5G6R5_UNORM", /* StrName */
GL_RGB, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
5, 6, 5, 0, /* Red/Green/Blue/AlphaBits */
1, 1, 2 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_RGB565_REV, /* Name */
- "MESA_FORMAT_RGB565_REV", /* StrName */
+ MESA_FORMAT_R5G6B5_UNORM, /* Name */
+ "MESA_FORMAT_R5G6B5_UNORM", /* StrName */
GL_RGB, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
5, 6, 5, 0, /* Red/Green/Blue/AlphaBits */
1, 1, 2 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_ARGB4444, /* Name */
- "MESA_FORMAT_ARGB4444", /* StrName */
+ MESA_FORMAT_B4G4R4A4_UNORM, /* Name */
+ "MESA_FORMAT_B4G4R4A4_UNORM", /* StrName */
GL_RGBA, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
4, 4, 4, 4, /* Red/Green/Blue/AlphaBits */
1, 1, 2 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_ARGB4444_REV, /* Name */
- "MESA_FORMAT_ARGB4444_REV", /* StrName */
+ MESA_FORMAT_A4R4G4B4_UNORM, /* Name */
+ "MESA_FORMAT_A4R4G4B4_UNORM", /* StrName */
GL_RGBA, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
4, 4, 4, 4, /* Red/Green/Blue/AlphaBits */
1, 1, 2 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_RGBA5551, /* Name */
- "MESA_FORMAT_RGBA5551", /* StrName */
+ MESA_FORMAT_A1B5G5R5_UNORM, /* Name */
+ "MESA_FORMAT_A1B5G5R5_UNORM", /* StrName */
GL_RGBA, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
5, 5, 5, 1, /* Red/Green/Blue/AlphaBits */
1, 1, 2 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_ARGB1555, /* Name */
- "MESA_FORMAT_ARGB1555", /* StrName */
+ MESA_FORMAT_B5G5R5A1_UNORM, /* Name */
+ "MESA_FORMAT_B5G5R5A1_UNORM", /* StrName */
GL_RGBA, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
5, 5, 5, 1, /* Red/Green/Blue/AlphaBits */
1, 1, 2 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_ARGB1555_REV, /* Name */
- "MESA_FORMAT_ARGB1555_REV", /* StrName */
+ MESA_FORMAT_A1R5G5B5_UNORM, /* Name */
+ "MESA_FORMAT_A1R5G5B5_UNORM", /* StrName */
GL_RGBA, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
5, 5, 5, 1, /* Red/Green/Blue/AlphaBits */
1, 1, 2 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_AL44, /* Name */
- "MESA_FORMAT_AL44", /* StrName */
+ MESA_FORMAT_L4A4_UNORM, /* Name */
+ "MESA_FORMAT_L4A4_UNORM", /* StrName */
GL_LUMINANCE_ALPHA, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
0, 0, 0, 4, /* Red/Green/Blue/AlphaBits */
1, 1, 1 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_AL88, /* Name */
- "MESA_FORMAT_AL88", /* StrName */
+ MESA_FORMAT_L8A8_UNORM, /* Name */
+ "MESA_FORMAT_L8A8_UNORM", /* StrName */
GL_LUMINANCE_ALPHA, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
0, 0, 0, 8, /* Red/Green/Blue/AlphaBits */
1, 1, 2 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_AL88_REV, /* Name */
- "MESA_FORMAT_AL88_REV", /* StrName */
+ MESA_FORMAT_A8L8_UNORM, /* Name */
+ "MESA_FORMAT_A8L8_UNORM", /* StrName */
GL_LUMINANCE_ALPHA, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
0, 0, 0, 8, /* Red/Green/Blue/AlphaBits */
1, 1, 2 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_AL1616, /* Name */
- "MESA_FORMAT_AL1616", /* StrName */
+ MESA_FORMAT_L16A16_UNORM, /* Name */
+ "MESA_FORMAT_L16A16_UNORM", /* StrName */
GL_LUMINANCE_ALPHA, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
0, 0, 0, 16, /* Red/Green/Blue/AlphaBits */
1, 1, 4 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_AL1616_REV, /* Name */
- "MESA_FORMAT_AL1616_REV", /* StrName */
+ MESA_FORMAT_A16L16_UNORM, /* Name */
+ "MESA_FORMAT_A16L16_UNORM", /* StrName */
GL_LUMINANCE_ALPHA, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
0, 0, 0, 16, /* Red/Green/Blue/AlphaBits */
1, 1, 4 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_RGB332, /* Name */
- "MESA_FORMAT_RGB332", /* StrName */
+ MESA_FORMAT_B2G3R3_UNORM, /* Name */
+ "MESA_FORMAT_B2G3R3_UNORM", /* StrName */
GL_RGB, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
3, 3, 2, 0, /* Red/Green/Blue/AlphaBits */
1, 1, 1
},
{
- MESA_FORMAT_GR88,
- "MESA_FORMAT_GR88",
+ MESA_FORMAT_R8G8_UNORM,
+ "MESA_FORMAT_R8G8_UNORM",
GL_RG,
GL_UNSIGNED_NORMALIZED,
8, 8, 0, 0,
1, 1, 2
},
{
- MESA_FORMAT_RG88,
- "MESA_FORMAT_RG88",
+ MESA_FORMAT_G8R8_UNORM,
+ "MESA_FORMAT_G8R8_UNORM",
GL_RG,
GL_UNSIGNED_NORMALIZED,
8, 8, 0, 0,
1, 1, 2
},
{
- MESA_FORMAT_GR1616,
- "MESA_FORMAT_GR1616",
+ MESA_FORMAT_R16G16_UNORM,
+ "MESA_FORMAT_R16G16_UNORM",
GL_RG,
GL_UNSIGNED_NORMALIZED,
16, 16, 0, 0,
1, 1, 4
},
{
- MESA_FORMAT_RG1616,
- "MESA_FORMAT_RG1616",
+ MESA_FORMAT_G16R16_UNORM,
+ "MESA_FORMAT_G16R16_UNORM",
GL_RG,
GL_UNSIGNED_NORMALIZED,
16, 16, 0, 0,
1, 1, 4
},
{
- MESA_FORMAT_ARGB2101010,
- "MESA_FORMAT_ARGB2101010",
+ MESA_FORMAT_B10G10R10A2_UNORM,
+ "MESA_FORMAT_B10G10R10A2_UNORM",
GL_RGBA,
GL_UNSIGNED_NORMALIZED,
10, 10, 10, 2,
1, 1, 4
},
{
- MESA_FORMAT_Z24_S8, /* Name */
- "MESA_FORMAT_Z24_S8", /* StrName */
+ MESA_FORMAT_S8_UINT_Z24_UNORM, /* Name */
+ "MESA_FORMAT_S8_UINT_Z24_UNORM", /* StrName */
GL_DEPTH_STENCIL, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
0, 0, 0, 0, /* Red/Green/Blue/AlphaBits */
1, 1, 4 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_S8_Z24, /* Name */
- "MESA_FORMAT_S8_Z24", /* StrName */
+ MESA_FORMAT_Z24_UNORM_X8_UINT, /* Name */
+ "MESA_FORMAT_Z24_UNORM_X8_UINT", /* StrName */
GL_DEPTH_STENCIL, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
0, 0, 0, 0, /* Red/Green/Blue/AlphaBits */
1, 1, 2 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_X8_Z24, /* Name */
- "MESA_FORMAT_X8_Z24", /* StrName */
+ MESA_FORMAT_Z24_UNORM_S8_UINT, /* Name */
+ "MESA_FORMAT_Z24_UNORM_S8_UINT", /* StrName */
GL_DEPTH_COMPONENT, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
0, 0, 0, 0, /* Red/Green/Blue/AlphaBits */
1, 1, 4 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_Z24_X8, /* Name */
- "MESA_FORMAT_Z24_X8", /* StrName */
+ MESA_FORMAT_X8Z24_UNORM, /* Name */
+ "MESA_FORMAT_X8Z24_UNORM", /* StrName */
GL_DEPTH_COMPONENT, /* BaseFormat */
GL_UNSIGNED_NORMALIZED, /* DataType */
0, 0, 0, 0, /* Red/Green/Blue/AlphaBits */
1, 1, 3
},
{
- MESA_FORMAT_SRGBA8,
- "MESA_FORMAT_SRGBA8",
+ MESA_FORMAT_A8B8G8R8_SRGB,
+ "MESA_FORMAT_A8B8G8R8_SRGB",
GL_RGBA,
GL_UNSIGNED_NORMALIZED,
8, 8, 8, 8,
1, 1, 4
},
{
- MESA_FORMAT_SARGB8,
- "MESA_FORMAT_SARGB8",
+ MESA_FORMAT_B8G8R8A8_SRGB,
+ "MESA_FORMAT_B8G8R8A8_SRGB",
GL_RGBA,
GL_UNSIGNED_NORMALIZED,
8, 8, 8, 8,
1, 1, 1
},
{
- MESA_FORMAT_SLA8,
- "MESA_FORMAT_SLA8",
+ MESA_FORMAT_L8A8_SRGB,
+ "MESA_FORMAT_L8A8_SRGB",
GL_LUMINANCE_ALPHA,
GL_UNSIGNED_NORMALIZED,
0, 0, 0, 8,
1, 1, 2
},
{
- MESA_FORMAT_RGB9_E5_FLOAT,
+ MESA_FORMAT_R9G9B9E5_FLOAT,
"MESA_FORMAT_RGB9_E5",
GL_RGB,
GL_FLOAT,
1, 1, 4
},
{
- MESA_FORMAT_R11_G11_B10_FLOAT,
- "MESA_FORMAT_R11_G11_B10_FLOAT",
+ MESA_FORMAT_R11G11B10_FLOAT,
+ "MESA_FORMAT_R11G11B10_FLOAT",
GL_RGB,
GL_FLOAT,
11, 11, 10, 0,
1, 1, 4 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_Z32_FLOAT_X24S8, /* Name */
- "MESA_FORMAT_Z32_FLOAT_X24S8", /* StrName */
+ MESA_FORMAT_Z32_FLOAT_S8X24_UINT, /* Name */
+ "MESA_FORMAT_Z32_FLOAT_S8X24_UINT", /* StrName */
GL_DEPTH_STENCIL, /* BaseFormat */
/* DataType here is used to answer GL_TEXTURE_DEPTH_TYPE queries, and is
* never used for stencil because stencil is always GL_UNSIGNED_INT.
1, 1, 8 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_ARGB2101010_UINT,
- "MESA_FORMAT_ARGB2101010_UINT",
+ MESA_FORMAT_B10G10R10A2_UINT,
+ "MESA_FORMAT_B10G10R10A2_UINT",
GL_RGBA,
GL_UNSIGNED_INT,
10, 10, 10, 2,
1, 1, 4
},
{
- MESA_FORMAT_ABGR2101010_UINT,
- "MESA_FORMAT_ABGR2101010_UINT",
+ MESA_FORMAT_R10G10B10A2_UINT,
+ "MESA_FORMAT_R10G10B10A2_UINT",
GL_RGBA,
GL_UNSIGNED_INT,
10, 10, 10, 2,
1, 1, 4
},
{
- MESA_FORMAT_XRGB4444_UNORM,
- "MESA_FORMAT_XRGB4444_UNORM",
+ MESA_FORMAT_B4G4R4X4_UNORM,
+ "MESA_FORMAT_B4G4R4X4_UNORM",
GL_RGB,
GL_UNSIGNED_NORMALIZED,
4, 4, 4, 0,
1, 1, 2
},
{
- MESA_FORMAT_XRGB1555_UNORM,
- "MESA_FORMAT_XRGB1555_UNORM",
+ MESA_FORMAT_B5G5R5X1_UNORM,
+ "MESA_FORMAT_B5G5R5X1_UNORM",
GL_RGB,
GL_UNSIGNED_NORMALIZED,
5, 5, 5, 0,
1, 1, 2
},
{
- MESA_FORMAT_XBGR8888_SNORM,
- "MESA_FORMAT_XBGR8888_SNORM",
+ MESA_FORMAT_R8G8B8X8_SNORM,
+ "MESA_FORMAT_R8G8B8X8_SNORM",
GL_RGB,
GL_SIGNED_NORMALIZED,
8, 8, 8, 0,
1, 1, 4
},
{
- MESA_FORMAT_XBGR8888_SRGB,
- "MESA_FORMAT_XBGR8888_SRGB",
+ MESA_FORMAT_R8G8B8X8_SRGB,
+ "MESA_FORMAT_R8G8B8X8_SRGB",
GL_RGB,
GL_UNSIGNED_NORMALIZED,
8, 8, 8, 0,
1, 1, 4
},
{
- MESA_FORMAT_XRGB2101010_UNORM,
- "MESA_FORMAT_XRGB2101010_UNORM",
+ MESA_FORMAT_B10G10R10X2_UNORM,
+ "MESA_FORMAT_B10G10R10X2_UNORM",
GL_RGB,
GL_UNSIGNED_NORMALIZED,
10, 10, 10, 0,
1, 1, 16
},
{
- MESA_FORMAT_ABGR2101010,
- "MESA_FORMAT_ABGR2101010",
+ MESA_FORMAT_R10G10B10A2_UNORM,
+ "MESA_FORMAT_R10G10B10A2_UNORM",
GL_RGBA,
GL_UNSIGNED_NORMALIZED,
10, 10, 10, 2,
GLboolean
_mesa_is_format_signed(mesa_format format)
{
- if (format == MESA_FORMAT_R11_G11_B10_FLOAT ||
- format == MESA_FORMAT_RGB9_E5_FLOAT) {
+ if (format == MESA_FORMAT_R11G11B10_FLOAT ||
+ format == MESA_FORMAT_R9G9B9E5_FLOAT) {
/* these packed float formats only store unsigned values */
return GL_FALSE;
}
/* XXX this info should be encoded in gl_format_info */
switch (format) {
case MESA_FORMAT_BGR_SRGB8:
- case MESA_FORMAT_SRGBA8:
- case MESA_FORMAT_SARGB8:
+ case MESA_FORMAT_A8B8G8R8_SRGB:
+ case MESA_FORMAT_B8G8R8A8_SRGB:
case MESA_FORMAT_L_SRGB8:
- case MESA_FORMAT_SLA8:
+ case MESA_FORMAT_L8A8_SRGB:
case MESA_FORMAT_SRGB_DXT1:
case MESA_FORMAT_SRGBA_DXT1:
case MESA_FORMAT_SRGBA_DXT3:
case MESA_FORMAT_SRGBA_DXT5:
- case MESA_FORMAT_XBGR8888_SRGB:
+ case MESA_FORMAT_R8G8B8X8_SRGB:
case MESA_FORMAT_ETC2_SRGB8:
case MESA_FORMAT_ETC2_SRGB8_ALPHA8_EAC:
case MESA_FORMAT_ETC2_SRGB8_PUNCHTHROUGH_ALPHA1:
case MESA_FORMAT_BGR_SRGB8:
format = MESA_FORMAT_BGR_UNORM8;
break;
- case MESA_FORMAT_SRGBA8:
+ case MESA_FORMAT_A8B8G8R8_SRGB:
format = MESA_FORMAT_A8B8G8R8_UNORM;
break;
- case MESA_FORMAT_SARGB8:
+ case MESA_FORMAT_B8G8R8A8_SRGB:
format = MESA_FORMAT_B8G8R8A8_UNORM;
break;
case MESA_FORMAT_L_SRGB8:
format = MESA_FORMAT_L_UNORM8;
break;
- case MESA_FORMAT_SLA8:
- format = MESA_FORMAT_AL88;
+ case MESA_FORMAT_L8A8_SRGB:
+ format = MESA_FORMAT_L8A8_UNORM;
break;
case MESA_FORMAT_SRGB_DXT1:
format = MESA_FORMAT_RGB_DXT1;
case MESA_FORMAT_SRGBA_DXT5:
format = MESA_FORMAT_RGBA_DXT5;
break;
- case MESA_FORMAT_XBGR8888_SRGB:
+ case MESA_FORMAT_R8G8B8X8_SRGB:
format = MESA_FORMAT_R8G8B8X8_UNORM;
break;
case MESA_FORMAT_ETC2_SRGB8:
case MESA_FORMAT_SIGNED_RED_RGTC1:
return MESA_FORMAT_SIGNED_R8;
case MESA_FORMAT_RG_RGTC2:
- return MESA_FORMAT_GR88;
+ return MESA_FORMAT_R8G8_UNORM;
case MESA_FORMAT_SIGNED_RG_RGTC2:
return MESA_FORMAT_SIGNED_RG88_REV;
case MESA_FORMAT_L_LATC1:
case MESA_FORMAT_SIGNED_L_LATC1:
return MESA_FORMAT_SIGNED_L8;
case MESA_FORMAT_LA_LATC2:
- return MESA_FORMAT_AL88;
+ return MESA_FORMAT_L8A8_UNORM;
case MESA_FORMAT_SIGNED_LA_LATC2:
return MESA_FORMAT_SIGNED_AL88;
case MESA_FORMAT_ETC1_RGB8:
return MESA_FORMAT_R_UNORM16;
case MESA_FORMAT_ETC2_RG11_EAC:
case MESA_FORMAT_ETC2_SIGNED_RG11_EAC:
- return MESA_FORMAT_GR1616;
+ return MESA_FORMAT_R16G16_UNORM;
default:
#ifdef DEBUG
assert(!_mesa_is_format_compressed(format));
*datatype = GL_UNSIGNED_BYTE;
*comps = 3;
return;
- case MESA_FORMAT_RGB565:
- case MESA_FORMAT_RGB565_REV:
+ case MESA_FORMAT_B5G6R5_UNORM:
+ case MESA_FORMAT_R5G6B5_UNORM:
*datatype = GL_UNSIGNED_SHORT_5_6_5;
*comps = 3;
return;
- case MESA_FORMAT_ARGB4444:
- case MESA_FORMAT_ARGB4444_REV:
- case MESA_FORMAT_XRGB4444_UNORM:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
+ case MESA_FORMAT_A4R4G4B4_UNORM:
+ case MESA_FORMAT_B4G4R4X4_UNORM:
*datatype = GL_UNSIGNED_SHORT_4_4_4_4;
*comps = 4;
return;
- case MESA_FORMAT_ARGB1555:
- case MESA_FORMAT_ARGB1555_REV:
- case MESA_FORMAT_XRGB1555_UNORM:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
+ case MESA_FORMAT_A1R5G5B5_UNORM:
+ case MESA_FORMAT_B5G5R5X1_UNORM:
*datatype = GL_UNSIGNED_SHORT_1_5_5_5_REV;
*comps = 4;
return;
- case MESA_FORMAT_ARGB2101010:
+ case MESA_FORMAT_B10G10R10A2_UNORM:
*datatype = GL_UNSIGNED_INT_2_10_10_10_REV;
*comps = 4;
return;
- case MESA_FORMAT_RGBA5551:
+ case MESA_FORMAT_A1B5G5R5_UNORM:
*datatype = GL_UNSIGNED_SHORT_5_5_5_1;
*comps = 4;
return;
- case MESA_FORMAT_AL44:
+ case MESA_FORMAT_L4A4_UNORM:
*datatype = MESA_UNSIGNED_BYTE_4_4;
*comps = 2;
return;
- case MESA_FORMAT_AL88:
- case MESA_FORMAT_AL88_REV:
- case MESA_FORMAT_GR88:
- case MESA_FORMAT_RG88:
+ case MESA_FORMAT_L8A8_UNORM:
+ case MESA_FORMAT_A8L8_UNORM:
+ case MESA_FORMAT_R8G8_UNORM:
+ case MESA_FORMAT_G8R8_UNORM:
*datatype = GL_UNSIGNED_BYTE;
*comps = 2;
return;
- case MESA_FORMAT_AL1616:
- case MESA_FORMAT_AL1616_REV:
- case MESA_FORMAT_GR1616:
- case MESA_FORMAT_RG1616:
+ case MESA_FORMAT_L16A16_UNORM:
+ case MESA_FORMAT_A16L16_UNORM:
+ case MESA_FORMAT_R16G16_UNORM:
+ case MESA_FORMAT_G16R16_UNORM:
*datatype = GL_UNSIGNED_SHORT;
*comps = 2;
return;
*comps = 1;
return;
- case MESA_FORMAT_RGB332:
+ case MESA_FORMAT_B2G3R3_UNORM:
*datatype = GL_UNSIGNED_BYTE_3_3_2;
*comps = 3;
return;
*comps = 2;
return;
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
*datatype = GL_UNSIGNED_INT_24_8_MESA;
*comps = 2;
return;
- case MESA_FORMAT_S8_Z24:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
*datatype = GL_UNSIGNED_INT_8_24_REV_MESA;
*comps = 2;
return;
*comps = 1;
return;
- case MESA_FORMAT_X8_Z24:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
*datatype = GL_UNSIGNED_INT;
*comps = 1;
return;
- case MESA_FORMAT_Z24_X8:
+ case MESA_FORMAT_X8Z24_UNORM:
*datatype = GL_UNSIGNED_INT;
*comps = 1;
return;
*comps = 1;
return;
- case MESA_FORMAT_Z32_FLOAT_X24S8:
+ case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
*datatype = GL_FLOAT_32_UNSIGNED_INT_24_8_REV;
*comps = 1;
return;
*datatype = GL_UNSIGNED_BYTE;
*comps = 3;
return;
- case MESA_FORMAT_SRGBA8:
- case MESA_FORMAT_SARGB8:
+ case MESA_FORMAT_A8B8G8R8_SRGB:
+ case MESA_FORMAT_B8G8R8A8_SRGB:
*datatype = GL_UNSIGNED_BYTE;
*comps = 4;
return;
*datatype = GL_UNSIGNED_BYTE;
*comps = 1;
return;
- case MESA_FORMAT_SLA8:
+ case MESA_FORMAT_L8A8_SRGB:
*datatype = GL_UNSIGNED_BYTE;
*comps = 2;
return;
*comps = 4;
return;
- case MESA_FORMAT_RGB9_E5_FLOAT:
+ case MESA_FORMAT_R9G9B9E5_FLOAT:
*datatype = GL_UNSIGNED_INT_5_9_9_9_REV;
*comps = 3;
return;
- case MESA_FORMAT_R11_G11_B10_FLOAT:
+ case MESA_FORMAT_R11G11B10_FLOAT:
*datatype = GL_UNSIGNED_INT_10F_11F_11F_REV;
*comps = 3;
return;
- case MESA_FORMAT_ARGB2101010_UINT:
- case MESA_FORMAT_ABGR2101010_UINT:
+ case MESA_FORMAT_B10G10R10A2_UINT:
+ case MESA_FORMAT_R10G10B10A2_UINT:
*datatype = GL_UNSIGNED_INT_2_10_10_10_REV;
*comps = 4;
return;
- case MESA_FORMAT_XBGR8888_SRGB:
+ case MESA_FORMAT_R8G8B8X8_SRGB:
case MESA_FORMAT_RGBX_UINT8:
*datatype = GL_UNSIGNED_BYTE;
*comps = 4;
return;
- case MESA_FORMAT_XBGR8888_SNORM:
+ case MESA_FORMAT_R8G8B8X8_SNORM:
case MESA_FORMAT_RGBX_SINT8:
*datatype = GL_BYTE;
*comps = 4;
return;
- case MESA_FORMAT_XRGB2101010_UNORM:
+ case MESA_FORMAT_B10G10R10X2_UNORM:
*datatype = GL_UNSIGNED_INT_2_10_10_10_REV;
*comps = 4;
return;
*comps = 4;
return;
- case MESA_FORMAT_ABGR2101010:
+ case MESA_FORMAT_R10G10B10A2_UNORM:
*datatype = GL_UNSIGNED_INT_2_10_10_10_REV;
*comps = 4;
return;
return GL_FALSE;
case MESA_FORMAT_A8B8G8R8_UNORM:
- case MESA_FORMAT_SRGBA8:
+ case MESA_FORMAT_A8B8G8R8_SRGB:
if (format == GL_RGBA && type == GL_UNSIGNED_INT_8_8_8_8 && !swapBytes)
return GL_TRUE;
return GL_FALSE;
case MESA_FORMAT_B8G8R8A8_UNORM:
- case MESA_FORMAT_SARGB8:
+ case MESA_FORMAT_B8G8R8A8_SRGB:
if (format == GL_BGRA && type == GL_UNSIGNED_INT_8_8_8_8_REV &&
!swapBytes)
return GL_TRUE;
case MESA_FORMAT_RGB_UNORM8:
return format == GL_RGB && type == GL_UNSIGNED_BYTE && littleEndian;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
return format == GL_RGB && type == GL_UNSIGNED_SHORT_5_6_5 && !swapBytes;
- case MESA_FORMAT_RGB565_REV:
+ case MESA_FORMAT_R5G6B5_UNORM:
/* Some of the 16-bit MESA_FORMATs that would seem to correspond to
* GL_UNSIGNED_SHORT_* are byte-swapped instead of channel-reversed,
* according to formats.h, so they can't be matched.
*/
return GL_FALSE;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
return format == GL_BGRA && type == GL_UNSIGNED_SHORT_4_4_4_4_REV &&
!swapBytes;
- case MESA_FORMAT_ARGB4444_REV:
+ case MESA_FORMAT_A4R4G4B4_UNORM:
return GL_FALSE;
- case MESA_FORMAT_RGBA5551:
+ case MESA_FORMAT_A1B5G5R5_UNORM:
return format == GL_RGBA && type == GL_UNSIGNED_SHORT_5_5_5_1 &&
!swapBytes;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
return format == GL_BGRA && type == GL_UNSIGNED_SHORT_1_5_5_5_REV &&
!swapBytes;
- case MESA_FORMAT_ARGB1555_REV:
+ case MESA_FORMAT_A1R5G5B5_UNORM:
return GL_FALSE;
- case MESA_FORMAT_AL44:
+ case MESA_FORMAT_L4A4_UNORM:
return GL_FALSE;
- case MESA_FORMAT_AL88:
- case MESA_FORMAT_SLA8:
+ case MESA_FORMAT_L8A8_UNORM:
+ case MESA_FORMAT_L8A8_SRGB:
return format == GL_LUMINANCE_ALPHA && type == GL_UNSIGNED_BYTE && littleEndian;
- case MESA_FORMAT_AL88_REV:
+ case MESA_FORMAT_A8L8_UNORM:
return GL_FALSE;
- case MESA_FORMAT_AL1616:
+ case MESA_FORMAT_L16A16_UNORM:
return format == GL_LUMINANCE_ALPHA && type == GL_UNSIGNED_SHORT && littleEndian && !swapBytes;
- case MESA_FORMAT_AL1616_REV:
+ case MESA_FORMAT_A16L16_UNORM:
return GL_FALSE;
- case MESA_FORMAT_RGB332:
+ case MESA_FORMAT_B2G3R3_UNORM:
return format == GL_RGB && type == GL_UNSIGNED_BYTE_3_3_2;
case MESA_FORMAT_A_UNORM8:
case MESA_FORMAT_R_UNORM8:
return format == GL_RED && type == GL_UNSIGNED_BYTE;
- case MESA_FORMAT_GR88:
+ case MESA_FORMAT_R8G8_UNORM:
return format == GL_RG && type == GL_UNSIGNED_BYTE && littleEndian;
- case MESA_FORMAT_RG88:
+ case MESA_FORMAT_G8R8_UNORM:
return GL_FALSE;
case MESA_FORMAT_R_UNORM16:
return format == GL_RED && type == GL_UNSIGNED_SHORT &&
!swapBytes;
- case MESA_FORMAT_GR1616:
+ case MESA_FORMAT_R16G16_UNORM:
return format == GL_RG && type == GL_UNSIGNED_SHORT && littleEndian &&
!swapBytes;
- case MESA_FORMAT_RG1616:
+ case MESA_FORMAT_G16R16_UNORM:
return GL_FALSE;
- case MESA_FORMAT_ARGB2101010:
+ case MESA_FORMAT_B10G10R10A2_UNORM:
return format == GL_BGRA && type == GL_UNSIGNED_INT_2_10_10_10_REV &&
!swapBytes;
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
return format == GL_DEPTH_STENCIL && type == GL_UNSIGNED_INT_24_8 &&
!swapBytes;
- case MESA_FORMAT_Z24_X8:
- case MESA_FORMAT_S8_Z24:
+ case MESA_FORMAT_X8Z24_UNORM:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
return GL_FALSE;
case MESA_FORMAT_Z_UNORM16:
return format == GL_DEPTH_COMPONENT && type == GL_UNSIGNED_SHORT &&
!swapBytes;
- case MESA_FORMAT_X8_Z24:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
return GL_FALSE;
case MESA_FORMAT_Z_UNORM32:
return format == GL_INTENSITY && type == GL_SHORT && littleEndian &&
!swapBytes;
- case MESA_FORMAT_ARGB2101010_UINT:
+ case MESA_FORMAT_B10G10R10A2_UINT:
return (format == GL_BGRA_INTEGER_EXT &&
type == GL_UNSIGNED_INT_2_10_10_10_REV &&
!swapBytes);
- case MESA_FORMAT_ABGR2101010_UINT:
+ case MESA_FORMAT_R10G10B10A2_UINT:
return (format == GL_RGBA_INTEGER_EXT &&
type == GL_UNSIGNED_INT_2_10_10_10_REV &&
!swapBytes);
- case MESA_FORMAT_RGB9_E5_FLOAT:
+ case MESA_FORMAT_R9G9B9E5_FLOAT:
return format == GL_RGB && type == GL_UNSIGNED_INT_5_9_9_9_REV &&
!swapBytes;
- case MESA_FORMAT_R11_G11_B10_FLOAT:
+ case MESA_FORMAT_R11G11B10_FLOAT:
return format == GL_RGB && type == GL_UNSIGNED_INT_10F_11F_11F_REV &&
!swapBytes;
case MESA_FORMAT_Z_FLOAT32:
return format == GL_DEPTH_COMPONENT && type == GL_FLOAT && !swapBytes;
- case MESA_FORMAT_Z32_FLOAT_X24S8:
+ case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
return format == GL_DEPTH_STENCIL &&
type == GL_FLOAT_32_UNSIGNED_INT_24_8_REV && !swapBytes;
- case MESA_FORMAT_XRGB4444_UNORM:
- case MESA_FORMAT_XRGB1555_UNORM:
- case MESA_FORMAT_XBGR8888_SNORM:
- case MESA_FORMAT_XBGR8888_SRGB:
+ case MESA_FORMAT_B4G4R4X4_UNORM:
+ case MESA_FORMAT_B5G5R5X1_UNORM:
+ case MESA_FORMAT_R8G8B8X8_SNORM:
+ case MESA_FORMAT_R8G8B8X8_SRGB:
case MESA_FORMAT_RGBX_UINT8:
case MESA_FORMAT_RGBX_SINT8:
- case MESA_FORMAT_XRGB2101010_UNORM:
+ case MESA_FORMAT_B10G10R10X2_UNORM:
case MESA_FORMAT_RGBX_UNORM16:
case MESA_FORMAT_RGBX_SNORM16:
case MESA_FORMAT_RGBX_FLOAT16:
case MESA_FORMAT_RGBX_SINT32:
return GL_FALSE;
- case MESA_FORMAT_ABGR2101010:
+ case MESA_FORMAT_R10G10B10A2_UNORM:
return format == GL_RGBA && type == GL_UNSIGNED_INT_2_10_10_10_REV &&
!swapBytes;
MESA_FORMAT_RGB_UNORM8, /* uchar[i * 3] = R, [i * 3 + 1] = G, [i *3 + 2] = B */
/* Type P formats */
- MESA_FORMAT_RGB565, /* RRRR RGGG GGGB BBBB */
- MESA_FORMAT_RGB565_REV, /* GGGB BBBB RRRR RGGG */
- MESA_FORMAT_ARGB4444, /* AAAA RRRR GGGG BBBB */
- MESA_FORMAT_ARGB4444_REV, /* GGGG BBBB AAAA RRRR */
- MESA_FORMAT_RGBA5551, /* RRRR RGGG GGBB BBBA */
- MESA_FORMAT_ARGB1555, /* ARRR RRGG GGGB BBBB */
- MESA_FORMAT_ARGB1555_REV, /* GGGB BBBB ARRR RRGG */
- MESA_FORMAT_AL44, /* AAAA LLLL */
- MESA_FORMAT_AL88, /* AAAA AAAA LLLL LLLL */
- MESA_FORMAT_AL88_REV, /* LLLL LLLL AAAA AAAA */
- MESA_FORMAT_AL1616, /* AAAA AAAA AAAA AAAA LLLL LLLL LLLL LLLL */
- MESA_FORMAT_AL1616_REV, /* LLLL LLLL LLLL LLLL AAAA AAAA AAAA AAAA */
- MESA_FORMAT_RGB332, /* RRRG GGBB */
+ MESA_FORMAT_B5G6R5_UNORM, /* BBBB BGGG GGGR RRRR */
+ MESA_FORMAT_R5G6B5_UNORM, /* RRRR RGGG GGGB BBBB */
+ MESA_FORMAT_B4G4R4A4_UNORM, /* BBBB GGGG RRRR AAAA */
+ MESA_FORMAT_A4R4G4B4_UNORM, /* AAAA RRRR GGGG BBBB */
+ MESA_FORMAT_A1B5G5R5_UNORM, /* ABBB BBGG GGGR RRRR */
+ MESA_FORMAT_B5G5R5A1_UNORM, /* BBBB BGGG GGRR RRRA */
+ MESA_FORMAT_A1R5G5B5_UNORM, /* ARRR RRGG GGGB BBBB */
+ MESA_FORMAT_L4A4_UNORM, /* LLLL AAAA */
+ MESA_FORMAT_L8A8_UNORM, /* LLLL LLLL AAAA AAAA */
+ MESA_FORMAT_A8L8_UNORM, /* AAAA AAAA LLLL LLLL */
+ MESA_FORMAT_L16A16_UNORM, /* LLLL LLLL LLLL LLLL AAAA AAAA AAAA AAAA */
+ MESA_FORMAT_A16L16_UNORM, /* AAAA AAAA AAAA AAAA LLLL LLLL LLLL LLLL */
+ MESA_FORMAT_B2G3R3_UNORM, /* BBGG GRRR */
/* Type A formats */
MESA_FORMAT_A_UNORM8, /* uchar[i] = A */
MESA_FORMAT_I_UNORM16, /* ushort[i] = I */
/* Type P formats */
- MESA_FORMAT_YCBCR, /* YYYY YYYY UorV UorV */
- MESA_FORMAT_YCBCR_REV, /* UorV UorV YYYY YYYY */
+ MESA_FORMAT_YCBCR, /* YYYY YYYY UorV UorV */
+ MESA_FORMAT_YCBCR_REV, /* UorV UorV YYYY YYYY */
/* Type A format(s) */
MESA_FORMAT_R_UNORM8, /* uchar[i] = R */
/* Type P formats */
- MESA_FORMAT_GR88, /* GGGG GGGG RRRR RRRR */
- MESA_FORMAT_RG88, /* RRRR RRRR GGGG GGGG */
+ MESA_FORMAT_R8G8_UNORM, /* RRRR RRRR GGGG GGGG */
+ MESA_FORMAT_G8R8_UNORM, /* GGGG GGGG RRRR RRRR */
/* Type A format(s) */
MESA_FORMAT_R_UNORM16, /* ushort[i] = R */
/* Type P formats */
- MESA_FORMAT_GR1616, /* GGGG GGGG GGGG GGGG RRRR RRRR RRRR RRRR */
- MESA_FORMAT_RG1616, /* RRRR RRRR RRRR RRRR GGGG GGGG GGGG GGGG */
- MESA_FORMAT_ARGB2101010, /* AARR RRRR RRRR GGGG GGGG GGBB BBBB BBBB */
- MESA_FORMAT_Z24_S8, /* ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ SSSS SSSS */
- MESA_FORMAT_S8_Z24, /* SSSS SSSS ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ */
+ MESA_FORMAT_R16G16_UNORM, /* RRRR RRRR RRRR RRRR GGGG GGGG GGGG GGGG */
+ MESA_FORMAT_G16R16_UNORM, /* GGGG GGGG GGGG GGGG RRRR RRRR RRRR RRRR */
+ MESA_FORMAT_B10G10R10A2_UNORM,/* BBBB BBBB BBGG GGGG GGGG RRRR RRRR RRAA */
+ MESA_FORMAT_S8_UINT_Z24_UNORM,/* SSSS SSSS ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ */
+ MESA_FORMAT_Z24_UNORM_X8_UINT,/* ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ xxxx xxxx */
/* Type A format(s) */
MESA_FORMAT_Z_UNORM16, /* ushort[i] = Z */
/* Type P formats */
- MESA_FORMAT_X8_Z24, /* xxxx xxxx ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ */
- MESA_FORMAT_Z24_X8, /* ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ xxxx xxxx */
+ MESA_FORMAT_Z24_UNORM_S8_UINT,/* ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ SSSS SSSS */
+ MESA_FORMAT_X8Z24_UNORM, /* xxxx xxxx ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ */
/* Type A formats */
MESA_FORMAT_Z_UNORM32, /* uint[i] = Z */
MESA_FORMAT_BGR_SRGB8, /* uchar[i * 3] = B, [i * 3 + 1] = G, [i *3 + 2] = R */
/* Type P formats */
- MESA_FORMAT_SRGBA8, /* RRRR RRRR GGGG GGGG BBBB BBBB AAAA AAAA */
- MESA_FORMAT_SARGB8, /* AAAA AAAA RRRR RRRR GGGG GGGG BBBB BBBB */
+ MESA_FORMAT_A8B8G8R8_SRGB, /* AAAA AAAA BBBB BBBB GGGG GGGG RRRR RRRR*/
+ MESA_FORMAT_B8G8R8A8_SRGB, /* BBBB BBBB GGGG GGGG RRRR RRRR AAAA AAAA */
/* Type A format(s) */
MESA_FORMAT_L_SRGB8, /* uchar[i] = L */
/* Type P formats */
- MESA_FORMAT_SLA8, /* AAAA AAAA LLLL LLLL */
+ MESA_FORMAT_L8A8_SRGB, /* LLLL LLLL AAAA AAAA */
/* Type C formats */
MESA_FORMAT_SRGB_DXT1,
MESA_FORMAT_RGB_UINT32,
MESA_FORMAT_RGBA_UINT32,
- /* msb <------ TEXEL BITS -----------> lsb */
- /* ---- ---- ---- ---- ---- ---- ---- ---- */
+ /* msb <------ TEXEL BITS -----------> lsb */
+ /* ---- ---- ---- ---- ---- ---- ---- ---- */
/**
* \name Signed fixed point texture formats.
*/
MESA_FORMAT_SIGNED_I16, /* IIII IIII IIII IIII */
/* Type P format(s) */
- MESA_FORMAT_RGB9_E5_FLOAT,
- MESA_FORMAT_R11_G11_B10_FLOAT,
+ MESA_FORMAT_R9G9B9E5_FLOAT,
+ MESA_FORMAT_R11G11B10_FLOAT,
/* Type A format(s) */
MESA_FORMAT_Z_FLOAT32,
/* Type P formats */
- MESA_FORMAT_Z32_FLOAT_X24S8,
+ MESA_FORMAT_Z32_FLOAT_S8X24_UINT,
- MESA_FORMAT_ARGB2101010_UINT,
- MESA_FORMAT_ABGR2101010_UINT,
+ MESA_FORMAT_B10G10R10A2_UINT,
+ MESA_FORMAT_R10G10B10A2_UINT,
- MESA_FORMAT_XRGB4444_UNORM, /* xxxx RRRR GGGG BBBB */
- MESA_FORMAT_XRGB1555_UNORM, /* xRRR RRGG GGGB BBBB */
- MESA_FORMAT_XBGR8888_SNORM, /* xxxx xxxx BBBB BBBB GGGG GGGG RRRR RRRR */
- MESA_FORMAT_XBGR8888_SRGB, /* xxxx xxxx BBBB BBBB GGGG GGGG RRRR RRRR */
+ MESA_FORMAT_B4G4R4X4_UNORM, /* BBBB GGGG RRRR xxxx */
+ MESA_FORMAT_B5G5R5X1_UNORM, /* BBBB BGGG GGRR RRRx */
+ MESA_FORMAT_R8G8B8X8_SNORM, /* RRRR RRRR GGGG GGGG BBBB BBBB xxxx xxxx */
+ MESA_FORMAT_R8G8B8X8_SRGB, /* RRRR RRRR GGGG GGGG BBBB BBBB xxxx xxxx */
/* Type A formats */
MESA_FORMAT_RGBX_UINT8, /* uchar[i * 4] = R, [i * 4 + 1] = G, [i * 4 + 2] = B, [i * 4 + 3] = x */
MESA_FORMAT_RGBX_SINT8, /* char[i * 4] = R, [i * 4 + 1] = G, [i * 4 + 2] = B, [i * 4 + 3] = x */
/* Type P format(s) */
- MESA_FORMAT_XRGB2101010_UNORM, /* xxRR RRRR RRRR GGGG GGGG GGBB BBBB BBBB */
+ MESA_FORMAT_B10G10R10X2_UNORM,/* xxRR RRRR RRRR GGGG GGGG GGBB BBBB BBBB */
- /* Type A format(s) */
+ /* Type A formats */
MESA_FORMAT_RGBX_UNORM16, /* ushort[i * 4] = R, [i * 4 + 1] = G, [i * 4 + 2] = B, [i * 4 + 3] = x */
MESA_FORMAT_RGBX_SNORM16, /* ... */
MESA_FORMAT_RGBX_FLOAT16, /* ... */
MESA_FORMAT_RGBX_SINT32, /* ... */
/* Type P formats */
- MESA_FORMAT_ABGR2101010,
+ MESA_FORMAT_R10G10B10A2_UNORM,
MESA_FORMAT_SIGNED_RG88,
MESA_FORMAT_SIGNED_RG1616,
if (format == MESA_FORMAT_B8G8R8A8_UNORM)
return GL_BGRA;
- else if (format == MESA_FORMAT_RGB565)
+ else if (format == MESA_FORMAT_B5G6R5_UNORM)
return GL_BGR;
switch (data_type) {
const GLenum format = ctx->ReadBuffer->_ColorReadBuffer->Format;
const GLenum data_type = _mesa_get_format_datatype(format);
- if (format == MESA_FORMAT_RGB565)
+ if (format == MESA_FORMAT_B5G6R5_UNORM)
return GL_UNSIGNED_SHORT_5_6_5_REV;
switch (data_type) {
if (rb != stencilRb)
return GL_FALSE;
- if (rb->Format != MESA_FORMAT_Z24_S8 &&
- rb->Format != MESA_FORMAT_S8_Z24)
+ if (rb->Format != MESA_FORMAT_S8_UINT_Z24_UNORM &&
+ rb->Format != MESA_FORMAT_Z24_UNORM_X8_UINT)
return GL_FALSE;
ctx->Driver.MapRenderbuffer(ctx, rb, x, y, width, height, GL_MAP_READ_BIT,
*/
#ifdef MESA_BIG_ENDIAN
# define MESA_FORMAT_RGBA_8 MESA_FORMAT_A8B8G8R8_UNORM
-# define MESA_FORMAT_RG_16 MESA_FORMAT_RG1616
-# define MESA_FORMAT_RG_8 MESA_FORMAT_RG88
+# define MESA_FORMAT_RG_16 MESA_FORMAT_G16R16_UNORM
+# define MESA_FORMAT_RG_8 MESA_FORMAT_G8R8_UNORM
# define MESA_FORMAT_SIGNED_RGBA_8 MESA_FORMAT_SIGNED_RGBA8888
# define MESA_FORMAT_SIGNED_RG_16 MESA_FORMAT_SIGNED_RG1616
# define MESA_FORMAT_SIGNED_RG_8 MESA_FORMAT_SIGNED_RG88
#else
# define MESA_FORMAT_RGBA_8 MESA_FORMAT_R8G8B8A8_UNORM
-# define MESA_FORMAT_RG_16 MESA_FORMAT_GR1616
-# define MESA_FORMAT_RG_8 MESA_FORMAT_GR88
+# define MESA_FORMAT_RG_16 MESA_FORMAT_R16G16_UNORM
+# define MESA_FORMAT_RG_8 MESA_FORMAT_R8G8_UNORM
# define MESA_FORMAT_SIGNED_RGBA_8 MESA_FORMAT_SIGNED_RGBA8888_REV
# define MESA_FORMAT_SIGNED_RG_16 MESA_FORMAT_SIGNED_GR1616
# define MESA_FORMAT_SIGNED_RG_8 MESA_FORMAT_SIGNED_RG88_REV
return MESA_FORMAT_RG_FLOAT16;
case GL_R11F_G11F_B10F:
- return MESA_FORMAT_R11_G11_B10_FLOAT;
+ return MESA_FORMAT_R11G11B10_FLOAT;
case GL_R32F:
return MESA_FORMAT_R_FLOAT32;
return MESA_FORMAT_RGBA_UINT16;
case GL_RGB10_A2UI:
- return MESA_FORMAT_ABGR2101010_UINT;
+ return MESA_FORMAT_R10G10B10A2_UINT;
case GL_RGBA8UI:
return MESA_FORMAT_RGBA_UINT8;
return MESA_FORMAT_RGBA_UNORM16;
case GL_RGB10_A2:
- return MESA_FORMAT_ABGR2101010;
+ return MESA_FORMAT_R10G10B10A2_UNORM;
case GL_RGBA8:
return MESA_FORMAT_RGBA_8;
case MESA_FORMAT_RG_FLOAT16:
return IMAGE_FORMAT_CLASS_2X16;
- case MESA_FORMAT_R11_G11_B10_FLOAT:
+ case MESA_FORMAT_R11G11B10_FLOAT:
return IMAGE_FORMAT_CLASS_10_11_11;
case MESA_FORMAT_R_FLOAT32:
case MESA_FORMAT_RGBA_UINT16:
return IMAGE_FORMAT_CLASS_4X16;
- case MESA_FORMAT_ABGR2101010_UINT:
+ case MESA_FORMAT_R10G10B10A2_UINT:
return IMAGE_FORMAT_CLASS_2_10_10_10;
case MESA_FORMAT_RGBA_UINT8:
case MESA_FORMAT_RGBA_UNORM16:
return IMAGE_FORMAT_CLASS_4X16;
- case MESA_FORMAT_ABGR2101010:
+ case MESA_FORMAT_R10G10B10A2_UNORM:
return IMAGE_FORMAT_CLASS_2_10_10_10;
case MESA_FORMAT_RGBA_8:
for (i = 0; i < bw; i++) {
etc2_rgb8_fetch_texel(&block, i, j, dst,
false /* punchthrough_alpha */);
- /* Convert to MESA_FORMAT_SARGB8 */
+ /* Convert to MESA_FORMAT_B8G8R8A8_SRGB */
tmp = dst[0];
dst[0] = dst[2];
dst[2] = tmp;
for (i = 0; i < bw; i++) {
etc2_rgba8_fetch_texel(&block, i, j, dst);
- /* Convert to MESA_FORMAT_SARGB8 */
+ /* Convert to MESA_FORMAT_B8G8R8A8_SRGB */
tmp = dst[0];
dst[0] = dst[2];
dst[2] = tmp;
for (i = 0; i < bw; i++) {
etc2_rgb8_fetch_texel(&block, i, j, dst,
true /* punchthrough_alpha */);
- /* Convert to MESA_FORMAT_SARGB8 */
+ /* Convert to MESA_FORMAT_B8G8R8A8_SRGB */
tmp = dst[0];
dst[0] = dst[2];
dst[2] = tmp;
case 4:
case GL_RGBA:
if (type == GL_UNSIGNED_SHORT_4_4_4_4_REV) {
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB4444);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B4G4R4A4_UNORM);
} else if (type == GL_UNSIGNED_SHORT_1_5_5_5_REV) {
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB1555);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B5G5R5A1_UNORM);
} else if (type == GL_UNSIGNED_INT_2_10_10_10_REV) {
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB2101010);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B10G10R10A2_UNORM);
}
RETURN_IF_SUPPORTED(MESA_FORMAT_A8B8G8R8_UNORM);
RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_UNORM);
RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_UNORM);
break;
case GL_RGB5_A1:
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB1555);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B5G5R5A1_UNORM);
break;
case GL_RGBA2:
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB4444_REV); /* just to test another format*/
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB4444);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_A4R4G4B4_UNORM); /* just to test another format*/
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B4G4R4A4_UNORM);
break;
case GL_RGBA4:
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB4444);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B4G4R4A4_UNORM);
break;
/* deep RGBA formats */
case GL_RGB10_A2:
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB2101010);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B10G10R10A2_UNORM);
RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_UNORM);
break;
case GL_RGBA12:
case 3:
case GL_RGB:
if (type == GL_UNSIGNED_INT_2_10_10_10_REV) {
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB2101010);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B10G10R10A2_UNORM);
}
/* fallthrough */
case GL_RGB8:
RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_UNORM);
break;
case GL_R3_G3_B2:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB332);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565_REV);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B2G3R3_UNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B5G6R5_UNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R5G6B5_UNORM);
RETURN_IF_SUPPORTED(MESA_FORMAT_BGR_UNORM8);
RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8X8_UNORM);
RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_UNORM);
break;
case GL_RGB4:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565_REV); /* just to test another format */
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R5G6B5_UNORM); /* just to test another format */
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B5G6R5_UNORM);
break;
case GL_RGB5:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B5G6R5_UNORM);
break;
/* deep RGB formats */
/* Luminance/Alpha formats */
case GL_LUMINANCE4_ALPHA4:
- RETURN_IF_SUPPORTED(MESA_FORMAT_AL44);
- RETURN_IF_SUPPORTED(MESA_FORMAT_AL88);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_L4A4_UNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_L8A8_UNORM);
break;
case 2:
case GL_LUMINANCE_ALPHA:
case GL_LUMINANCE6_ALPHA2:
case GL_LUMINANCE8_ALPHA8:
- RETURN_IF_SUPPORTED(MESA_FORMAT_AL88);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_L8A8_UNORM);
break;
case GL_LUMINANCE12_ALPHA4:
case GL_LUMINANCE12_ALPHA12:
case GL_LUMINANCE16_ALPHA16:
- RETURN_IF_SUPPORTED(MESA_FORMAT_AL1616);
- RETURN_IF_SUPPORTED(MESA_FORMAT_AL88);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_L16A16_UNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_L8A8_UNORM);
break;
case GL_INTENSITY:
case GL_DEPTH_COMPONENT24:
case GL_DEPTH_COMPONENT32:
RETURN_IF_SUPPORTED(MESA_FORMAT_Z_UNORM32);
- RETURN_IF_SUPPORTED(MESA_FORMAT_X8_Z24);
- RETURN_IF_SUPPORTED(MESA_FORMAT_S8_Z24);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_Z24_UNORM_S8_UINT);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_Z24_UNORM_X8_UINT);
break;
case GL_DEPTH_COMPONENT16:
RETURN_IF_SUPPORTED(MESA_FORMAT_Z_UNORM16);
- RETURN_IF_SUPPORTED(MESA_FORMAT_X8_Z24);
- RETURN_IF_SUPPORTED(MESA_FORMAT_S8_Z24);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_Z24_UNORM_S8_UINT);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_Z24_UNORM_X8_UINT);
break;
case GL_COMPRESSED_ALPHA_ARB:
RETURN_IF_SUPPORTED(MESA_FORMAT_L_UNORM8);
break;
case GL_COMPRESSED_LUMINANCE_ALPHA_ARB:
- RETURN_IF_SUPPORTED(MESA_FORMAT_AL88);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_L8A8_UNORM);
break;
case GL_COMPRESSED_INTENSITY_ARB:
RETURN_IF_SUPPORTED(MESA_FORMAT_I_UNORM8);
break;
case GL_RGB565:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B5G6R5_UNORM);
break;
case GL_YCBCR_MESA:
case GL_RGB9_E5:
/* GL_EXT_texture_shared_exponent -- just one format to support */
- ASSERT(ctx->TextureFormatSupported[MESA_FORMAT_RGB9_E5_FLOAT]);
- return MESA_FORMAT_RGB9_E5_FLOAT;
+ ASSERT(ctx->TextureFormatSupported[MESA_FORMAT_R9G9B9E5_FLOAT]);
+ return MESA_FORMAT_R9G9B9E5_FLOAT;
case GL_R11F_G11F_B10F:
/* GL_EXT_texture_packed_float -- just one format to support */
- ASSERT(ctx->TextureFormatSupported[MESA_FORMAT_R11_G11_B10_FLOAT]);
- return MESA_FORMAT_R11_G11_B10_FLOAT;
+ ASSERT(ctx->TextureFormatSupported[MESA_FORMAT_R11G11B10_FLOAT]);
+ return MESA_FORMAT_R11G11B10_FLOAT;
case GL_DEPTH_STENCIL_EXT:
case GL_DEPTH24_STENCIL8_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_Z24_S8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_S8_Z24);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_S8_UINT_Z24_UNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_Z24_UNORM_X8_UINT);
break;
case GL_DEPTH_COMPONENT32F:
ASSERT(ctx->TextureFormatSupported[MESA_FORMAT_Z_FLOAT32]);
return MESA_FORMAT_Z_FLOAT32;
case GL_DEPTH32F_STENCIL8:
- ASSERT(ctx->TextureFormatSupported[MESA_FORMAT_Z32_FLOAT_X24S8]);
- return MESA_FORMAT_Z32_FLOAT_X24S8;
+ ASSERT(ctx->TextureFormatSupported[MESA_FORMAT_Z32_FLOAT_S8X24_UINT]);
+ return MESA_FORMAT_Z32_FLOAT_S8X24_UINT;
case GL_DUDV_ATI:
case GL_DU8DV8_ATI:
case GL_SRGB_EXT:
case GL_SRGB8_EXT:
RETURN_IF_SUPPORTED(MESA_FORMAT_BGR_SRGB8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_SRGB);
break;
case GL_SRGB_ALPHA_EXT:
case GL_SRGB8_ALPHA8_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SRGBA8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_A8B8G8R8_SRGB);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_SRGB);
break;
case GL_SLUMINANCE_EXT:
case GL_SLUMINANCE8_EXT:
RETURN_IF_SUPPORTED(MESA_FORMAT_L_SRGB8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_SRGB);
break;
case GL_SLUMINANCE_ALPHA_EXT:
case GL_SLUMINANCE8_ALPHA8_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SLA8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_L8A8_SRGB);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_SRGB);
break;
case GL_COMPRESSED_SLUMINANCE_EXT:
RETURN_IF_SUPPORTED(MESA_FORMAT_L_SRGB8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_SRGB);
break;
case GL_COMPRESSED_SLUMINANCE_ALPHA_EXT:
- RETURN_IF_SUPPORTED(MESA_FORMAT_SLA8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_L8A8_SRGB);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_SRGB);
break;
case GL_COMPRESSED_SRGB_EXT:
if (ctx->Mesa_DXTn)
RETURN_IF_SUPPORTED(MESA_FORMAT_SRGB_DXT1);
RETURN_IF_SUPPORTED(MESA_FORMAT_BGR_SRGB8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_SRGB);
break;
case GL_COMPRESSED_SRGB_ALPHA_EXT:
if (ctx->Mesa_DXTn)
RETURN_IF_SUPPORTED(MESA_FORMAT_SRGBA_DXT3); /* Not srgba_dxt1, see spec */
- RETURN_IF_SUPPORTED(MESA_FORMAT_SRGBA8);
- RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_A8B8G8R8_SRGB);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_SRGB);
break;
case GL_ALPHA8UI_EXT:
case GL_RG:
case GL_RG8:
- RETURN_IF_SUPPORTED(MESA_FORMAT_GR88);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R8G8_UNORM);
break;
case GL_COMPRESSED_RG:
if (target != GL_TEXTURE_1D && target != GL_TEXTURE_1D_ARRAY)
RETURN_IF_SUPPORTED(MESA_FORMAT_RG_RGTC2);
- RETURN_IF_SUPPORTED(MESA_FORMAT_GR88);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R8G8_UNORM);
break;
case GL_RG16:
- RETURN_IF_SUPPORTED(MESA_FORMAT_GR1616);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R16G16_UNORM);
break;
case GL_R16F:
break;
case GL_RGB10_A2UI:
- RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB2101010_UINT);
- RETURN_IF_SUPPORTED(MESA_FORMAT_ABGR2101010_UINT);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_B10G10R10A2_UINT);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R10G10B10A2_UINT);
break;
case GL_BGRA:
case GL_LUMINANCE32UI_EXT:
return MESA_FORMAT_LUMINANCE_UINT32;
case GL_LUMINANCE8_ALPHA8:
- return MESA_FORMAT_AL88;
+ return MESA_FORMAT_L8A8_UNORM;
case GL_LUMINANCE16_ALPHA16:
- return MESA_FORMAT_AL1616;
+ return MESA_FORMAT_L16A16_UNORM;
case GL_LUMINANCE_ALPHA16F_ARB:
return MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16;
case GL_LUMINANCE_ALPHA32F_ARB:
return MESA_FORMAT_RGBA_UINT32;
case GL_RG8:
- return MESA_FORMAT_GR88;
+ return MESA_FORMAT_R8G8_UNORM;
case GL_RG16:
- return MESA_FORMAT_GR1616;
+ return MESA_FORMAT_R16G16_UNORM;
case GL_RG16F:
return MESA_FORMAT_RG_FLOAT16;
case GL_RG32F:
if (ctx->Version < 30 &&
!ctx->Extensions.EXT_texture_shared_exponent)
goto invalid_pname;
- *params = texFormat == MESA_FORMAT_RGB9_E5_FLOAT ? 5 : 0;
+ *params = texFormat == MESA_FORMAT_R9G9B9E5_FLOAT ? 5 : 0;
break;
/* GL_ARB_texture_compression */
const GLuint depthScale = 0xffffff;
(void) dims;
- ASSERT(dstFormat == MESA_FORMAT_X8_Z24);
+ ASSERT(dstFormat == MESA_FORMAT_Z24_UNORM_S8_UINT);
{
/* general path */
const GLuint depthScale = 0xffffff;
(void) dims;
- ASSERT(dstFormat == MESA_FORMAT_Z24_X8);
+ ASSERT(dstFormat == MESA_FORMAT_X8Z24_UNORM);
{
/* general path */
static GLboolean
_mesa_texstore_rgb565(TEXSTORE_PARAMS)
{
- ASSERT(dstFormat == MESA_FORMAT_RGB565 ||
- dstFormat == MESA_FORMAT_RGB565_REV);
+ ASSERT(dstFormat == MESA_FORMAT_B5G6R5_UNORM ||
+ dstFormat == MESA_FORMAT_R5G6B5_UNORM);
ASSERT(_mesa_get_format_bytes(dstFormat) == 2);
if (!ctx->_ImageTransferState &&
const GLubyte *srcUB = (const GLubyte *) src;
GLushort *dstUS = (GLushort *) dst;
/* check for byteswapped format */
- if (dstFormat == MESA_FORMAT_RGB565) {
+ if (dstFormat == MESA_FORMAT_B5G6R5_UNORM) {
for (col = 0; col < srcWidth; col++) {
dstUS[col] = PACK_COLOR_565( srcUB[0], srcUB[1], srcUB[2] );
srcUB += 3;
static GLboolean
_mesa_texstore_argb2101010(TEXSTORE_PARAMS)
{
- ASSERT(dstFormat == MESA_FORMAT_ARGB2101010 ||
- dstFormat == MESA_FORMAT_XRGB2101010_UNORM);
+ ASSERT(dstFormat == MESA_FORMAT_B10G10R10A2_UNORM ||
+ dstFormat == MESA_FORMAT_B10G10R10X2_UNORM);
ASSERT(_mesa_get_format_bytes(dstFormat) == 4);
{
{
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
- ASSERT(dstFormat == MESA_FORMAT_AL44);
+ ASSERT(dstFormat == MESA_FORMAT_L4A4_UNORM);
ASSERT(_mesa_get_format_bytes(dstFormat) == 1);
{
const GLboolean littleEndian = _mesa_little_endian();
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
- ASSERT(dstFormat == MESA_FORMAT_AL88 ||
- dstFormat == MESA_FORMAT_AL88_REV ||
- dstFormat == MESA_FORMAT_GR88 ||
- dstFormat == MESA_FORMAT_RG88);
+ ASSERT(dstFormat == MESA_FORMAT_L8A8_UNORM ||
+ dstFormat == MESA_FORMAT_A8L8_UNORM ||
+ dstFormat == MESA_FORMAT_R8G8_UNORM ||
+ dstFormat == MESA_FORMAT_G8R8_UNORM);
ASSERT(_mesa_get_format_bytes(dstFormat) == 2);
if (!ctx->_ImageTransferState &&
/* dstmap - how to swizzle from RGBA to dst format:
*/
- if (dstFormat == MESA_FORMAT_AL88 || dstFormat == MESA_FORMAT_AL88_REV) {
- if ((littleEndian && dstFormat == MESA_FORMAT_AL88) ||
- (!littleEndian && dstFormat == MESA_FORMAT_AL88_REV)) {
+ if (dstFormat == MESA_FORMAT_L8A8_UNORM || dstFormat == MESA_FORMAT_A8L8_UNORM) {
+ if ((littleEndian && dstFormat == MESA_FORMAT_L8A8_UNORM) ||
+ (!littleEndian && dstFormat == MESA_FORMAT_A8L8_UNORM)) {
dstmap[0] = 0;
dstmap[1] = 3;
}
}
}
else {
- if ((littleEndian && dstFormat == MESA_FORMAT_GR88) ||
- (!littleEndian && dstFormat == MESA_FORMAT_RG88)) {
+ if ((littleEndian && dstFormat == MESA_FORMAT_R8G8_UNORM) ||
+ (!littleEndian && dstFormat == MESA_FORMAT_G8R8_UNORM)) {
dstmap[0] = 0;
dstmap[1] = 1;
}
GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
GLushort *dstUS = (GLushort *) dstRow;
- if (dstFormat == MESA_FORMAT_AL88 ||
- dstFormat == MESA_FORMAT_GR88) {
+ if (dstFormat == MESA_FORMAT_L8A8_UNORM ||
+ dstFormat == MESA_FORMAT_R8G8_UNORM) {
for (col = 0; col < srcWidth; col++) {
/* src[0] is luminance (or R), src[1] is alpha (or G) */
dstUS[col] = PACK_COLOR_88( src[1],
{
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
- ASSERT(dstFormat == MESA_FORMAT_AL1616 ||
- dstFormat == MESA_FORMAT_AL1616_REV ||
- dstFormat == MESA_FORMAT_GR1616 ||
- dstFormat == MESA_FORMAT_RG1616);
+ ASSERT(dstFormat == MESA_FORMAT_L16A16_UNORM ||
+ dstFormat == MESA_FORMAT_A16L16_UNORM ||
+ dstFormat == MESA_FORMAT_R16G16_UNORM ||
+ dstFormat == MESA_FORMAT_G16R16_UNORM);
ASSERT(_mesa_get_format_bytes(dstFormat) == 4);
{
GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
GLuint *dstUI = (GLuint *) dstRow;
- if (dstFormat == MESA_FORMAT_AL1616 ||
- dstFormat == MESA_FORMAT_GR1616) {
+ if (dstFormat == MESA_FORMAT_L16A16_UNORM ||
+ dstFormat == MESA_FORMAT_R16G16_UNORM) {
for (col = 0; col < srcWidth; col++) {
GLushort l, a;
/**
* Store a texture in MESA_FORMAT_SIGNED_RGBX8888 or
- * MESA_FORMAT_XBGR8888_SNORM.
+ * MESA_FORMAT_R8G8B8X8_SNORM.
*/
static GLboolean
_mesa_texstore_signed_rgbx8888(TEXSTORE_PARAMS)
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
ASSERT(dstFormat == MESA_FORMAT_SIGNED_RGBX8888 ||
- dstFormat == MESA_FORMAT_XBGR8888_SNORM);
+ dstFormat == MESA_FORMAT_R8G8B8X8_SNORM);
ASSERT(_mesa_get_format_bytes(dstFormat) == 4);
{
= _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType);
GLint img, row;
- ASSERT(dstFormat == MESA_FORMAT_Z24_S8);
+ ASSERT(dstFormat == MESA_FORMAT_S8_UINT_Z24_UNORM);
ASSERT(srcFormat == GL_DEPTH_STENCIL_EXT ||
srcFormat == GL_DEPTH_COMPONENT ||
srcFormat == GL_STENCIL_INDEX);
GLuint *depth;
GLubyte *stencil;
- ASSERT(dstFormat == MESA_FORMAT_S8_Z24);
+ ASSERT(dstFormat == MESA_FORMAT_Z24_UNORM_X8_UINT);
ASSERT(srcFormat == GL_DEPTH_STENCIL_EXT ||
srcFormat == GL_DEPTH_COMPONENT ||
srcFormat == GL_STENCIL_INDEX);
mesa_format newDstFormat;
GLboolean k;
- ASSERT(dstFormat == MESA_FORMAT_SRGBA8 ||
- dstFormat == MESA_FORMAT_XBGR8888_SRGB);
+ ASSERT(dstFormat == MESA_FORMAT_A8B8G8R8_SRGB ||
+ dstFormat == MESA_FORMAT_R8G8B8X8_SRGB);
/* reuse normal rgba texstore code */
- if (dstFormat == MESA_FORMAT_SRGBA8) {
+ if (dstFormat == MESA_FORMAT_A8B8G8R8_SRGB) {
newDstFormat = MESA_FORMAT_A8B8G8R8_UNORM;
}
- else if (dstFormat == MESA_FORMAT_XBGR8888_SRGB) {
+ else if (dstFormat == MESA_FORMAT_R8G8B8X8_SRGB) {
newDstFormat = MESA_FORMAT_R8G8B8X8_UNORM;
}
else {
mesa_format newDstFormat;
GLboolean k;
- ASSERT(dstFormat == MESA_FORMAT_SARGB8);
+ ASSERT(dstFormat == MESA_FORMAT_B8G8R8A8_SRGB);
/* reuse normal rgba texstore code */
newDstFormat = MESA_FORMAT_B8G8R8A8_UNORM;
mesa_format newDstFormat;
GLboolean k;
- ASSERT(dstFormat == MESA_FORMAT_SLA8);
+ ASSERT(dstFormat == MESA_FORMAT_L8A8_SRGB);
/* reuse normal luminance/alpha texstore code */
- newDstFormat = MESA_FORMAT_AL88;
+ newDstFormat = MESA_FORMAT_L8A8_UNORM;
k = _mesa_texstore_unorm88(ctx, dims, baseInternalFormat,
newDstFormat,
{
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
- ASSERT(dstFormat == MESA_FORMAT_RGB9_E5_FLOAT);
+ ASSERT(dstFormat == MESA_FORMAT_R9G9B9E5_FLOAT);
ASSERT(baseInternalFormat == GL_RGB);
{
{
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
- ASSERT(dstFormat == MESA_FORMAT_R11_G11_B10_FLOAT);
+ ASSERT(dstFormat == MESA_FORMAT_R11G11B10_FLOAT);
ASSERT(baseInternalFormat == GL_RGB);
{
static GLboolean
_mesa_texstore_z32f_x24s8(TEXSTORE_PARAMS)
{
- ASSERT(dstFormat == MESA_FORMAT_Z32_FLOAT_X24S8);
+ ASSERT(dstFormat == MESA_FORMAT_Z32_FLOAT_S8X24_UINT);
ASSERT(srcFormat == GL_DEPTH_STENCIL ||
srcFormat == GL_DEPTH_COMPONENT ||
srcFormat == GL_STENCIL_INDEX);
{
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
- ASSERT(dstFormat == MESA_FORMAT_ARGB2101010_UINT);
+ ASSERT(dstFormat == MESA_FORMAT_B10G10R10A2_UINT);
ASSERT(_mesa_get_format_bytes(dstFormat) == 4);
{
{
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
- ASSERT(dstFormat == MESA_FORMAT_ABGR2101010_UINT);
+ ASSERT(dstFormat == MESA_FORMAT_R10G10B10A2_UINT);
ASSERT(_mesa_get_format_bytes(dstFormat) == 4);
{
{
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
- ASSERT(dstFormat == MESA_FORMAT_ABGR2101010);
+ ASSERT(dstFormat == MESA_FORMAT_R10G10B10A2_UNORM);
ASSERT(_mesa_get_format_bytes(dstFormat) == 4);
{
table[MESA_FORMAT_X8R8G8B8_UNORM] = _mesa_texstore_argb8888;
table[MESA_FORMAT_BGR_UNORM8] = _mesa_texstore_rgb888;
table[MESA_FORMAT_RGB_UNORM8] = _mesa_texstore_bgr888;
- table[MESA_FORMAT_RGB565] = _mesa_texstore_rgb565;
- table[MESA_FORMAT_RGB565_REV] = _mesa_texstore_rgb565;
- table[MESA_FORMAT_ARGB4444] = store_ubyte_texture;
- table[MESA_FORMAT_ARGB4444_REV] = store_ubyte_texture;
- table[MESA_FORMAT_RGBA5551] = store_ubyte_texture;
- table[MESA_FORMAT_ARGB1555] = store_ubyte_texture;
- table[MESA_FORMAT_ARGB1555_REV] = store_ubyte_texture;
- table[MESA_FORMAT_AL44] = _mesa_texstore_unorm44;
- table[MESA_FORMAT_AL88] = _mesa_texstore_unorm88;
- table[MESA_FORMAT_AL88_REV] = _mesa_texstore_unorm88;
- table[MESA_FORMAT_AL1616] = _mesa_texstore_unorm1616;
- table[MESA_FORMAT_AL1616_REV] = _mesa_texstore_unorm1616;
- table[MESA_FORMAT_RGB332] = store_ubyte_texture;
+ table[MESA_FORMAT_B5G6R5_UNORM] = _mesa_texstore_rgb565;
+ table[MESA_FORMAT_R5G6B5_UNORM] = _mesa_texstore_rgb565;
+ table[MESA_FORMAT_B4G4R4A4_UNORM] = store_ubyte_texture;
+ table[MESA_FORMAT_A4R4G4B4_UNORM] = store_ubyte_texture;
+ table[MESA_FORMAT_A1B5G5R5_UNORM] = store_ubyte_texture;
+ table[MESA_FORMAT_B5G5R5A1_UNORM] = store_ubyte_texture;
+ table[MESA_FORMAT_A1R5G5B5_UNORM] = store_ubyte_texture;
+ table[MESA_FORMAT_L4A4_UNORM] = _mesa_texstore_unorm44;
+ table[MESA_FORMAT_L8A8_UNORM] = _mesa_texstore_unorm88;
+ table[MESA_FORMAT_A8L8_UNORM] = _mesa_texstore_unorm88;
+ table[MESA_FORMAT_L16A16_UNORM] = _mesa_texstore_unorm1616;
+ table[MESA_FORMAT_A16L16_UNORM] = _mesa_texstore_unorm1616;
+ table[MESA_FORMAT_B2G3R3_UNORM] = store_ubyte_texture;
table[MESA_FORMAT_A_UNORM8] = _mesa_texstore_unorm8;
table[MESA_FORMAT_A_UNORM16] = _mesa_texstore_unorm16;
table[MESA_FORMAT_L_UNORM8] = _mesa_texstore_unorm8;
table[MESA_FORMAT_YCBCR] = _mesa_texstore_ycbcr;
table[MESA_FORMAT_YCBCR_REV] = _mesa_texstore_ycbcr;
table[MESA_FORMAT_R_UNORM8] = _mesa_texstore_unorm8;
- table[MESA_FORMAT_GR88] = _mesa_texstore_unorm88;
- table[MESA_FORMAT_RG88] = _mesa_texstore_unorm88;
+ table[MESA_FORMAT_R8G8_UNORM] = _mesa_texstore_unorm88;
+ table[MESA_FORMAT_G8R8_UNORM] = _mesa_texstore_unorm88;
table[MESA_FORMAT_R_UNORM16] = _mesa_texstore_unorm16;
- table[MESA_FORMAT_GR1616] = _mesa_texstore_unorm1616;
- table[MESA_FORMAT_RG1616] = _mesa_texstore_unorm1616;
- table[MESA_FORMAT_ARGB2101010] = _mesa_texstore_argb2101010;
- table[MESA_FORMAT_Z24_S8] = _mesa_texstore_z24_s8;
- table[MESA_FORMAT_S8_Z24] = _mesa_texstore_s8_z24;
+ table[MESA_FORMAT_R16G16_UNORM] = _mesa_texstore_unorm1616;
+ table[MESA_FORMAT_G16R16_UNORM] = _mesa_texstore_unorm1616;
+ table[MESA_FORMAT_B10G10R10A2_UNORM] = _mesa_texstore_argb2101010;
+ table[MESA_FORMAT_S8_UINT_Z24_UNORM] = _mesa_texstore_z24_s8;
+ table[MESA_FORMAT_Z24_UNORM_X8_UINT] = _mesa_texstore_s8_z24;
table[MESA_FORMAT_Z_UNORM16] = _mesa_texstore_z16;
- table[MESA_FORMAT_X8_Z24] = _mesa_texstore_x8_z24;
- table[MESA_FORMAT_Z24_X8] = _mesa_texstore_z24_x8;
+ table[MESA_FORMAT_Z24_UNORM_S8_UINT] = _mesa_texstore_x8_z24;
+ table[MESA_FORMAT_X8Z24_UNORM] = _mesa_texstore_z24_x8;
table[MESA_FORMAT_Z_UNORM32] = _mesa_texstore_z32;
table[MESA_FORMAT_S_UINT8] = _mesa_texstore_s8;
table[MESA_FORMAT_BGR_SRGB8] = _mesa_texstore_srgb8;
- table[MESA_FORMAT_SRGBA8] = _mesa_texstore_srgba8;
- table[MESA_FORMAT_SARGB8] = _mesa_texstore_sargb8;
+ table[MESA_FORMAT_A8B8G8R8_SRGB] = _mesa_texstore_srgba8;
+ table[MESA_FORMAT_B8G8R8A8_SRGB] = _mesa_texstore_sargb8;
table[MESA_FORMAT_L_SRGB8] = _mesa_texstore_sl8;
- table[MESA_FORMAT_SLA8] = _mesa_texstore_sla8;
+ table[MESA_FORMAT_L8A8_SRGB] = _mesa_texstore_sla8;
table[MESA_FORMAT_SRGB_DXT1] = _mesa_texstore_rgb_dxt1;
table[MESA_FORMAT_SRGBA_DXT1] = _mesa_texstore_rgba_dxt1;
table[MESA_FORMAT_SRGBA_DXT3] = _mesa_texstore_rgba_dxt3;
table[MESA_FORMAT_SIGNED_L16] = _mesa_texstore_snorm16;
table[MESA_FORMAT_SIGNED_AL1616] = _mesa_texstore_snorm1616;
table[MESA_FORMAT_SIGNED_I16] = _mesa_texstore_snorm16;
- table[MESA_FORMAT_RGB9_E5_FLOAT] = _mesa_texstore_rgb9_e5;
- table[MESA_FORMAT_R11_G11_B10_FLOAT] = _mesa_texstore_r11_g11_b10f;
+ table[MESA_FORMAT_R9G9B9E5_FLOAT] = _mesa_texstore_rgb9_e5;
+ table[MESA_FORMAT_R11G11B10_FLOAT] = _mesa_texstore_r11_g11_b10f;
table[MESA_FORMAT_Z_FLOAT32] = _mesa_texstore_z32;
- table[MESA_FORMAT_Z32_FLOAT_X24S8] = _mesa_texstore_z32f_x24s8;
+ table[MESA_FORMAT_Z32_FLOAT_S8X24_UINT] = _mesa_texstore_z32f_x24s8;
table[MESA_FORMAT_ALPHA_UINT8] = _mesa_texstore_rgba_uint8;
table[MESA_FORMAT_ALPHA_UINT16] = _mesa_texstore_rgba_uint16;
table[MESA_FORMAT_RGB_UINT32] = _mesa_texstore_rgba_uint32;
table[MESA_FORMAT_RGBA_UINT32] = _mesa_texstore_rgba_uint32;
- table[MESA_FORMAT_ARGB2101010_UINT] = _mesa_texstore_argb2101010_uint;
- table[MESA_FORMAT_ABGR2101010_UINT] = _mesa_texstore_abgr2101010_uint;
+ table[MESA_FORMAT_B10G10R10A2_UINT] = _mesa_texstore_argb2101010_uint;
+ table[MESA_FORMAT_R10G10B10A2_UINT] = _mesa_texstore_abgr2101010_uint;
- table[MESA_FORMAT_XRGB4444_UNORM] = store_ubyte_texture;
- table[MESA_FORMAT_XRGB1555_UNORM] = store_ubyte_texture;
- table[MESA_FORMAT_XBGR8888_SNORM] = _mesa_texstore_signed_rgbx8888;
- table[MESA_FORMAT_XBGR8888_SRGB] = _mesa_texstore_srgba8;
+ table[MESA_FORMAT_B4G4R4X4_UNORM] = store_ubyte_texture;
+ table[MESA_FORMAT_B5G5R5X1_UNORM] = store_ubyte_texture;
+ table[MESA_FORMAT_R8G8B8X8_SNORM] = _mesa_texstore_signed_rgbx8888;
+ table[MESA_FORMAT_R8G8B8X8_SRGB] = _mesa_texstore_srgba8;
table[MESA_FORMAT_RGBX_UINT8] = _mesa_texstore_rgba_uint8;
table[MESA_FORMAT_RGBX_SINT8] = _mesa_texstore_rgba_int8;
- table[MESA_FORMAT_XRGB2101010_UNORM] = _mesa_texstore_argb2101010;
+ table[MESA_FORMAT_B10G10R10X2_UNORM] = _mesa_texstore_argb2101010;
table[MESA_FORMAT_RGBX_UNORM16] = _mesa_texstore_rgba_16;
table[MESA_FORMAT_RGBX_SNORM16] = _mesa_texstore_signed_rgba_16;
table[MESA_FORMAT_RGBX_FLOAT16] = _mesa_texstore_rgba_float16;
table[MESA_FORMAT_RGBX_UINT32] = _mesa_texstore_rgba_uint32;
table[MESA_FORMAT_RGBX_SINT32] = _mesa_texstore_rgba_int32;
- table[MESA_FORMAT_ABGR2101010] = _mesa_texstore_abgr2101010;
+ table[MESA_FORMAT_R10G10B10A2_UNORM] = _mesa_texstore_abgr2101010;
table[MESA_FORMAT_SIGNED_RG88] = _mesa_texstore_snorm88;
table[MESA_FORMAT_SIGNED_RG1616] = _mesa_texstore_snorm1616;
return PIPE_FORMAT_BGRX8888_UNORM;
case MESA_FORMAT_X8R8G8B8_UNORM:
return PIPE_FORMAT_XRGB8888_UNORM;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
return PIPE_FORMAT_B5G5R5A1_UNORM;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
return PIPE_FORMAT_B4G4R4A4_UNORM;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
return PIPE_FORMAT_B5G6R5_UNORM;
- case MESA_FORMAT_RGB332:
+ case MESA_FORMAT_B2G3R3_UNORM:
return PIPE_FORMAT_B2G3R3_UNORM;
- case MESA_FORMAT_ARGB2101010:
+ case MESA_FORMAT_B10G10R10A2_UNORM:
return PIPE_FORMAT_B10G10R10A2_UNORM;
- case MESA_FORMAT_AL44:
+ case MESA_FORMAT_L4A4_UNORM:
return PIPE_FORMAT_L4A4_UNORM;
- case MESA_FORMAT_AL88:
+ case MESA_FORMAT_L8A8_UNORM:
return PIPE_FORMAT_L8A8_UNORM;
- case MESA_FORMAT_AL1616:
+ case MESA_FORMAT_L16A16_UNORM:
return PIPE_FORMAT_L16A16_UNORM;
case MESA_FORMAT_A_UNORM8:
return PIPE_FORMAT_A8_UNORM;
return PIPE_FORMAT_Z16_UNORM;
case MESA_FORMAT_Z_UNORM32:
return PIPE_FORMAT_Z32_UNORM;
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
return PIPE_FORMAT_S8_UINT_Z24_UNORM;
- case MESA_FORMAT_S8_Z24:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
return PIPE_FORMAT_Z24_UNORM_S8_UINT;
- case MESA_FORMAT_Z24_X8:
+ case MESA_FORMAT_X8Z24_UNORM:
return PIPE_FORMAT_X8Z24_UNORM;
- case MESA_FORMAT_X8_Z24:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
return PIPE_FORMAT_Z24X8_UNORM;
case MESA_FORMAT_S_UINT8:
return PIPE_FORMAT_S8_UINT;
case MESA_FORMAT_Z_FLOAT32:
return PIPE_FORMAT_Z32_FLOAT;
- case MESA_FORMAT_Z32_FLOAT_X24S8:
+ case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
return PIPE_FORMAT_Z32_FLOAT_S8X24_UINT;
case MESA_FORMAT_YCBCR:
return PIPE_FORMAT_UYVY;
return PIPE_FORMAT_DXT3_SRGBA;
case MESA_FORMAT_SRGBA_DXT5:
return PIPE_FORMAT_DXT5_SRGBA;
- case MESA_FORMAT_SLA8:
+ case MESA_FORMAT_L8A8_SRGB:
return PIPE_FORMAT_L8A8_SRGB;
case MESA_FORMAT_L_SRGB8:
return PIPE_FORMAT_L8_SRGB;
case MESA_FORMAT_BGR_SRGB8:
return PIPE_FORMAT_R8G8B8_SRGB;
- case MESA_FORMAT_SRGBA8:
+ case MESA_FORMAT_A8B8G8R8_SRGB:
return PIPE_FORMAT_A8B8G8R8_SRGB;
- case MESA_FORMAT_SARGB8:
+ case MESA_FORMAT_B8G8R8A8_SRGB:
return PIPE_FORMAT_B8G8R8A8_SRGB;
case MESA_FORMAT_RGBA_FLOAT32:
return PIPE_FORMAT_R32G32B32A32_FLOAT;
return PIPE_FORMAT_R8_UNORM;
case MESA_FORMAT_R_UNORM16:
return PIPE_FORMAT_R16_UNORM;
- case MESA_FORMAT_GR88:
+ case MESA_FORMAT_R8G8_UNORM:
return PIPE_FORMAT_R8G8_UNORM;
- case MESA_FORMAT_GR1616:
+ case MESA_FORMAT_R16G16_UNORM:
return PIPE_FORMAT_R16G16_UNORM;
case MESA_FORMAT_RGBA_UNORM16:
return PIPE_FORMAT_R16G16B16A16_UNORM;
case MESA_FORMAT_SIGNED_I16:
return PIPE_FORMAT_I16_SNORM;
- case MESA_FORMAT_RGB9_E5_FLOAT:
+ case MESA_FORMAT_R9G9B9E5_FLOAT:
return PIPE_FORMAT_R9G9B9E5_FLOAT;
- case MESA_FORMAT_R11_G11_B10_FLOAT:
+ case MESA_FORMAT_R11G11B10_FLOAT:
return PIPE_FORMAT_R11G11B10_FLOAT;
- case MESA_FORMAT_ARGB2101010_UINT:
+ case MESA_FORMAT_B10G10R10A2_UINT:
return PIPE_FORMAT_B10G10R10A2_UINT;
- case MESA_FORMAT_ABGR2101010_UINT:
+ case MESA_FORMAT_R10G10B10A2_UINT:
return PIPE_FORMAT_R10G10B10A2_UINT;
- case MESA_FORMAT_XRGB4444_UNORM:
+ case MESA_FORMAT_B4G4R4X4_UNORM:
return PIPE_FORMAT_B4G4R4X4_UNORM;
- case MESA_FORMAT_XRGB1555_UNORM:
+ case MESA_FORMAT_B5G5R5X1_UNORM:
return PIPE_FORMAT_B5G5R5X1_UNORM;
- case MESA_FORMAT_XBGR8888_SNORM:
+ case MESA_FORMAT_R8G8B8X8_SNORM:
return PIPE_FORMAT_R8G8B8X8_SNORM;
- case MESA_FORMAT_XBGR8888_SRGB:
+ case MESA_FORMAT_R8G8B8X8_SRGB:
return PIPE_FORMAT_R8G8B8X8_SRGB;
case MESA_FORMAT_RGBX_UINT8:
return PIPE_FORMAT_R8G8B8X8_UINT;
case MESA_FORMAT_RGBX_SINT8:
return PIPE_FORMAT_R8G8B8X8_SINT;
- case MESA_FORMAT_XRGB2101010_UNORM:
+ case MESA_FORMAT_B10G10R10X2_UNORM:
return PIPE_FORMAT_B10G10R10X2_UNORM;
case MESA_FORMAT_RGBX_UNORM16:
return PIPE_FORMAT_R16G16B16X16_UNORM;
case PIPE_FORMAT_XRGB8888_UNORM:
return MESA_FORMAT_X8R8G8B8_UNORM;
case PIPE_FORMAT_B5G5R5A1_UNORM:
- return MESA_FORMAT_ARGB1555;
+ return MESA_FORMAT_B5G5R5A1_UNORM;
case PIPE_FORMAT_B4G4R4A4_UNORM:
- return MESA_FORMAT_ARGB4444;
+ return MESA_FORMAT_B4G4R4A4_UNORM;
case PIPE_FORMAT_B5G6R5_UNORM:
- return MESA_FORMAT_RGB565;
+ return MESA_FORMAT_B5G6R5_UNORM;
case PIPE_FORMAT_B2G3R3_UNORM:
- return MESA_FORMAT_RGB332;
+ return MESA_FORMAT_B2G3R3_UNORM;
case PIPE_FORMAT_B10G10R10A2_UNORM:
- return MESA_FORMAT_ARGB2101010;
+ return MESA_FORMAT_B10G10R10A2_UNORM;
case PIPE_FORMAT_L4A4_UNORM:
- return MESA_FORMAT_AL44;
+ return MESA_FORMAT_L4A4_UNORM;
case PIPE_FORMAT_L8A8_UNORM:
- return MESA_FORMAT_AL88;
+ return MESA_FORMAT_L8A8_UNORM;
case PIPE_FORMAT_L16A16_UNORM:
- return MESA_FORMAT_AL1616;
+ return MESA_FORMAT_L16A16_UNORM;
case PIPE_FORMAT_A8_UNORM:
return MESA_FORMAT_A_UNORM8;
case PIPE_FORMAT_A16_UNORM:
case PIPE_FORMAT_Z32_UNORM:
return MESA_FORMAT_Z_UNORM32;
case PIPE_FORMAT_S8_UINT_Z24_UNORM:
- return MESA_FORMAT_Z24_S8;
+ return MESA_FORMAT_S8_UINT_Z24_UNORM;
case PIPE_FORMAT_X8Z24_UNORM:
- return MESA_FORMAT_Z24_X8;
+ return MESA_FORMAT_X8Z24_UNORM;
case PIPE_FORMAT_Z24X8_UNORM:
- return MESA_FORMAT_X8_Z24;
+ return MESA_FORMAT_Z24_UNORM_S8_UINT;
case PIPE_FORMAT_Z24_UNORM_S8_UINT:
- return MESA_FORMAT_S8_Z24;
+ return MESA_FORMAT_Z24_UNORM_X8_UINT;
case PIPE_FORMAT_Z32_FLOAT:
return MESA_FORMAT_Z_FLOAT32;
case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
- return MESA_FORMAT_Z32_FLOAT_X24S8;
+ return MESA_FORMAT_Z32_FLOAT_S8X24_UINT;
case PIPE_FORMAT_UYVY:
return MESA_FORMAT_YCBCR;
case PIPE_FORMAT_DXT5_SRGBA:
return MESA_FORMAT_SRGBA_DXT5;
case PIPE_FORMAT_L8A8_SRGB:
- return MESA_FORMAT_SLA8;
+ return MESA_FORMAT_L8A8_SRGB;
case PIPE_FORMAT_L8_SRGB:
return MESA_FORMAT_L_SRGB8;
case PIPE_FORMAT_R8G8B8_SRGB:
return MESA_FORMAT_BGR_SRGB8;
case PIPE_FORMAT_A8B8G8R8_SRGB:
- return MESA_FORMAT_SRGBA8;
+ return MESA_FORMAT_A8B8G8R8_SRGB;
case PIPE_FORMAT_B8G8R8A8_SRGB:
- return MESA_FORMAT_SARGB8;
+ return MESA_FORMAT_B8G8R8A8_SRGB;
case PIPE_FORMAT_R32G32B32A32_FLOAT:
return MESA_FORMAT_RGBA_FLOAT32;
case PIPE_FORMAT_R16G16B16A16_FLOAT:
case PIPE_FORMAT_R16_UNORM:
return MESA_FORMAT_R_UNORM16;
case PIPE_FORMAT_R8G8_UNORM:
- return MESA_FORMAT_GR88;
+ return MESA_FORMAT_R8G8_UNORM;
case PIPE_FORMAT_R16G16_UNORM:
- return MESA_FORMAT_GR1616;
+ return MESA_FORMAT_R16G16_UNORM;
case PIPE_FORMAT_A8_UINT:
return MESA_FORMAT_ALPHA_UINT8;
return MESA_FORMAT_SIGNED_I16;
case PIPE_FORMAT_R9G9B9E5_FLOAT:
- return MESA_FORMAT_RGB9_E5_FLOAT;
+ return MESA_FORMAT_R9G9B9E5_FLOAT;
case PIPE_FORMAT_R11G11B10_FLOAT:
- return MESA_FORMAT_R11_G11_B10_FLOAT;
+ return MESA_FORMAT_R11G11B10_FLOAT;
case PIPE_FORMAT_B10G10R10A2_UINT:
- return MESA_FORMAT_ARGB2101010_UINT;
+ return MESA_FORMAT_B10G10R10A2_UINT;
case PIPE_FORMAT_R10G10B10A2_UINT:
- return MESA_FORMAT_ABGR2101010_UINT;
+ return MESA_FORMAT_R10G10B10A2_UINT;
case PIPE_FORMAT_B4G4R4X4_UNORM:
- return MESA_FORMAT_XRGB4444_UNORM;
+ return MESA_FORMAT_B4G4R4X4_UNORM;
case PIPE_FORMAT_B5G5R5X1_UNORM:
- return MESA_FORMAT_XRGB1555_UNORM;
+ return MESA_FORMAT_B5G5R5X1_UNORM;
case PIPE_FORMAT_R8G8B8X8_SNORM:
- return MESA_FORMAT_XBGR8888_SNORM;
+ return MESA_FORMAT_R8G8B8X8_SNORM;
case PIPE_FORMAT_R8G8B8X8_SRGB:
- return MESA_FORMAT_XBGR8888_SRGB;
+ return MESA_FORMAT_R8G8B8X8_SRGB;
case PIPE_FORMAT_R8G8B8X8_UINT:
return MESA_FORMAT_RGBX_UINT8;
case PIPE_FORMAT_R8G8B8X8_SINT:
return MESA_FORMAT_RGBX_SINT8;
case PIPE_FORMAT_B10G10R10X2_UNORM:
- return MESA_FORMAT_XRGB2101010_UNORM;
+ return MESA_FORMAT_B10G10R10X2_UNORM;
case PIPE_FORMAT_R16G16B16X16_UNORM:
return MESA_FORMAT_RGBX_UNORM16;
case PIPE_FORMAT_R16G16B16X16_SNORM:
* masking for things like DEPTH copies of Z24S8.
*/
if (readRb->Format == MESA_FORMAT_Z_FLOAT32 ||
- readRb->Format == MESA_FORMAT_Z32_FLOAT_X24S8) {
+ readRb->Format == MESA_FORMAT_Z32_FLOAT_S8X24_UINT) {
mode = UNPACK_Z_FLOAT;
} else {
mode = UNPACK_Z_INT;
height = ctx->DrawBuffer->_Ymax - ctx->DrawBuffer->_Ymin;
mapMode = GL_MAP_WRITE_BIT;
- if (rb->Format == MESA_FORMAT_S8_Z24 ||
- rb->Format == MESA_FORMAT_X8_Z24 ||
- rb->Format == MESA_FORMAT_Z24_S8 ||
- rb->Format == MESA_FORMAT_Z24_X8) {
+ if (rb->Format == MESA_FORMAT_Z24_UNORM_X8_UINT ||
+ rb->Format == MESA_FORMAT_Z24_UNORM_S8_UINT ||
+ rb->Format == MESA_FORMAT_S8_UINT_Z24_UNORM ||
+ rb->Format == MESA_FORMAT_X8Z24_UNORM) {
mapMode |= GL_MAP_READ_BIT;
}
}
}
break;
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_X8_Z24:
- case MESA_FORMAT_Z24_S8:
- case MESA_FORMAT_Z24_X8:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
+ case MESA_FORMAT_X8Z24_UNORM:
{
GLfloat clear = (GLfloat) ctx->Depth.Clear;
GLuint clearVal = 0;
GLuint mask;
- if (rb->Format == MESA_FORMAT_S8_Z24 ||
- rb->Format == MESA_FORMAT_X8_Z24)
+ if (rb->Format == MESA_FORMAT_Z24_UNORM_X8_UINT ||
+ rb->Format == MESA_FORMAT_Z24_UNORM_S8_UINT)
mask = 0xff000000;
else
mask = 0xff;
}
break;
- case MESA_FORMAT_Z32_FLOAT_X24S8:
+ case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
/* XXX untested */
{
GLfloat clearVal = (GLfloat) ctx->Depth.Clear;
}
switch (rb->Format) {
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
{
GLfloat zClear = (GLfloat) ctx->Depth.Clear;
GLuint clear = 0, mask;
_mesa_pack_float_z_row(rb->Format, 1, &zClear, &clear);
- if (rb->Format == MESA_FORMAT_S8_Z24) {
+ if (rb->Format == MESA_FORMAT_Z24_UNORM_X8_UINT) {
mask = ((~writeMask) & 0xff) << 24;
clear |= (ctx->Stencil.Clear & writeMask & 0xff) << 24;
}
}
}
break;
- case MESA_FORMAT_Z32_FLOAT_X24S8:
+ case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
/* XXX untested */
{
const GLfloat zClear = (GLfloat) ctx->Depth.Clear;
/**
- * Draw depth+stencil values into a MESA_FORAMT_Z24_S8 or MESA_FORMAT_S8_Z24
+ * Draw depth+stencil values into a MESA_FORAMT_Z24_S8 or MESA_FORMAT_Z24_UNORM_X8_UINT
* renderbuffer. No masking, zooming, scaling, etc.
*/
static void
ASSERT(stencilRb);
if (depthRb == stencilRb &&
- (depthRb->Format == MESA_FORMAT_Z24_S8 ||
- depthRb->Format == MESA_FORMAT_S8_Z24) &&
+ (depthRb->Format == MESA_FORMAT_S8_UINT_Z24_UNORM ||
+ depthRb->Format == MESA_FORMAT_Z24_UNORM_X8_UINT) &&
type == GL_UNSIGNED_INT_24_8 &&
!scaleOrBias &&
!zoom &&
rb->Format = MESA_FORMAT_Z_UNORM16;
break;
case GL_DEPTH_COMPONENT24:
- rb->Format = MESA_FORMAT_X8_Z24;
+ rb->Format = MESA_FORMAT_Z24_UNORM_S8_UINT;
break;
case GL_DEPTH_COMPONENT32:
rb->Format = MESA_FORMAT_Z_UNORM32;
break;
case GL_DEPTH_STENCIL_EXT:
case GL_DEPTH24_STENCIL8_EXT:
- rb->Format = MESA_FORMAT_Z24_S8;
+ rb->Format = MESA_FORMAT_S8_UINT_Z24_UNORM;
break;
default:
/* unsupported format */
}
}
break;
- case MESA_FORMAT_S8_Z24:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
{
GLuint clear = (ctx->Stencil.Clear & writeMask & 0xff) << 24;
GLuint mask = (((~writeMask) & 0xff) << 24) | 0xffffff;
}
}
break;
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
{
GLuint clear = ctx->Stencil.Clear & writeMask & 0xff;
GLuint mask = 0xffffff00 | ((~writeMask) & 0xff);
fetch_texel_3d_f_bgr888
},
{
- MESA_FORMAT_RGB565,
+ MESA_FORMAT_B5G6R5_UNORM,
fetch_texel_1d_f_rgb565,
fetch_texel_2d_f_rgb565,
fetch_texel_3d_f_rgb565
},
{
- MESA_FORMAT_RGB565_REV,
+ MESA_FORMAT_R5G6B5_UNORM,
fetch_texel_1d_f_rgb565_rev,
fetch_texel_2d_f_rgb565_rev,
fetch_texel_3d_f_rgb565_rev
},
{
- MESA_FORMAT_ARGB4444,
+ MESA_FORMAT_B4G4R4A4_UNORM,
fetch_texel_1d_f_argb4444,
fetch_texel_2d_f_argb4444,
fetch_texel_3d_f_argb4444
},
{
- MESA_FORMAT_ARGB4444_REV,
+ MESA_FORMAT_A4R4G4B4_UNORM,
fetch_texel_1d_f_argb4444_rev,
fetch_texel_2d_f_argb4444_rev,
fetch_texel_3d_f_argb4444_rev
},
{
- MESA_FORMAT_RGBA5551,
+ MESA_FORMAT_A1B5G5R5_UNORM,
fetch_texel_1d_f_rgba5551,
fetch_texel_2d_f_rgba5551,
fetch_texel_3d_f_rgba5551
},
{
- MESA_FORMAT_ARGB1555,
+ MESA_FORMAT_B5G5R5A1_UNORM,
fetch_texel_1d_f_argb1555,
fetch_texel_2d_f_argb1555,
fetch_texel_3d_f_argb1555
},
{
- MESA_FORMAT_ARGB1555_REV,
+ MESA_FORMAT_A1R5G5B5_UNORM,
fetch_texel_1d_f_argb1555_rev,
fetch_texel_2d_f_argb1555_rev,
fetch_texel_3d_f_argb1555_rev
},
{
- MESA_FORMAT_AL44,
+ MESA_FORMAT_L4A4_UNORM,
fetch_texel_1d_f_al44,
fetch_texel_2d_f_al44,
fetch_texel_3d_f_al44
},
{
- MESA_FORMAT_AL88,
+ MESA_FORMAT_L8A8_UNORM,
fetch_texel_1d_f_al88,
fetch_texel_2d_f_al88,
fetch_texel_3d_f_al88
},
{
- MESA_FORMAT_AL88_REV,
+ MESA_FORMAT_A8L8_UNORM,
fetch_texel_1d_f_al88_rev,
fetch_texel_2d_f_al88_rev,
fetch_texel_3d_f_al88_rev
},
{
- MESA_FORMAT_AL1616,
+ MESA_FORMAT_L16A16_UNORM,
fetch_texel_1d_f_al1616,
fetch_texel_2d_f_al1616,
fetch_texel_3d_f_al1616
},
{
- MESA_FORMAT_AL1616_REV,
+ MESA_FORMAT_A16L16_UNORM,
fetch_texel_1d_f_al1616_rev,
fetch_texel_2d_f_al1616_rev,
fetch_texel_3d_f_al1616_rev
},
{
- MESA_FORMAT_RGB332,
+ MESA_FORMAT_B2G3R3_UNORM,
fetch_texel_1d_f_rgb332,
fetch_texel_2d_f_rgb332,
fetch_texel_3d_f_rgb332
fetch_texel_3d_f_r8
},
{
- MESA_FORMAT_GR88,
+ MESA_FORMAT_R8G8_UNORM,
fetch_texel_1d_f_gr88,
fetch_texel_2d_f_gr88,
fetch_texel_3d_f_gr88
},
{
- MESA_FORMAT_RG88,
+ MESA_FORMAT_G8R8_UNORM,
fetch_texel_1d_f_rg88,
fetch_texel_2d_f_rg88,
fetch_texel_3d_f_rg88
fetch_texel_3d_f_r16
},
{
- MESA_FORMAT_GR1616,
+ MESA_FORMAT_R16G16_UNORM,
fetch_texel_1d_f_rg1616,
fetch_texel_2d_f_rg1616,
fetch_texel_3d_f_rg1616
},
{
- MESA_FORMAT_RG1616,
+ MESA_FORMAT_G16R16_UNORM,
fetch_texel_1d_f_rg1616_rev,
fetch_texel_2d_f_rg1616_rev,
fetch_texel_3d_f_rg1616_rev
},
{
- MESA_FORMAT_ARGB2101010,
+ MESA_FORMAT_B10G10R10A2_UNORM,
fetch_texel_1d_f_argb2101010,
fetch_texel_2d_f_argb2101010,
fetch_texel_3d_f_argb2101010
},
{
- MESA_FORMAT_Z24_S8,
+ MESA_FORMAT_S8_UINT_Z24_UNORM,
fetch_texel_1d_f_z24_s8,
fetch_texel_2d_f_z24_s8,
fetch_texel_3d_f_z24_s8
},
{
- MESA_FORMAT_S8_Z24,
+ MESA_FORMAT_Z24_UNORM_X8_UINT,
fetch_texel_1d_f_s8_z24,
fetch_texel_2d_f_s8_z24,
fetch_texel_3d_f_s8_z24
fetch_texel_3d_f_z16
},
{
- MESA_FORMAT_X8_Z24,
+ MESA_FORMAT_Z24_UNORM_S8_UINT,
fetch_texel_1d_f_s8_z24,
fetch_texel_2d_f_s8_z24,
fetch_texel_3d_f_s8_z24
},
{
- MESA_FORMAT_Z24_X8,
+ MESA_FORMAT_X8Z24_UNORM,
fetch_texel_1d_f_z24_s8,
fetch_texel_2d_f_z24_s8,
fetch_texel_3d_f_z24_s8
fetch_texel_3d_srgb8
},
{
- MESA_FORMAT_SRGBA8,
+ MESA_FORMAT_A8B8G8R8_SRGB,
fetch_texel_1d_srgba8,
fetch_texel_2d_srgba8,
fetch_texel_3d_srgba8
},
{
- MESA_FORMAT_SARGB8,
+ MESA_FORMAT_B8G8R8A8_SRGB,
fetch_texel_1d_sargb8,
fetch_texel_2d_sargb8,
fetch_texel_3d_sargb8
fetch_texel_3d_sl8
},
{
- MESA_FORMAT_SLA8,
+ MESA_FORMAT_L8A8_SRGB,
fetch_texel_1d_sla8,
fetch_texel_2d_sla8,
fetch_texel_3d_sla8
fetch_texel_3d_signed_i16
},
{
- MESA_FORMAT_RGB9_E5_FLOAT,
+ MESA_FORMAT_R9G9B9E5_FLOAT,
fetch_texel_1d_rgb9_e5,
fetch_texel_2d_rgb9_e5,
fetch_texel_3d_rgb9_e5
},
{
- MESA_FORMAT_R11_G11_B10_FLOAT,
+ MESA_FORMAT_R11G11B10_FLOAT,
fetch_texel_1d_r11_g11_b10f,
fetch_texel_2d_r11_g11_b10f,
fetch_texel_3d_r11_g11_b10f
fetch_texel_3d_f_r_f32
},
{
- MESA_FORMAT_Z32_FLOAT_X24S8,
+ MESA_FORMAT_Z32_FLOAT_S8X24_UINT,
fetch_texel_1d_z32f_x24s8,
fetch_texel_2d_z32f_x24s8,
fetch_texel_3d_z32f_x24s8
},
{
- MESA_FORMAT_ARGB2101010_UINT,
+ MESA_FORMAT_B10G10R10A2_UINT,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_ABGR2101010_UINT,
+ MESA_FORMAT_R10G10B10A2_UINT,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_XRGB4444_UNORM,
+ MESA_FORMAT_B4G4R4X4_UNORM,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_XRGB1555_UNORM,
+ MESA_FORMAT_B5G5R5X1_UNORM,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_XBGR8888_SNORM,
+ MESA_FORMAT_R8G8B8X8_SNORM,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_XBGR8888_SRGB,
+ MESA_FORMAT_R8G8B8X8_SRGB,
NULL,
NULL,
NULL
NULL
},
{
- MESA_FORMAT_XRGB2101010_UNORM,
+ MESA_FORMAT_B10G10R10X2_UNORM,
NULL,
NULL,
NULL
NULL
},
{
- MESA_FORMAT_ABGR2101010,
+ MESA_FORMAT_R10G10B10A2_UNORM,
NULL,
NULL,
NULL
/* use color expansion like (g << 2) | (g >> 4) (does somewhat random rounding)
instead of slow (g << 2) * 255 / 252 (always rounds down) */
-/* MESA_FORMAT_RGB565 ********************************************************/
+/* MESA_FORMAT_B5G6R5_UNORM ********************************************************/
/* Fetch texel from 1D, 2D or 3D rgb565 texture, return 4 GLchans */
static void FETCH(f_rgb565)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_RGB565_REV ****************************************************/
+/* MESA_FORMAT_R5G6B5_UNORM ****************************************************/
/* Fetch texel from 1D, 2D or 3D rgb565_rev texture, return 4 GLchans */
static void FETCH(f_rgb565_rev)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_ARGB4444 ******************************************************/
+/* MESA_FORMAT_B4G4R4A4_UNORM ******************************************************/
/* Fetch texel from 1D, 2D or 3D argb444 texture, return 4 GLchans */
static void FETCH(f_argb4444)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_ARGB4444_REV **************************************************/
+/* MESA_FORMAT_A4R4G4B4_UNORM **************************************************/
/* Fetch texel from 1D, 2D or 3D argb4444_rev texture, return 4 GLchans */
static void FETCH(f_argb4444_rev)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_RGBA5551 ******************************************************/
+/* MESA_FORMAT_A1B5G5R5_UNORM ******************************************************/
/* Fetch texel from 1D, 2D or 3D argb1555 texture, return 4 GLchans */
static void FETCH(f_rgba5551)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_ARGB1555 ******************************************************/
+/* MESA_FORMAT_B5G5R5A1_UNORM ******************************************************/
/* Fetch texel from 1D, 2D or 3D argb1555 texture, return 4 GLchans */
static void FETCH(f_argb1555)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_ARGB1555_REV **************************************************/
+/* MESA_FORMAT_A1R5G5B5_UNORM **************************************************/
/* Fetch texel from 1D, 2D or 3D argb1555_rev texture, return 4 GLchans */
static void FETCH(f_argb1555_rev)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_ARGB2101010 ***************************************************/
+/* MESA_FORMAT_B10G10R10A2_UNORM ***************************************************/
/* Fetch texel from 1D, 2D or 3D argb2101010 texture, return 4 GLchans */
static void FETCH(f_argb2101010)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_GR88 **********************************************************/
+/* MESA_FORMAT_R8G8_UNORM **********************************************************/
/* Fetch texel from 1D, 2D or 3D rg88 texture, return 4 GLchans */
static void FETCH(f_gr88)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_RG88 ******************************************************/
+/* MESA_FORMAT_G8R8_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,
-/* MESA_FORMAT_AL44 **********************************************************/
+/* MESA_FORMAT_L4A4_UNORM **********************************************************/
/* Fetch texel from 1D, 2D or 3D al44 texture, return 4 GLchans */
static void FETCH(f_al44)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_AL88 **********************************************************/
+/* MESA_FORMAT_L8A8_UNORM **********************************************************/
/* Fetch texel from 1D, 2D or 3D al88 texture, return 4 GLchans */
static void FETCH(f_al88)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_AL88_REV ******************************************************/
+/* MESA_FORMAT_A8L8_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,
-/* MESA_FORMAT_GR1616 ********************************************************/
+/* MESA_FORMAT_R16G16_UNORM ********************************************************/
/* Fetch texel from 1D, 2D or 3D rg1616 texture, return 4 GLchans */
static void FETCH(f_rg1616)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_RG1616 ****************************************************/
+/* MESA_FORMAT_G16R16_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,
-/* MESA_FORMAT_AL1616 ********************************************************/
+/* MESA_FORMAT_L16A16_UNORM ********************************************************/
/* Fetch texel from 1D, 2D or 3D al1616 texture, return 4 GLchans */
static void FETCH(f_al1616)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_AL1616_REV ****************************************************/
+/* MESA_FORMAT_A16L16_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,
-/* MESA_FORMAT_RGB332 ********************************************************/
+/* MESA_FORMAT_B2G3R3_UNORM ********************************************************/
/* Fetch texel from 1D, 2D or 3D rgb332 texture, return 4 GLchans */
static void FETCH(f_rgb332)( const struct swrast_texture_image *texImage,
const GLuint *src = TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
const GLdouble scale = 1.0 / (GLdouble) 0xffffff;
texel[0] = (GLfloat) (((*src) >> 8) * scale);
- ASSERT(texImage->Base.TexFormat == MESA_FORMAT_Z24_S8 ||
- texImage->Base.TexFormat == MESA_FORMAT_Z24_X8);
+ ASSERT(texImage->Base.TexFormat == MESA_FORMAT_S8_UINT_Z24_UNORM ||
+ texImage->Base.TexFormat == MESA_FORMAT_X8Z24_UNORM);
ASSERT(texel[0] >= 0.0F);
ASSERT(texel[0] <= 1.0F);
}
const GLuint *src = TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
const GLdouble scale = 1.0 / (GLdouble) 0xffffff;
texel[0] = (GLfloat) (((*src) & 0x00ffffff) * scale);
- ASSERT(texImage->Base.TexFormat == MESA_FORMAT_S8_Z24 ||
- texImage->Base.TexFormat == MESA_FORMAT_X8_Z24);
+ ASSERT(texImage->Base.TexFormat == MESA_FORMAT_Z24_UNORM_X8_UINT ||
+ texImage->Base.TexFormat == MESA_FORMAT_Z24_UNORM_S8_UINT);
ASSERT(texel[0] >= 0.0F);
ASSERT(texel[0] <= 1.0F);
}
-/* MESA_FORMAT_R11_G11_B10_FLOAT *********************************************/
+/* MESA_FORMAT_R11G11B10_FLOAT *********************************************/
static void FETCH(r11_g11_b10f)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
-/* MESA_FORMAT_Z32_FLOAT_X24S8 ***********************************************/
+/* MESA_FORMAT_Z32_FLOAT_S8X24_UINT ***********************************************/
static void FETCH(z32f_x24s8)(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel)