summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2010-06-10 16:23:25 +0100
committerJosé Fonseca <jfonseca@vmware.com>2010-06-14 16:50:40 +0100
commit21a9ef12bf229bf66287b5444708c51a89eaa09c (patch)
tree79c8824edf525aac6489e293e390e128c805b317 /src/gallium/auxiliary/gallivm/lp_bld_format_aos.c
parent91bbe466c7a149d1f9d1cc9bd27f8aedb45b9d2e (diff)
gallivm: Use func_to_pointer().
Diffstat (limited to 'src/gallium/auxiliary/gallivm/lp_bld_format_aos.c')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_format_aos.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c b/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c
index eb49204238..87e3e72a6e 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c
@@ -310,21 +310,6 @@ lp_build_pack_rgba_aos(LLVMBuilderRef builder,
}
-typedef void (*fetch_func)(float *, const uint8_t *, unsigned, unsigned);
-
-/** cast wrapper */
-static void *
-fetch_func_ptr_to_voidptr(fetch_func f)
-{
- union {
- void *v;
- fetch_func f;
- } u;
- u.f = f;
- return u.v;
-}
-
-
/**
* Fetch a pixel into a 4 float AoS.
*
@@ -406,7 +391,7 @@ lp_build_fetch_rgba_aos(LLVMBuilderRef builder,
assert(LLVMIsDeclaration(function));
LLVMAddGlobalMapping(lp_build_engine, function,
- fetch_func_ptr_to_voidptr(format_desc->fetch_rgba_float));
+ func_to_pointer((func_pointer)format_desc->fetch_rgba_float));
}
tmp = lp_build_alloca(builder, LLVMVectorType(LLVMFloatType(), 4), "");