summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2010-03-01 18:09:40 +0000
committerJosé Fonseca <[email protected]>2010-03-01 18:53:31 +0000
commit712ba6e6b049c050af3ac1992aba009ebbe56ca5 (patch)
tree6f31655b521288e62e17de6bb506907d87caefa6 /src/gallium/auxiliary
parent3843548a67da4ad484eadfd9e65d56d581a49a82 (diff)
util: Rename pipe formats.
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/util/u_debug.c2
-rw-r--r--src/gallium/auxiliary/util/u_format.csv55
-rw-r--r--src/gallium/auxiliary/util/u_gen_mipmap.c22
-rw-r--r--src/gallium/auxiliary/util/u_pack_color.h66
-rw-r--r--src/gallium/auxiliary/util/u_surface.c4
-rw-r--r--src/gallium/auxiliary/util/u_tile.c104
6 files changed, 126 insertions, 127 deletions
diff --git a/src/gallium/auxiliary/util/u_debug.c b/src/gallium/auxiliary/util/u_debug.c
index 858d52c6efb..94be682c4b1 100644
--- a/src/gallium/auxiliary/util/u_debug.c
+++ b/src/gallium/auxiliary/util/u_debug.c
@@ -387,7 +387,7 @@ void debug_dump_image(const char *prefix,
/* XXX this is a hack */
switch (format) {
- case PIPE_FORMAT_A8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
r = 2;
g = 1;
b = 0;
diff --git a/src/gallium/auxiliary/util/u_format.csv b/src/gallium/auxiliary/util/u_format.csv
index 45a2776c6c3..43d69f1cd82 100644
--- a/src/gallium/auxiliary/util/u_format.csv
+++ b/src/gallium/auxiliary/util/u_format.csv
@@ -57,57 +57,57 @@
# resolutions for each sized internal format."
# Typical rendertarget formats
-PIPE_FORMAT_A8R8G8B8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , zyxw, rgb
-PIPE_FORMAT_X8R8G8B8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , zyx1, rgb
-PIPE_FORMAT_B8G8R8A8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , yzwx, rgb
-PIPE_FORMAT_B8G8R8X8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , yzw1, rgb
-PIPE_FORMAT_R8G8B8A8_UNORM_REV , plain, 1, 1, un8 , un8 , un8 , un8 , wzyx, rgb
-PIPE_FORMAT_R8G8B8X8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , wzy1, rgb
-PIPE_FORMAT_A1R5G5B5_UNORM , plain, 1, 1, un5 , un5 , un5 , un1 , zyxw, rgb
-PIPE_FORMAT_A4R4G4B4_UNORM , plain, 1, 1, un4 , un4 , un4 , un4 , zyxw, rgb
-PIPE_FORMAT_R5G6B5_UNORM , plain, 1, 1, un5 , un6 , un5 , , zyx1, rgb
-PIPE_FORMAT_A2B10G10R10_UNORM , plain, 1, 1, un10, un10, un10, un2 , xyzw, rgb
+PIPE_FORMAT_B8G8R8A8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , zyxw, rgb
+PIPE_FORMAT_B8G8R8X8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , zyx1, rgb
+PIPE_FORMAT_A8R8G8B8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , yzwx, rgb
+PIPE_FORMAT_X8R8G8B8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , yzw1, rgb
+PIPE_FORMAT_A8B8G8R8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , wzyx, rgb
+PIPE_FORMAT_X8B8G8R8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , wzy1, rgb
+PIPE_FORMAT_B5G5R5A1_UNORM , plain, 1, 1, un5 , un5 , un5 , un1 , zyxw, rgb
+PIPE_FORMAT_B4G4R4A4_UNORM , plain, 1, 1, un4 , un4 , un4 , un4 , zyxw, rgb
+PIPE_FORMAT_B5G6R5_UNORM , plain, 1, 1, un5 , un6 , un5 , , zyx1, rgb
+PIPE_FORMAT_R10G10B10A2_UNORM , plain, 1, 1, un10, un10, un10, un2 , xyzw, rgb
# Luminance/Intensity/Alpha formats
PIPE_FORMAT_L8_UNORM , plain, 1, 1, un8 , , , , xxx1, rgb
PIPE_FORMAT_A8_UNORM , plain, 1, 1, un8 , , , , 000x, rgb
PIPE_FORMAT_I8_UNORM , plain, 1, 1, un8 , , , , xxxx, rgb
-PIPE_FORMAT_A8L8_UNORM , plain, 1, 1, un8 , un8 , , , xxxy, rgb
+PIPE_FORMAT_L8A8_UNORM , plain, 1, 1, un8 , un8 , , , xxxy, rgb
PIPE_FORMAT_L16_UNORM , plain, 1, 1, un16, , , , xxx1, rgb
# SRGB formats
PIPE_FORMAT_L8_SRGB , plain, 1, 1, un8 , , , , xxx1, srgb
-PIPE_FORMAT_A8L8_SRGB , plain, 1, 1, un8 , un8 , , , xxxy, srgb
+PIPE_FORMAT_L8A8_SRGB , plain, 1, 1, un8 , un8 , , , xxxy, srgb
PIPE_FORMAT_R8G8B8_SRGB , plain, 1, 1, un8 , un8 , un8 , , xyz1, srgb
-PIPE_FORMAT_R8G8B8A8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , wzyx, srgb
-PIPE_FORMAT_R8G8B8X8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , wzy1, srgb
-PIPE_FORMAT_A8R8G8B8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , zyxw, srgb
-PIPE_FORMAT_X8R8G8B8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , zyx1, srgb
-PIPE_FORMAT_B8G8R8A8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , yzwx, srgb
-PIPE_FORMAT_B8G8R8X8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , yzw1, srgb
+PIPE_FORMAT_A8B8G8R8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , wzyx, srgb
+PIPE_FORMAT_X8B8G8R8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , wzy1, srgb
+PIPE_FORMAT_B8G8R8A8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , zyxw, srgb
+PIPE_FORMAT_B8G8R8X8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , zyx1, srgb
+PIPE_FORMAT_A8R8G8B8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , yzwx, srgb
+PIPE_FORMAT_X8R8G8B8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , yzw1, srgb
# Signed formats (typically used for bump map textures)
-PIPE_FORMAT_X8B8G8R8_SNORM , plain, 1, 1, sn8 , sn8 , sn8 , sn8 , xyz1, rgb
-PIPE_FORMAT_X8UB8UG8SR8S_NORM , plain, 1, 1, sn8 , sn8 , un8 , x8 , xyz1, rgb
-PIPE_FORMAT_B6UG5SR5S_NORM , plain, 1, 1, sn5 , sn5 , un6 , , xyz1, rgb
+PIPE_FORMAT_R8G8B8X8_SNORM , plain, 1, 1, sn8 , sn8 , sn8 , sn8 , xyz1, rgb
+PIPE_FORMAT_R8SG8SB8UX8U_NORM , plain, 1, 1, sn8 , sn8 , un8 , x8 , xyz1, rgb
+PIPE_FORMAT_R5SG5SB6U_NORM , plain, 1, 1, sn5 , sn5 , un6 , , xyz1, rgb
# Depth-stencil formats
PIPE_FORMAT_S8_UNORM , plain, 1, 1, un8 , , , , _x__, zs
PIPE_FORMAT_Z16_UNORM , plain, 1, 1, un16, , , , x___, zs
PIPE_FORMAT_Z32_UNORM , plain, 1, 1, un32, , , , x___, zs
PIPE_FORMAT_Z32_FLOAT , plain, 1, 1, f32 , , , , x___, zs
-PIPE_FORMAT_S8Z24_UNORM , plain, 1, 1, un24, un8 , , , xy__, zs
-PIPE_FORMAT_Z24S8_UNORM , plain, 1, 1, un8 , un24, , , yx__, zs
-PIPE_FORMAT_X8Z24_UNORM , plain, 1, 1, un24, un8 , , , x___, zs
-PIPE_FORMAT_Z24X8_UNORM , plain, 1, 1, un8 , un24, , , y___, zs
+PIPE_FORMAT_Z24S8_UNORM , plain, 1, 1, un24, un8 , , , xy__, zs
+PIPE_FORMAT_S8Z24_UNORM , plain, 1, 1, un8 , un24, , , yx__, zs
+PIPE_FORMAT_Z24X8_UNORM , plain, 1, 1, un24, un8 , , , x___, zs
+PIPE_FORMAT_X8Z24_UNORM , plain, 1, 1, un8 , un24, , , y___, zs
# YUV formats
# http://www.fourcc.org/yuv.php#UYVY
-PIPE_FORMAT_YCBCR , subsampled, 2, 1, x32 , , , , xyz1, yuv
+PIPE_FORMAT_UYVY , subsampled, 2, 1, x32 , , , , xyz1, yuv
# http://www.fourcc.org/yuv.php#YUYV (a.k.a http://www.fourcc.org/yuv.php#YUY2)
# XXX: u_tile.c's ycbcr_get_tile_rgba actually interprets it as VYUY but the
# intent should be to match D3DFMT_YUY2
-PIPE_FORMAT_YCBCR_REV , subsampled, 2, 1, x32 , , , , xyz1, yuv
+PIPE_FORMAT_YUYV , subsampled, 2, 1, x32 , , , , xyz1, yuv
# Compressed formats
PIPE_FORMAT_DXT1_RGB , compressed, 4, 4, x64 , , , , xyz1, rgb
@@ -120,7 +120,6 @@ PIPE_FORMAT_DXT3_SRGBA , compressed, 4, 4, x128, , , , xy
PIPE_FORMAT_DXT5_SRGBA , compressed, 4, 4, x128, , , , xyzw, srgb
# Old vector formats
-# XXX: Swizzle notation is reversed for these!
# See also:
# - src/gallium/auxiliary/translate/translate_generic.c
# - src/mesa/state_tracker/st_draw.c
diff --git a/src/gallium/auxiliary/util/u_gen_mipmap.c b/src/gallium/auxiliary/util/u_gen_mipmap.c
index 1d7329d422b..9390e8636f1 100644
--- a/src/gallium/auxiliary/util/u_gen_mipmap.c
+++ b/src/gallium/auxiliary/util/u_gen_mipmap.c
@@ -922,29 +922,29 @@ format_to_type_comps(enum pipe_format pformat,
{
/* XXX I think this could be implemented in terms of the pf_*() functions */
switch (pformat) {
- case PIPE_FORMAT_A8R8G8B8_UNORM:
- case PIPE_FORMAT_X8R8G8B8_UNORM:
case PIPE_FORMAT_B8G8R8A8_UNORM:
case PIPE_FORMAT_B8G8R8X8_UNORM:
- case PIPE_FORMAT_R8G8B8A8_SRGB:
- case PIPE_FORMAT_R8G8B8X8_SRGB:
- case PIPE_FORMAT_A8R8G8B8_SRGB:
- case PIPE_FORMAT_X8R8G8B8_SRGB:
+ case PIPE_FORMAT_A8R8G8B8_UNORM:
+ case PIPE_FORMAT_X8R8G8B8_UNORM:
+ case PIPE_FORMAT_A8B8G8R8_SRGB:
+ case PIPE_FORMAT_X8B8G8R8_SRGB:
case PIPE_FORMAT_B8G8R8A8_SRGB:
case PIPE_FORMAT_B8G8R8X8_SRGB:
+ case PIPE_FORMAT_A8R8G8B8_SRGB:
+ case PIPE_FORMAT_X8R8G8B8_SRGB:
case PIPE_FORMAT_R8G8B8_SRGB:
*datatype = DTYPE_UBYTE;
*comps = 4;
return;
- case PIPE_FORMAT_A1R5G5B5_UNORM:
+ case PIPE_FORMAT_B5G5R5A1_UNORM:
*datatype = DTYPE_USHORT_1_5_5_5_REV;
*comps = 4;
return;
- case PIPE_FORMAT_A4R4G4B4_UNORM:
+ case PIPE_FORMAT_B4G4R4A4_UNORM:
*datatype = DTYPE_USHORT_4_4_4_4;
*comps = 4;
return;
- case PIPE_FORMAT_R5G6B5_UNORM:
+ case PIPE_FORMAT_B5G6R5_UNORM:
*datatype = DTYPE_USHORT_5_6_5;
*comps = 3;
return;
@@ -955,8 +955,8 @@ format_to_type_comps(enum pipe_format pformat,
*datatype = DTYPE_UBYTE;
*comps = 1;
return;
- case PIPE_FORMAT_A8L8_UNORM:
- case PIPE_FORMAT_A8L8_SRGB:
+ case PIPE_FORMAT_L8A8_UNORM:
+ case PIPE_FORMAT_L8A8_SRGB:
*datatype = DTYPE_UBYTE;
*comps = 2;
return;
diff --git a/src/gallium/auxiliary/util/u_pack_color.h b/src/gallium/auxiliary/util/u_pack_color.h
index 4e4ac7f3da4..50f1b1670b6 100644
--- a/src/gallium/auxiliary/util/u_pack_color.h
+++ b/src/gallium/auxiliary/util/u_pack_color.h
@@ -57,47 +57,47 @@ util_pack_color_ub(ubyte r, ubyte g, ubyte b, ubyte a,
enum pipe_format format, union util_color *uc)
{
switch (format) {
- case PIPE_FORMAT_R8G8B8A8_UNORM_REV:
+ case PIPE_FORMAT_A8B8G8R8_UNORM:
{
uc->ui = (r << 24) | (g << 16) | (b << 8) | a;
}
return;
- case PIPE_FORMAT_R8G8B8X8_UNORM:
+ case PIPE_FORMAT_X8B8G8R8_UNORM:
{
uc->ui = (r << 24) | (g << 16) | (b << 8) | 0xff;
}
return;
- case PIPE_FORMAT_A8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
{
uc->ui = (a << 24) | (r << 16) | (g << 8) | b;
}
return;
- case PIPE_FORMAT_X8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8X8_UNORM:
{
uc->ui = (0xff << 24) | (r << 16) | (g << 8) | b;
}
return;
- case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_A8R8G8B8_UNORM:
{
uc->ui = (b << 24) | (g << 16) | (r << 8) | a;
}
return;
- case PIPE_FORMAT_B8G8R8X8_UNORM:
+ case PIPE_FORMAT_X8R8G8B8_UNORM:
{
uc->ui = (b << 24) | (g << 16) | (r << 8) | 0xff;
}
return;
- case PIPE_FORMAT_R5G6B5_UNORM:
+ case PIPE_FORMAT_B5G6R5_UNORM:
{
uc->us = ((r & 0xf8) << 8) | ((g & 0xfc) << 3) | (b >> 3);
}
return;
- case PIPE_FORMAT_A1R5G5B5_UNORM:
+ case PIPE_FORMAT_B5G5R5A1_UNORM:
{
uc->us = ((a & 0x80) << 8) | ((r & 0xf8) << 7) | ((g & 0xf8) << 2) | (b >> 3);
}
return;
- case PIPE_FORMAT_A4R4G4B4_UNORM:
+ case PIPE_FORMAT_B4G4R4A4_UNORM:
{
uc->us = ((a & 0xf0) << 8) | ((r & 0xf0) << 4) | ((g & 0xf0) << 0) | (b >> 4);
}
@@ -153,7 +153,7 @@ util_unpack_color_ub(enum pipe_format format, union util_color *uc,
ubyte *r, ubyte *g, ubyte *b, ubyte *a)
{
switch (format) {
- case PIPE_FORMAT_R8G8B8A8_UNORM_REV:
+ case PIPE_FORMAT_A8B8G8R8_UNORM:
{
uint p = uc->ui;
*r = (ubyte) ((p >> 24) & 0xff);
@@ -162,7 +162,7 @@ util_unpack_color_ub(enum pipe_format format, union util_color *uc,
*a = (ubyte) ((p >> 0) & 0xff);
}
return;
- case PIPE_FORMAT_R8G8B8X8_UNORM:
+ case PIPE_FORMAT_X8B8G8R8_UNORM:
{
uint p = uc->ui;
*r = (ubyte) ((p >> 24) & 0xff);
@@ -171,7 +171,7 @@ util_unpack_color_ub(enum pipe_format format, union util_color *uc,
*a = (ubyte) 0xff;
}
return;
- case PIPE_FORMAT_A8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
{
uint p = uc->ui;
*r = (ubyte) ((p >> 16) & 0xff);
@@ -180,7 +180,7 @@ util_unpack_color_ub(enum pipe_format format, union util_color *uc,
*a = (ubyte) ((p >> 24) & 0xff);
}
return;
- case PIPE_FORMAT_X8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8X8_UNORM:
{
uint p = uc->ui;
*r = (ubyte) ((p >> 16) & 0xff);
@@ -189,7 +189,7 @@ util_unpack_color_ub(enum pipe_format format, union util_color *uc,
*a = (ubyte) 0xff;
}
return;
- case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_A8R8G8B8_UNORM:
{
uint p = uc->ui;
*r = (ubyte) ((p >> 8) & 0xff);
@@ -198,7 +198,7 @@ util_unpack_color_ub(enum pipe_format format, union util_color *uc,
*a = (ubyte) ((p >> 0) & 0xff);
}
return;
- case PIPE_FORMAT_B8G8R8X8_UNORM:
+ case PIPE_FORMAT_X8R8G8B8_UNORM:
{
uint p = uc->ui;
*r = (ubyte) ((p >> 8) & 0xff);
@@ -207,7 +207,7 @@ util_unpack_color_ub(enum pipe_format format, union util_color *uc,
*a = (ubyte) 0xff;
}
return;
- case PIPE_FORMAT_R5G6B5_UNORM:
+ case PIPE_FORMAT_B5G6R5_UNORM:
{
ushort p = uc->us;
*r = (ubyte) (((p >> 8) & 0xf8) | ((p >> 13) & 0x7));
@@ -216,7 +216,7 @@ util_unpack_color_ub(enum pipe_format format, union util_color *uc,
*a = (ubyte) 0xff;
}
return;
- case PIPE_FORMAT_A1R5G5B5_UNORM:
+ case PIPE_FORMAT_B5G5R5A1_UNORM:
{
ushort p = uc->us;
*r = (ubyte) (((p >> 7) & 0xf8) | ((p >> 12) & 0x7));
@@ -225,7 +225,7 @@ util_unpack_color_ub(enum pipe_format format, union util_color *uc,
*a = (ubyte) (0xff * (p >> 15));
}
return;
- case PIPE_FORMAT_A4R4G4B4_UNORM:
+ case PIPE_FORMAT_B4G4R4A4_UNORM:
{
ushort p = uc->us;
*r = (ubyte) (((p >> 4) & 0xf0) | ((p >> 8) & 0xf));
@@ -326,47 +326,47 @@ util_pack_color(const float rgba[4], enum pipe_format format, union util_color *
}
switch (format) {
- case PIPE_FORMAT_R8G8B8A8_UNORM_REV:
+ case PIPE_FORMAT_A8B8G8R8_UNORM:
{
uc->ui = (r << 24) | (g << 16) | (b << 8) | a;
}
return;
- case PIPE_FORMAT_R8G8B8X8_UNORM:
+ case PIPE_FORMAT_X8B8G8R8_UNORM:
{
uc->ui = (r << 24) | (g << 16) | (b << 8) | 0xff;
}
return;
- case PIPE_FORMAT_A8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
{
uc->ui = (a << 24) | (r << 16) | (g << 8) | b;
}
return;
- case PIPE_FORMAT_X8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8X8_UNORM:
{
uc->ui = (0xff << 24) | (r << 16) | (g << 8) | b;
}
return;
- case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_A8R8G8B8_UNORM:
{
uc->ui = (b << 24) | (g << 16) | (r << 8) | a;
}
return;
- case PIPE_FORMAT_B8G8R8X8_UNORM:
+ case PIPE_FORMAT_X8R8G8B8_UNORM:
{
uc->ui = (b << 24) | (g << 16) | (r << 8) | 0xff;
}
return;
- case PIPE_FORMAT_R5G6B5_UNORM:
+ case PIPE_FORMAT_B5G6R5_UNORM:
{
uc->us = ((r & 0xf8) << 8) | ((g & 0xfc) << 3) | (b >> 3);
}
return;
- case PIPE_FORMAT_A1R5G5B5_UNORM:
+ case PIPE_FORMAT_B5G5R5A1_UNORM:
{
uc->us = ((a & 0x80) << 8) | ((r & 0xf8) << 7) | ((g & 0xf8) << 2) | (b >> 3);
}
return;
- case PIPE_FORMAT_A4R4G4B4_UNORM:
+ case PIPE_FORMAT_B4G4R4A4_UNORM:
{
uc->ub = ((a & 0xf0) << 8) | ((r & 0xf0) << 4) | ((g & 0xf0) << 0) | (b >> 4);
}
@@ -427,13 +427,13 @@ util_pack_z(enum pipe_format format, double z)
return (uint) (z * 0xffffffff);
case PIPE_FORMAT_Z32_FLOAT:
return (uint)z;
- case PIPE_FORMAT_S8Z24_UNORM:
- case PIPE_FORMAT_X8Z24_UNORM:
+ case PIPE_FORMAT_Z24S8_UNORM:
+ case PIPE_FORMAT_Z24X8_UNORM:
if (z == 1.0)
return 0xffffff;
return (uint) (z * 0xffffff);
- case PIPE_FORMAT_Z24S8_UNORM:
- case PIPE_FORMAT_Z24X8_UNORM:
+ case PIPE_FORMAT_S8Z24_UNORM:
+ case PIPE_FORMAT_X8Z24_UNORM:
if (z == 1.0)
return 0xffffff00;
return ((uint) (z * 0xffffff)) << 8;
@@ -458,10 +458,10 @@ util_pack_z_stencil(enum pipe_format format, double z, uint s)
unsigned packed = util_pack_z(format, z);
switch (format) {
- case PIPE_FORMAT_S8Z24_UNORM:
+ case PIPE_FORMAT_Z24S8_UNORM:
packed |= s << 24;
break;
- case PIPE_FORMAT_Z24S8_UNORM:
+ case PIPE_FORMAT_S8Z24_UNORM:
packed |= s;
break;
case PIPE_FORMAT_S8_UNORM:
diff --git a/src/gallium/auxiliary/util/u_surface.c b/src/gallium/auxiliary/util/u_surface.c
index 948c1e76d05..33306bbc2a6 100644
--- a/src/gallium/auxiliary/util/u_surface.c
+++ b/src/gallium/auxiliary/util/u_surface.c
@@ -54,9 +54,9 @@ util_create_rgba_surface(struct pipe_screen *screen,
struct pipe_surface **surfaceOut)
{
static const enum pipe_format rgbaFormats[] = {
- PIPE_FORMAT_A8R8G8B8_UNORM,
PIPE_FORMAT_B8G8R8A8_UNORM,
- PIPE_FORMAT_R8G8B8A8_UNORM_REV,
+ PIPE_FORMAT_A8R8G8B8_UNORM,
+ PIPE_FORMAT_A8B8G8R8_UNORM,
PIPE_FORMAT_NONE
};
const uint target = PIPE_TEXTURE_2D;
diff --git a/src/gallium/auxiliary/util/u_tile.c b/src/gallium/auxiliary/util/u_tile.c
index 6000e93a0b6..79481b710bf 100644
--- a/src/gallium/auxiliary/util/u_tile.c
+++ b/src/gallium/auxiliary/util/u_tile.c
@@ -108,7 +108,7 @@ pipe_put_tile_raw(struct pipe_transfer *pt,
-/*** PIPE_FORMAT_A8R8G8B8_UNORM ***/
+/*** PIPE_FORMAT_B8G8R8A8_UNORM ***/
static void
a8r8g8b8_get_tile_rgba(const unsigned *src,
@@ -155,7 +155,7 @@ a8r8g8b8_put_tile_rgba(unsigned *dst,
}
-/*** PIPE_FORMAT_X8R8G8B8_UNORM ***/
+/*** PIPE_FORMAT_B8G8R8X8_UNORM ***/
static void
x8r8g8b8_get_tile_rgba(const unsigned *src,
@@ -201,7 +201,7 @@ x8r8g8b8_put_tile_rgba(unsigned *dst,
}
-/*** PIPE_FORMAT_B8G8R8A8_UNORM ***/
+/*** PIPE_FORMAT_A8R8G8B8_UNORM ***/
static void
b8g8r8a8_get_tile_rgba(const unsigned *src,
@@ -248,7 +248,7 @@ b8g8r8a8_put_tile_rgba(unsigned *dst,
}
-/*** PIPE_FORMAT_R8G8B8A8_UNORM_REV ***/
+/*** PIPE_FORMAT_A8B8G8R8_UNORM ***/
static void
r8g8b8a8_get_tile_rgba(const unsigned *src,
@@ -295,7 +295,7 @@ r8g8b8a8_put_tile_rgba(unsigned *dst,
}
-/*** PIPE_FORMAT_A1R5G5B5_UNORM ***/
+/*** PIPE_FORMAT_B5G5R5A1_UNORM ***/
static void
a1r5g5b5_get_tile_rgba(const ushort *src,
@@ -346,7 +346,7 @@ a1r5g5b5_put_tile_rgba(ushort *dst,
}
-/*** PIPE_FORMAT_A4R4G4B4_UNORM ***/
+/*** PIPE_FORMAT_B4G4R4A4_UNORM ***/
static void
a4r4g4b4_get_tile_rgba(const ushort *src,
@@ -397,7 +397,7 @@ a4r4g4b4_put_tile_rgba(ushort *dst,
}
-/*** PIPE_FORMAT_R5G6B5_UNORM ***/
+/*** PIPE_FORMAT_B5G6R5_UNORM ***/
static void
r5g6b5_get_tile_rgba(const ushort *src,
@@ -691,7 +691,7 @@ r16g16b16a16_put_tile_rgba(short *dst,
}
-/*** PIPE_FORMAT_R8G8B8A8_SRGB ***/
+/*** PIPE_FORMAT_A8B8G8R8_SRGB ***/
/**
* Convert an 8-bit sRGB value from non-linear space to a
@@ -784,7 +784,7 @@ a8r8g8b8_srgb_put_tile_rgba(unsigned *dst,
}
-/*** PIPE_FORMAT_A8L8_SRGB ***/
+/*** PIPE_FORMAT_L8A8_SRGB ***/
static void
a8l8_srgb_get_tile_rgba(const ushort *src,
@@ -913,7 +913,7 @@ i8_put_tile_rgba(ubyte *dst,
}
-/*** PIPE_FORMAT_A8L8_UNORM ***/
+/*** PIPE_FORMAT_L8A8_UNORM ***/
static void
a8l8_get_tile_rgba(const ushort *src,
@@ -987,7 +987,7 @@ z32_get_tile_rgba(const unsigned *src,
}
-/*** PIPE_FORMAT_S8Z24_UNORM ***/
+/*** PIPE_FORMAT_Z24S8_UNORM ***/
/**
* Return Z component as four float in [0,1]. Stencil part ignored.
@@ -1014,7 +1014,7 @@ s8z24_get_tile_rgba(const unsigned *src,
}
-/*** PIPE_FORMAT_Z24S8_UNORM ***/
+/*** PIPE_FORMAT_S8Z24_UNORM ***/
/**
* Return Z component as four float in [0,1]. Stencil part ignored.
@@ -1067,7 +1067,7 @@ z32f_get_tile_rgba(const float *src,
}
-/*** PIPE_FORMAT_YCBCR / PIPE_FORMAT_YCBCR_REV ***/
+/*** PIPE_FORMAT_UYVY / PIPE_FORMAT_YUYV ***/
/**
* Convert YCbCr (or YCrCb) to RGBA.
@@ -1162,25 +1162,25 @@ pipe_tile_raw_to_rgba(enum pipe_format format,
float *dst, unsigned dst_stride)
{
switch (format) {
- case PIPE_FORMAT_A8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
a8r8g8b8_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
break;
- case PIPE_FORMAT_X8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8X8_UNORM:
x8r8g8b8_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
break;
- case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_A8R8G8B8_UNORM:
b8g8r8a8_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
break;
- case PIPE_FORMAT_R8G8B8A8_UNORM_REV:
+ case PIPE_FORMAT_A8B8G8R8_UNORM:
r8g8b8a8_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
break;
- case PIPE_FORMAT_A1R5G5B5_UNORM:
+ case PIPE_FORMAT_B5G5R5A1_UNORM:
a1r5g5b5_get_tile_rgba((ushort *) src, w, h, dst, dst_stride);
break;
- case PIPE_FORMAT_A4R4G4B4_UNORM:
+ case PIPE_FORMAT_B4G4R4A4_UNORM:
a4r4g4b4_get_tile_rgba((ushort *) src, w, h, dst, dst_stride);
break;
- case PIPE_FORMAT_R5G6B5_UNORM:
+ case PIPE_FORMAT_B5G6R5_UNORM:
r5g6b5_get_tile_rgba((ushort *) src, w, h, dst, dst_stride);
break;
case PIPE_FORMAT_R8G8B8_UNORM:
@@ -1195,7 +1195,7 @@ pipe_tile_raw_to_rgba(enum pipe_format format,
case PIPE_FORMAT_I8_UNORM:
i8_get_tile_rgba((ubyte *) src, w, h, dst, dst_stride);
break;
- case PIPE_FORMAT_A8L8_UNORM:
+ case PIPE_FORMAT_L8A8_UNORM:
a8l8_get_tile_rgba((ushort *) src, w, h, dst, dst_stride);
break;
case PIPE_FORMAT_R16_SNORM:
@@ -1204,10 +1204,10 @@ pipe_tile_raw_to_rgba(enum pipe_format format,
case PIPE_FORMAT_R16G16B16A16_SNORM:
r16g16b16a16_get_tile_rgba((short *) src, w, h, dst, dst_stride);
break;
- case PIPE_FORMAT_A8R8G8B8_SRGB:
+ case PIPE_FORMAT_B8G8R8A8_SRGB:
a8r8g8b8_srgb_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
break;
- case PIPE_FORMAT_A8L8_SRGB:
+ case PIPE_FORMAT_L8A8_SRGB:
a8l8_srgb_get_tile_rgba((ushort *) src, w, h, dst, dst_stride);
break;
case PIPE_FORMAT_L8_SRGB:
@@ -1219,21 +1219,21 @@ pipe_tile_raw_to_rgba(enum pipe_format format,
case PIPE_FORMAT_Z32_UNORM:
z32_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
break;
- case PIPE_FORMAT_S8Z24_UNORM:
- case PIPE_FORMAT_X8Z24_UNORM:
- s8z24_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
- break;
case PIPE_FORMAT_Z24S8_UNORM:
case PIPE_FORMAT_Z24X8_UNORM:
+ s8z24_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
+ break;
+ case PIPE_FORMAT_S8Z24_UNORM:
+ case PIPE_FORMAT_X8Z24_UNORM:
z24s8_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
break;
case PIPE_FORMAT_Z32_FLOAT:
z32f_get_tile_rgba((float *) src, w, h, dst, dst_stride);
break;
- case PIPE_FORMAT_YCBCR:
+ case PIPE_FORMAT_UYVY:
ycbcr_get_tile_rgba((ushort *) src, w, h, dst, dst_stride, FALSE);
break;
- case PIPE_FORMAT_YCBCR_REV:
+ case PIPE_FORMAT_YUYV:
ycbcr_get_tile_rgba((ushort *) src, w, h, dst, dst_stride, TRUE);
break;
default:
@@ -1262,7 +1262,7 @@ pipe_get_tile_rgba(struct pipe_transfer *pt,
if (!packed)
return;
- if(format == PIPE_FORMAT_YCBCR || format == PIPE_FORMAT_YCBCR_REV)
+ if(format == PIPE_FORMAT_UYVY || format == PIPE_FORMAT_YUYV)
assert((x & 1) == 0);
pipe_get_tile_raw(pt, x, y, w, h, packed, 0);
@@ -1291,28 +1291,28 @@ pipe_put_tile_rgba(struct pipe_transfer *pt,
return;
switch (format) {
- case PIPE_FORMAT_A8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
a8r8g8b8_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);
break;
- case PIPE_FORMAT_X8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8X8_UNORM:
x8r8g8b8_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);
break;
- case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_A8R8G8B8_UNORM:
b8g8r8a8_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);
break;
- case PIPE_FORMAT_R8G8B8A8_UNORM_REV:
+ case PIPE_FORMAT_A8B8G8R8_UNORM:
r8g8b8a8_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);
break;
- case PIPE_FORMAT_A1R5G5B5_UNORM:
+ case PIPE_FORMAT_B5G5R5A1_UNORM:
a1r5g5b5_put_tile_rgba((ushort *) packed, w, h, p, src_stride);
break;
- case PIPE_FORMAT_R5G6B5_UNORM:
+ case PIPE_FORMAT_B5G6R5_UNORM:
r5g6b5_put_tile_rgba((ushort *) packed, w, h, p, src_stride);
break;
case PIPE_FORMAT_R8G8B8_UNORM:
r8g8b8_put_tile_rgba((ubyte *) packed, w, h, p, src_stride);
break;
- case PIPE_FORMAT_A4R4G4B4_UNORM:
+ case PIPE_FORMAT_B4G4R4A4_UNORM:
a4r4g4b4_put_tile_rgba((ushort *) packed, w, h, p, src_stride);
break;
case PIPE_FORMAT_L8_UNORM:
@@ -1324,7 +1324,7 @@ pipe_put_tile_rgba(struct pipe_transfer *pt,
case PIPE_FORMAT_I8_UNORM:
i8_put_tile_rgba((ubyte *) packed, w, h, p, src_stride);
break;
- case PIPE_FORMAT_A8L8_UNORM:
+ case PIPE_FORMAT_L8A8_UNORM:
a8l8_put_tile_rgba((ushort *) packed, w, h, p, src_stride);
break;
case PIPE_FORMAT_R16_SNORM:
@@ -1333,10 +1333,10 @@ pipe_put_tile_rgba(struct pipe_transfer *pt,
case PIPE_FORMAT_R16G16B16A16_SNORM:
r16g16b16a16_put_tile_rgba((short *) packed, w, h, p, src_stride);
break;
- case PIPE_FORMAT_A8R8G8B8_SRGB:
+ case PIPE_FORMAT_B8G8R8A8_SRGB:
a8r8g8b8_srgb_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);
break;
- case PIPE_FORMAT_A8L8_SRGB:
+ case PIPE_FORMAT_L8A8_SRGB:
a8l8_srgb_put_tile_rgba((ushort *) packed, w, h, p, src_stride);
break;
case PIPE_FORMAT_L8_SRGB:
@@ -1348,12 +1348,12 @@ pipe_put_tile_rgba(struct pipe_transfer *pt,
case PIPE_FORMAT_Z32_UNORM:
/*z32_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/
break;
- case PIPE_FORMAT_S8Z24_UNORM:
- case PIPE_FORMAT_X8Z24_UNORM:
- /*s8z24_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/
- break;
case PIPE_FORMAT_Z24S8_UNORM:
case PIPE_FORMAT_Z24X8_UNORM:
+ /*s8z24_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/
+ break;
+ case PIPE_FORMAT_S8Z24_UNORM:
+ case PIPE_FORMAT_X8Z24_UNORM:
/*z24s8_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/
break;
default:
@@ -1405,8 +1405,8 @@ pipe_get_tile_z(struct pipe_transfer *pt,
}
}
break;
- case PIPE_FORMAT_S8Z24_UNORM:
- case PIPE_FORMAT_X8Z24_UNORM:
+ case PIPE_FORMAT_Z24S8_UNORM:
+ case PIPE_FORMAT_Z24X8_UNORM:
{
const uint *ptrc
= (const uint *)(map + y * pt->stride + x*4);
@@ -1420,8 +1420,8 @@ pipe_get_tile_z(struct pipe_transfer *pt,
}
}
break;
- case PIPE_FORMAT_Z24S8_UNORM:
- case PIPE_FORMAT_Z24X8_UNORM:
+ case PIPE_FORMAT_S8Z24_UNORM:
+ case PIPE_FORMAT_X8Z24_UNORM:
{
const uint *ptrc
= (const uint *)(map + y * pt->stride + x*4);
@@ -1489,7 +1489,7 @@ pipe_put_tile_z(struct pipe_transfer *pt,
}
}
break;
- case PIPE_FORMAT_S8Z24_UNORM:
+ case PIPE_FORMAT_Z24S8_UNORM:
{
uint *pDest = (uint *) (map + y * pt->stride + x*4);
assert((pt->usage & PIPE_TRANSFER_READ_WRITE) == PIPE_TRANSFER_READ_WRITE);
@@ -1503,7 +1503,7 @@ pipe_put_tile_z(struct pipe_transfer *pt,
}
}
break;
- case PIPE_FORMAT_X8Z24_UNORM:
+ case PIPE_FORMAT_Z24X8_UNORM:
{
uint *pDest = (uint *) (map + y * pt->stride + x*4);
for (i = 0; i < h; i++) {
@@ -1516,7 +1516,7 @@ pipe_put_tile_z(struct pipe_transfer *pt,
}
}
break;
- case PIPE_FORMAT_Z24S8_UNORM:
+ case PIPE_FORMAT_S8Z24_UNORM:
{
uint *pDest = (uint *) (map + y * pt->stride + x*4);
assert((pt->usage & PIPE_TRANSFER_READ_WRITE) == PIPE_TRANSFER_READ_WRITE);
@@ -1530,7 +1530,7 @@ pipe_put_tile_z(struct pipe_transfer *pt,
}
}
break;
- case PIPE_FORMAT_Z24X8_UNORM:
+ case PIPE_FORMAT_X8Z24_UNORM:
{
uint *pDest = (uint *) (map + y * pt->stride + x*4);
for (i = 0; i < h; i++) {