summaryrefslogtreecommitdiff
path: root/progs
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2010-03-31 14:31:29 +0100
committerJosé Fonseca <jfonseca@vmware.com>2010-03-31 14:31:29 +0100
commit325d55303d5920c137c0047e673a3940a99e4629 (patch)
treed5cab95dfa749c9eec12bd96abba189fbce5ba84 /progs
parentbce109c944c45d763497cea3aeaa6cf0d8163149 (diff)
util: Make util_format_xxx_pack_xxx take pointer as arguments.
Diffstat (limited to 'progs')
-rw-r--r--progs/gallium/unit/u_format_test.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/progs/gallium/unit/u_format_test.c b/progs/gallium/unit/u_format_test.c
index 5274311e03..1aef416a7e 100644
--- a/progs/gallium/unit/u_format_test.c
+++ b/progs/gallium/unit/u_format_test.c
@@ -60,13 +60,17 @@ test_format_unpack_4f(const struct util_format_test_case *test)
static boolean
test_format_pack_4f(const struct util_format_test_case *test)
{
+ float unpacked[4];
uint8_t packed[UTIL_FORMAT_MAX_PACKED_BYTES];
unsigned i;
boolean success;
memset(packed, 0, sizeof packed);
- util_format_pack_4f(test->format, packed, test->unpacked[0], test->unpacked[1], test->unpacked[2], test->unpacked[3]);
+ for (i = 0; i < 4; ++i)
+ unpacked[i] = (float) test->unpacked[i];
+
+ util_format_pack_4f(test->format, packed, unpacked);
success = TRUE;
for (i = 0; i < UTIL_FORMAT_MAX_PACKED_BYTES; ++i)
@@ -158,7 +162,7 @@ test_format_pack_4ub(const struct util_format_test_case *test)
memset(packed, 0, sizeof packed);
- util_format_pack_4ub(test->format, packed, unpacked[0], unpacked[1], unpacked[2], unpacked[3]);
+ util_format_pack_4ub(test->format, packed, unpacked);
success = TRUE;
for (i = 0; i < UTIL_FORMAT_MAX_PACKED_BYTES; ++i)