summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2010-03-01 16:24:48 +0000
committerJosé Fonseca <jfonseca@vmware.com>2010-03-01 16:24:48 +0000
commitdaf7caf4cfb1c3732a31be56157e9c7d0399ef58 (patch)
tree74ee7d8b28351fd1aca5dd467ff6e8740e4c0838 /src
parentcd8b6523039d68459756db487566a97fac1d4d75 (diff)
util: Use PIPE_FORMAT_R8G8B8A8_UNORM_REV where appropriate.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/util/u_format.csv8
-rw-r--r--src/gallium/auxiliary/util/u_pack_color.h6
-rw-r--r--src/gallium/auxiliary/util/u_surface.c2
-rw-r--r--src/gallium/auxiliary/util/u_tile.c6
4 files changed, 9 insertions, 13 deletions
diff --git a/src/gallium/auxiliary/util/u_format.csv b/src/gallium/auxiliary/util/u_format.csv
index 1d54fd518a..9cb67a261e 100644
--- a/src/gallium/auxiliary/util/u_format.csv
+++ b/src/gallium/auxiliary/util/u_format.csv
@@ -61,8 +61,8 @@ PIPE_FORMAT_A8R8G8B8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , zyxw, r
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
-# XXX: insert PIPE_FORMAT_R8G8B8A8_UNORM here later
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
@@ -172,7 +172,7 @@ PIPE_FORMAT_R16G16B16A16_SSCALED , plain, 1, 1, s16 , s16 , s16 , s16 , xyzw, r
PIPE_FORMAT_R8_UNORM , plain, 1, 1, un8 , , , , x001, rgb
PIPE_FORMAT_R8G8_UNORM , plain, 1, 1, un8 , un8 , , , xy01, rgb
PIPE_FORMAT_R8G8B8_UNORM , plain, 1, 1, un8 , un8 , un8 , , xyz1, rgb
-# XXX: insert PIPE_FORMAT_R8G8B8A8_UNORM here later
+PIPE_FORMAT_R8G8B8A8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , xyzw, rgb
PIPE_FORMAT_R8_USCALED , plain, 1, 1, u8 , , , , x001, rgb
PIPE_FORMAT_R8G8_USCALED , plain, 1, 1, u8 , u8 , , , xy01, rgb
PIPE_FORMAT_R8G8B8_USCALED , plain, 1, 1, u8 , u8 , u8 , , xyz1, rgb
@@ -185,7 +185,3 @@ PIPE_FORMAT_R8_SSCALED , plain, 1, 1, s8 , , , , x001, r
PIPE_FORMAT_R8G8_SSCALED , plain, 1, 1, s8 , s8 , , , xy01, rgb
PIPE_FORMAT_R8G8B8_SSCALED , plain, 1, 1, s8 , s8 , s8 , , xyz1, rgb
PIPE_FORMAT_R8G8B8A8_SSCALED , plain, 1, 1, s8 , s8 , s8 , s8 , xyzw, rgb
-
-# Ambiguous formats
-# FIXME: They are used with different meanings in different places!!!
-PIPE_FORMAT_R8G8B8A8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , wzyx, rgb
diff --git a/src/gallium/auxiliary/util/u_pack_color.h b/src/gallium/auxiliary/util/u_pack_color.h
index 0ab53c75dd..4e4ac7f3da 100644
--- a/src/gallium/auxiliary/util/u_pack_color.h
+++ b/src/gallium/auxiliary/util/u_pack_color.h
@@ -57,7 +57,7 @@ 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:
+ case PIPE_FORMAT_R8G8B8A8_UNORM_REV:
{
uc->ui = (r << 24) | (g << 16) | (b << 8) | a;
}
@@ -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:
+ case PIPE_FORMAT_R8G8B8A8_UNORM_REV:
{
uint p = uc->ui;
*r = (ubyte) ((p >> 24) & 0xff);
@@ -326,7 +326,7 @@ util_pack_color(const float rgba[4], enum pipe_format format, union util_color *
}
switch (format) {
- case PIPE_FORMAT_R8G8B8A8_UNORM:
+ case PIPE_FORMAT_R8G8B8A8_UNORM_REV:
{
uc->ui = (r << 24) | (g << 16) | (b << 8) | a;
}
diff --git a/src/gallium/auxiliary/util/u_surface.c b/src/gallium/auxiliary/util/u_surface.c
index c9f1c9c210..948c1e76d0 100644
--- a/src/gallium/auxiliary/util/u_surface.c
+++ b/src/gallium/auxiliary/util/u_surface.c
@@ -56,7 +56,7 @@ util_create_rgba_surface(struct pipe_screen *screen,
static const enum pipe_format rgbaFormats[] = {
PIPE_FORMAT_A8R8G8B8_UNORM,
PIPE_FORMAT_B8G8R8A8_UNORM,
- PIPE_FORMAT_R8G8B8A8_UNORM,
+ PIPE_FORMAT_R8G8B8A8_UNORM_REV,
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 0051258e22..6000e93a0b 100644
--- a/src/gallium/auxiliary/util/u_tile.c
+++ b/src/gallium/auxiliary/util/u_tile.c
@@ -248,7 +248,7 @@ b8g8r8a8_put_tile_rgba(unsigned *dst,
}
-/*** PIPE_FORMAT_R8G8B8A8_UNORM ***/
+/*** PIPE_FORMAT_R8G8B8A8_UNORM_REV ***/
static void
r8g8b8a8_get_tile_rgba(const unsigned *src,
@@ -1171,7 +1171,7 @@ pipe_tile_raw_to_rgba(enum pipe_format format,
case PIPE_FORMAT_B8G8R8A8_UNORM:
b8g8r8a8_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
break;
- case PIPE_FORMAT_R8G8B8A8_UNORM:
+ case PIPE_FORMAT_R8G8B8A8_UNORM_REV:
r8g8b8a8_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
break;
case PIPE_FORMAT_A1R5G5B5_UNORM:
@@ -1300,7 +1300,7 @@ pipe_put_tile_rgba(struct pipe_transfer *pt,
case PIPE_FORMAT_B8G8R8A8_UNORM:
b8g8r8a8_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);
break;
- case PIPE_FORMAT_R8G8B8A8_UNORM:
+ case PIPE_FORMAT_R8G8B8A8_UNORM_REV:
r8g8b8a8_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);
break;
case PIPE_FORMAT_A1R5G5B5_UNORM: