diff options
author | José Fonseca <[email protected]> | 2010-03-31 14:31:29 +0100 |
---|---|---|
committer | José Fonseca <[email protected]> | 2010-03-31 14:31:29 +0100 |
commit | 325d55303d5920c137c0047e673a3940a99e4629 (patch) | |
tree | d5cab95dfa749c9eec12bd96abba189fbce5ba84 /progs/gallium | |
parent | bce109c944c45d763497cea3aeaa6cf0d8163149 (diff) |
util: Make util_format_xxx_pack_xxx take pointer as arguments.
Diffstat (limited to 'progs/gallium')
-rw-r--r-- | progs/gallium/unit/u_format_test.c | 8 |
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 5274311e035..1aef416a7ed 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) |