memset(&texTemp, 0, sizeof(texTemp));
texTemp.target = PIPE_TEXTURE_2D;
- texTemp.format = PIPE_FORMAT_U_A8; /* XXX verify supported by driver! */
+ texTemp.format = PIPE_FORMAT_A8_UNORM; /* XXX verify supported by driver! */
texTemp.last_level = MAX_TEXTURE_LEVEL;
texTemp.width[0] = 1 << MAX_TEXTURE_LEVEL;
texTemp.height[0] = 1 << MAX_TEXTURE_LEVEL;
memset(&texTemp, 0, sizeof(texTemp));
texTemp.target = PIPE_TEXTURE_2D;
- texTemp.format = PIPE_FORMAT_U_A8; /* XXX verify supported by driver! */
+ texTemp.format = PIPE_FORMAT_A8_UNORM; /* XXX verify supported by driver! */
texTemp.last_level = 0;
texTemp.width[0] = 32;
texTemp.height[0] = 32;
-/*** PIPE_FORMAT_U_L8 ***/
+/*** PIPE_FORMAT_L8_UNORM ***/
static void
l8_get_tile_rgba(ubyte *src,
}
-/*** PIPE_FORMAT_U_A8 ***/
+/*** PIPE_FORMAT_A8_UNORM ***/
static void
a8_get_tile_rgba(ubyte *src,
-/*** PIPE_FORMAT_U_I8 ***/
+/*** PIPE_FORMAT_I8_UNORM ***/
static void
i8_get_tile_rgba(ubyte *src,
}
-/*** PIPE_FORMAT_U_A8_L8 ***/
+/*** PIPE_FORMAT_A8L8_UNORM ***/
static void
a8_l8_get_tile_rgba(ushort *src,
case PIPE_FORMAT_R5G6B5_UNORM:
r5g6b5_get_tile_rgba((ushort *) packed, w, h, p, dst_stride);
break;
- case PIPE_FORMAT_U_L8:
+ case PIPE_FORMAT_L8_UNORM:
l8_get_tile_rgba((ubyte *) packed, w, h, p, dst_stride);
break;
- case PIPE_FORMAT_U_A8:
+ case PIPE_FORMAT_A8_UNORM:
a8_get_tile_rgba((ubyte *) packed, w, h, p, dst_stride);
break;
- case PIPE_FORMAT_U_I8:
+ case PIPE_FORMAT_I8_UNORM:
i8_get_tile_rgba((ubyte *) packed, w, h, p, dst_stride);
break;
- case PIPE_FORMAT_U_A8_L8:
+ case PIPE_FORMAT_A8L8_UNORM:
a8_l8_get_tile_rgba((ushort *) packed, w, h, p, dst_stride);
break;
case PIPE_FORMAT_R16G16B16A16_SNORM:
break;
case PIPE_FORMAT_R8G8B8A8_UNORM:
break;
- case PIPE_FORMAT_U_L8:
+ case PIPE_FORMAT_L8_UNORM:
/*l8_put_tile_rgba((ubyte *) packed, w, h, p, src_stride);*/
break;
- case PIPE_FORMAT_U_A8:
+ case PIPE_FORMAT_A8_UNORM:
/*a8_put_tile_rgba((ubyte *) packed, w, h, p, src_stride);*/
break;
- case PIPE_FORMAT_U_I8:
+ case PIPE_FORMAT_I8_UNORM:
/*i8_put_tile_rgba((ubyte *) packed, w, h, p, src_stride);*/
break;
- case PIPE_FORMAT_U_A8_L8:
+ case PIPE_FORMAT_A8L8_UNORM:
/*a8_l8_put_tile_rgba((ushort *) packed, w, h, p, src_stride);*/
break;
case PIPE_FORMAT_R16G16B16A16_SNORM:
*datatype = USHORT_5_6_5;
*comps = 3;
return;
- case PIPE_FORMAT_U_L8:
- case PIPE_FORMAT_U_A8:
- case PIPE_FORMAT_U_I8:
+ case PIPE_FORMAT_L8_UNORM:
+ case PIPE_FORMAT_A8_UNORM:
+ case PIPE_FORMAT_I8_UNORM:
*datatype = UBYTE;
*comps = 1;
return;
- case PIPE_FORMAT_U_A8_L8:
+ case PIPE_FORMAT_A8L8_UNORM:
*datatype = UBYTE;
*comps = 2;
return;
PIPE_FORMAT_R8G8B8A8_UNORM,
PIPE_FORMAT_A8R8G8B8_UNORM,
PIPE_FORMAT_R5G6B5_UNORM,
- PIPE_FORMAT_U_L8,
- PIPE_FORMAT_U_A8,
- PIPE_FORMAT_U_I8,
- PIPE_FORMAT_U_A8_L8,
+ PIPE_FORMAT_L8_UNORM,
+ PIPE_FORMAT_A8_UNORM,
+ PIPE_FORMAT_I8_UNORM,
+ PIPE_FORMAT_A8L8_UNORM,
PIPE_FORMAT_YCBCR,
PIPE_FORMAT_YCBCR_REV,
PIPE_FORMAT_S8Z24_UNORM,
translate_texture_format(enum pipe_format pipeFormat)
{
switch (pipeFormat) {
- case PIPE_FORMAT_U_L8:
+ case PIPE_FORMAT_L8_UNORM:
return MAPSURF_8BIT | MT_8BIT_L8;
- case PIPE_FORMAT_U_I8:
+ case PIPE_FORMAT_I8_UNORM:
return MAPSURF_8BIT | MT_8BIT_I8;
- case PIPE_FORMAT_U_A8:
+ case PIPE_FORMAT_A8_UNORM:
return MAPSURF_8BIT | MT_8BIT_A8;
- case PIPE_FORMAT_U_A8_L8:
+ case PIPE_FORMAT_A8L8_UNORM:
return MAPSURF_16BIT | MT_16BIT_AY88;
case PIPE_FORMAT_R5G6B5_UNORM:
return MAPSURF_16BIT | MT_16BIT_RGB565;
#if 0
/* XXX: This is broken -- rewrite if still needed. */
static const unsigned tex_supported[] = {
- PIPE_FORMAT_U_R8_G8_B8_A8,
- PIPE_FORMAT_U_A8_R8_G8_B8,
- PIPE_FORMAT_U_R5_G6_B5,
- PIPE_FORMAT_U_L8,
- PIPE_FORMAT_U_A8,
- PIPE_FORMAT_U_I8,
- PIPE_FORMAT_U_L8_A8,
+ PIPE_FORMAT_R8G8B8A8_UNORM,
+ PIPE_FORMAT_A8R8G8B8_UNORM,
+ PIPE_FORMAT_R5G6B5_UNORM,
+ PIPE_FORMAT_L8_UNORM,
+ PIPE_FORMAT_A8_UNORM,
+ PIPE_FORMAT_I8_UNORM,
+ PIPE_FORMAT_L8A8_UNORM,
PIPE_FORMAT_YCBCR,
PIPE_FORMAT_YCBCR_REV,
PIPE_FORMAT_S8_Z24,
/* Actually a lot more than this - add later:
*/
static const unsigned render_supported[] = {
- PIPE_FORMAT_U_A8_R8_G8_B8,
- PIPE_FORMAT_U_R5_G6_B5,
+ PIPE_FORMAT_A8R8G8B8_UNORM,
+ PIPE_FORMAT_R5G6B5_UNORM,
};
/*
*/
static const unsigned z_stencil_supported[] = {
- PIPE_FORMAT_U_Z16,
- PIPE_FORMAT_U_Z32,
- PIPE_FORMAT_S8_Z24,
+ PIPE_FORMAT_Z16_UNORM,
+ PIPE_FORMAT_Z32_UNORM,
+ PIPE_FORMAT_S8Z24_UNORM,
};
switch (type) {
static unsigned translate_tex_format( enum pipe_format pipe_format )
{
switch( pipe_format ) {
- case PIPE_FORMAT_U_L8:
+ case PIPE_FORMAT_L8_UNORM:
return BRW_SURFACEFORMAT_L8_UNORM;
- case PIPE_FORMAT_U_I8:
+ case PIPE_FORMAT_I8_UNORM:
return BRW_SURFACEFORMAT_I8_UNORM;
- case PIPE_FORMAT_U_A8:
+ case PIPE_FORMAT_A8_UNORM:
return BRW_SURFACEFORMAT_A8_UNORM;
- case PIPE_FORMAT_U_A8_L8:
+ case PIPE_FORMAT_A8L8_UNORM:
return BRW_SURFACEFORMAT_L8A8_UNORM;
case PIPE_FORMAT_R8G8B8_UNORM:
st->bitmap.rasterizer.bypass_vs = 1;
/* find a usable texture format */
- if (screen->is_format_supported(screen, PIPE_FORMAT_U_I8, PIPE_TEXTURE)) {
- st->bitmap.tex_format = PIPE_FORMAT_U_I8;
+ if (screen->is_format_supported(screen, PIPE_FORMAT_I8_UNORM, PIPE_TEXTURE)) {
+ st->bitmap.tex_format = PIPE_FORMAT_I8_UNORM;
}
else {
/* XXX support more formats */
case MESA_FORMAT_RGB565:
return PIPE_FORMAT_R5G6B5_UNORM;
case MESA_FORMAT_AL88:
- return PIPE_FORMAT_U_A8_L8;
+ return PIPE_FORMAT_A8L8_UNORM;
case MESA_FORMAT_A8:
- return PIPE_FORMAT_U_A8;
+ return PIPE_FORMAT_A8_UNORM;
case MESA_FORMAT_L8:
- return PIPE_FORMAT_U_L8;
+ return PIPE_FORMAT_L8_UNORM;
case MESA_FORMAT_I8:
- return PIPE_FORMAT_U_I8;
+ return PIPE_FORMAT_I8_UNORM;
case MESA_FORMAT_Z16:
return PIPE_FORMAT_Z16_UNORM;
case MESA_FORMAT_Z32:
case GL_ALPHA12:
case GL_ALPHA16:
case GL_COMPRESSED_ALPHA:
- if (screen->is_format_supported( screen, PIPE_FORMAT_U_A8, surfType ))
- return PIPE_FORMAT_U_A8;
+ if (screen->is_format_supported( screen, PIPE_FORMAT_A8_UNORM, surfType ))
+ return PIPE_FORMAT_A8_UNORM;
return default_rgba_format( screen, surfType );
case 1:
case GL_LUMINANCE12:
case GL_LUMINANCE16:
case GL_COMPRESSED_LUMINANCE:
- if (screen->is_format_supported( screen, PIPE_FORMAT_U_L8, surfType ))
- return PIPE_FORMAT_U_L8;
+ if (screen->is_format_supported( screen, PIPE_FORMAT_L8_UNORM, surfType ))
+ return PIPE_FORMAT_L8_UNORM;
return default_rgba_format( screen, surfType );
case 2:
case GL_LUMINANCE12_ALPHA12:
case GL_LUMINANCE16_ALPHA16:
case GL_COMPRESSED_LUMINANCE_ALPHA:
- if (screen->is_format_supported( screen, PIPE_FORMAT_U_A8_L8, surfType ))
- return PIPE_FORMAT_U_A8_L8;
+ if (screen->is_format_supported( screen, PIPE_FORMAT_A8L8_UNORM, surfType ))
+ return PIPE_FORMAT_A8L8_UNORM;
return default_rgba_format( screen, surfType );
case GL_INTENSITY:
case GL_INTENSITY12:
case GL_INTENSITY16:
case GL_COMPRESSED_INTENSITY:
- if (screen->is_format_supported( screen, PIPE_FORMAT_U_I8, surfType ))
- return PIPE_FORMAT_U_I8;
+ if (screen->is_format_supported( screen, PIPE_FORMAT_I8_UNORM, surfType ))
+ return PIPE_FORMAT_I8_UNORM;
return default_rgba_format( screen, surfType );
case GL_YCBCR_MESA:
return &_mesa_texformat_argb4444;
case PIPE_FORMAT_R5G6B5_UNORM:
return &_mesa_texformat_rgb565;
- case PIPE_FORMAT_U_A8_L8:
+ case PIPE_FORMAT_A8L8_UNORM:
return &_mesa_texformat_al88;
- case PIPE_FORMAT_U_A8:
+ case PIPE_FORMAT_A8_UNORM:
return &_mesa_texformat_a8;
- case PIPE_FORMAT_U_L8:
+ case PIPE_FORMAT_L8_UNORM:
return &_mesa_texformat_l8;
- case PIPE_FORMAT_U_I8:
+ case PIPE_FORMAT_I8_UNORM:
return &_mesa_texformat_i8;
case PIPE_FORMAT_Z16_UNORM:
return &_mesa_texformat_z16;