summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_test_conv.c
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2010-05-30 16:38:23 +0100
committerJosé Fonseca <jfonseca@vmware.com>2010-05-30 16:38:23 +0100
commitf503b3dd9d6522abdabab1e25d0652c9d3079421 (patch)
treebdccbc87ab88cfa33bc776b95a587d7e226698d8 /src/gallium/drivers/llvmpipe/lp_test_conv.c
parent4b29da1226133f2578557c0e8fa8b859061bf88b (diff)
llvmpipe: Use pointer_to_func() instead of custom wrappers.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_test_conv.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_test_conv.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_test_conv.c b/src/gallium/drivers/llvmpipe/lp_test_conv.c
index 254f0daea3..cb0d02ab32 100644
--- a/src/gallium/drivers/llvmpipe/lp_test_conv.c
+++ b/src/gallium/drivers/llvmpipe/lp_test_conv.c
@@ -34,6 +34,7 @@
*/
+#include "util/u_pointer.h"
#include "gallivm/lp_bld_type.h"
#include "gallivm/lp_bld_const.h"
#include "gallivm/lp_bld_conv.h"
@@ -43,17 +44,6 @@
typedef void (*conv_test_ptr_t)(const void *src, const void *dst);
-/** cast wrapper */
-static conv_test_ptr_t
-voidptr_to_conv_test_ptr_t(void *p)
-{
- union {
- void *v;
- conv_test_ptr_t f;
- } u;
- u.v = p;
- return u.f;
-}
void
write_tsv_header(FILE *fp)
@@ -234,7 +224,7 @@ test_one(unsigned verbose,
LLVMDumpModule(module);
code = LLVMGetPointerToGlobal(engine, func);
- conv_test_ptr = voidptr_to_conv_test_ptr_t(code);
+ conv_test_ptr = (conv_test_ptr_t)pointer_to_func(code);
if(verbose >= 2)
lp_disassemble(code);