From 325d55303d5920c137c0047e673a3940a99e4629 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Wed, 31 Mar 2010 14:31:29 +0100 Subject: util: Make util_format_xxx_pack_xxx take pointer as arguments. --- progs/gallium/unit/u_format_test.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'progs') 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) -- cgit v1.2.3