summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/util/u_format_tests.c
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2010-04-01 13:34:24 +0100
committerJosé Fonseca <jfonseca@vmware.com>2010-04-01 13:34:24 +0100
commitca6aacf842c0075f12907d13fec89cc7f1eac4f0 (patch)
treee0634d3107475e2b7e82fee8e1dfebf5426b9f98 /src/gallium/auxiliary/util/u_format_tests.c
parent9899ebd2fcb099279320d0bf77221d6b1e6e7cd9 (diff)
util: Add test case for PIPE_FORMAT_DXT1_RGB.
Diffstat (limited to 'src/gallium/auxiliary/util/u_format_tests.c')
-rw-r--r--src/gallium/auxiliary/util/u_format_tests.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_format_tests.c b/src/gallium/auxiliary/util/u_format_tests.c
index a2195fb1a9..816f4fd985 100644
--- a/src/gallium/auxiliary/util/u_format_tests.c
+++ b/src/gallium/auxiliary/util/u_format_tests.c
@@ -38,6 +38,7 @@
#define PACKED_2x8(x, y) {x, y, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
#define PACKED_3x8(x, y, z) {x, y, z, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
#define PACKED_4x8(x, y, z, w) {x, y, z, w, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
+#define PACKED_8x8(a, b, c, d, e, f, g, h) {a, b, c, d, e, f, g, h, 0, 0, 0, 0, 0, 0, 0, 0}
#define PACKED_1x16(x) {(x) & 0xff, (x) >> 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
#define PACKED_2x16(x, y) {(x) & 0xff, (x) >> 8, (y) & 0xff, (y) >> 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
@@ -207,6 +208,37 @@ util_format_test_cases[] =
* TODO: Compressed formats
*/
+ {
+ PIPE_FORMAT_DXT1_RGB,
+ PACKED_8x8(0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff),
+ PACKED_8x8(0xf2, 0xd7, 0xb0, 0x20, 0xae, 0x2c, 0x6f, 0x97),
+ {
+ {
+ 0x99/255.0, 0xb0/255.0, 0x8e/255.0, 0xff/255.0,
+ 0x5d/255.0, 0x62/255.0, 0x89/255.0, 0xff/255.0,
+ 0x99/255.0, 0xb0/255.0, 0x8e/255.0, 0xff/255.0,
+ 0x99/255.0, 0xb0/255.0, 0x8e/255.0, 0xff/255.0
+ },
+ {
+ 0xd6/255.0, 0xff/255.0, 0x94/255.0, 0xff/255.0,
+ 0x5d/255.0, 0x62/255.0, 0x89/255.0, 0xff/255.0,
+ 0x99/255.0, 0xb0/255.0, 0x8e/255.0, 0xff/255.0,
+ 0xd6/255.0, 0xff/255.0, 0x94/255.0, 0xff/255.0
+ },
+ {
+ 0x5d/255.0, 0x62/255.0, 0x89/255.0, 0xff/255.0,
+ 0x5d/255.0, 0x62/255.0, 0x89/255.0, 0xff/255.0,
+ 0x99/255.0, 0xb0/255.0, 0x8e/255.0, 0xff/255.0,
+ 0x21/255.0, 0x14/255.0, 0x84/255.0, 0xff/255.0
+ },
+ {
+ 0x5d/255.0, 0x62/255.0, 0x89/255.0, 0xff/255.0,
+ 0x21/255.0, 0x14/255.0, 0x84/255.0, 0xff/255.0,
+ 0x21/255.0, 0x14/255.0, 0x84/255.0, 0xff/255.0,
+ 0x99/255.0, 0xb0/255.0, 0x8e/255.0, 0xff/255.0
+ }
+ }
+ },
/*
* Standard 8-bit integer formats