summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-04-30 16:50:17 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-04-30 16:51:53 -0600
commit54f94a790e4488445347abcff9a636a9c440d7f9 (patch)
tree6f64698c8922d1c79117b769a6f553d5b5a24058 /src
parent8d45576ec5110d39fe48c2f65b04db16ce845968 (diff)
gallium: use the newer PIPE_FORMAT_x_UNORM format names
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/draw/draw_pipe_aaline.c2
-rw-r--r--src/gallium/auxiliary/draw/draw_pipe_pstipple.c2
-rw-r--r--src/gallium/auxiliary/util/p_tile.c24
-rw-r--r--src/gallium/auxiliary/util/u_gen_mipmap.c8
-rw-r--r--src/gallium/drivers/i915simple/i915_screen.c8
-rw-r--r--src/gallium/drivers/i915simple/i915_state_sampler.c8
-rw-r--r--src/gallium/drivers/i965simple/brw_screen.c24
-rw-r--r--src/gallium/drivers/i965simple/brw_wm_surface_state.c8
-rw-r--r--src/mesa/state_tracker/st_cb_bitmap.c4
-rw-r--r--src/mesa/state_tracker/st_format.c32
10 files changed, 60 insertions, 60 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pipe_aaline.c b/src/gallium/auxiliary/draw/draw_pipe_aaline.c
index f05641dee6..f501b2aed4 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_aaline.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_aaline.c
@@ -392,7 +392,7 @@ aaline_create_texture(struct aaline_stage *aaline)
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;
diff --git a/src/gallium/auxiliary/draw/draw_pipe_pstipple.c b/src/gallium/auxiliary/draw/draw_pipe_pstipple.c
index d1d63d73be..c4de9d2698 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_pstipple.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_pstipple.c
@@ -417,7 +417,7 @@ pstip_create_texture(struct pstip_stage *pstip)
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;
diff --git a/src/gallium/auxiliary/util/p_tile.c b/src/gallium/auxiliary/util/p_tile.c
index 13175ca46e..63e1cc6013 100644
--- a/src/gallium/auxiliary/util/p_tile.c
+++ b/src/gallium/auxiliary/util/p_tile.c
@@ -385,7 +385,7 @@ z16_get_tile_rgba(ushort *src,
-/*** PIPE_FORMAT_U_L8 ***/
+/*** PIPE_FORMAT_L8_UNORM ***/
static void
l8_get_tile_rgba(ubyte *src,
@@ -408,7 +408,7 @@ l8_get_tile_rgba(ubyte *src,
}
-/*** PIPE_FORMAT_U_A8 ***/
+/*** PIPE_FORMAT_A8_UNORM ***/
static void
a8_get_tile_rgba(ubyte *src,
@@ -476,7 +476,7 @@ r16g16b16a16_put_tile_rgba(short *dst,
-/*** PIPE_FORMAT_U_I8 ***/
+/*** PIPE_FORMAT_I8_UNORM ***/
static void
i8_get_tile_rgba(ubyte *src,
@@ -499,7 +499,7 @@ i8_get_tile_rgba(ubyte *src,
}
-/*** PIPE_FORMAT_U_A8_L8 ***/
+/*** PIPE_FORMAT_A8L8_UNORM ***/
static void
a8_l8_get_tile_rgba(ushort *src,
@@ -708,16 +708,16 @@ pipe_get_tile_rgba(struct pipe_context *pipe,
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:
@@ -787,16 +787,16 @@ pipe_put_tile_rgba(struct pipe_context *pipe,
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:
diff --git a/src/gallium/auxiliary/util/u_gen_mipmap.c b/src/gallium/auxiliary/util/u_gen_mipmap.c
index b8dc6c66c0..0348629ab8 100644
--- a/src/gallium/auxiliary/util/u_gen_mipmap.c
+++ b/src/gallium/auxiliary/util/u_gen_mipmap.c
@@ -493,13 +493,13 @@ format_to_type_comps(enum pipe_format pformat,
*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;
diff --git a/src/gallium/drivers/i915simple/i915_screen.c b/src/gallium/drivers/i915simple/i915_screen.c
index 9ae594ce54..631642e1b6 100644
--- a/src/gallium/drivers/i915simple/i915_screen.c
+++ b/src/gallium/drivers/i915simple/i915_screen.c
@@ -154,10 +154,10 @@ i915_is_format_supported( struct pipe_screen *screen,
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,
diff --git a/src/gallium/drivers/i915simple/i915_state_sampler.c b/src/gallium/drivers/i915simple/i915_state_sampler.c
index 84f6529a3a..982eec4a1b 100644
--- a/src/gallium/drivers/i915simple/i915_state_sampler.c
+++ b/src/gallium/drivers/i915simple/i915_state_sampler.c
@@ -131,13 +131,13 @@ static uint
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;
diff --git a/src/gallium/drivers/i965simple/brw_screen.c b/src/gallium/drivers/i965simple/brw_screen.c
index 6845c7abde..b700f7e4f5 100644
--- a/src/gallium/drivers/i965simple/brw_screen.c
+++ b/src/gallium/drivers/i965simple/brw_screen.c
@@ -141,13 +141,13 @@ brw_is_format_supported( struct pipe_screen *screen,
#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,
@@ -157,16 +157,16 @@ brw_is_format_supported( struct pipe_screen *screen,
/* 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) {
diff --git a/src/gallium/drivers/i965simple/brw_wm_surface_state.c b/src/gallium/drivers/i965simple/brw_wm_surface_state.c
index 853c743ccf..69e56dc8bd 100644
--- a/src/gallium/drivers/i965simple/brw_wm_surface_state.c
+++ b/src/gallium/drivers/i965simple/brw_wm_surface_state.c
@@ -57,16 +57,16 @@ static unsigned translate_tex_target( enum pipe_texture_target target )
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:
diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c
index f0a3b75357..ce8fefe703 100644
--- a/src/mesa/state_tracker/st_cb_bitmap.c
+++ b/src/mesa/state_tracker/st_cb_bitmap.c
@@ -722,8 +722,8 @@ st_init_bitmap(struct st_context *st)
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 */
diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c
index 8b5f84cd56..9a385a0457 100644
--- a/src/mesa/state_tracker/st_format.c
+++ b/src/mesa/state_tracker/st_format.c
@@ -261,13 +261,13 @@ st_mesa_format_to_pipe_format(GLuint mesaFormat)
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:
@@ -409,8 +409,8 @@ st_choose_format(struct pipe_context *pipe, GLint internalFormat,
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:
@@ -420,8 +420,8 @@ st_choose_format(struct pipe_context *pipe, GLint internalFormat,
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:
@@ -433,8 +433,8 @@ st_choose_format(struct pipe_context *pipe, GLint internalFormat,
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:
@@ -443,8 +443,8 @@ st_choose_format(struct pipe_context *pipe, GLint internalFormat,
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:
@@ -547,13 +547,13 @@ translate_gallium_format_to_mesa_format(enum pipe_format format)
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;