From b772d784b25771ff939e3c0c87fdf0d8053827be Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Thu, 22 Nov 2012 12:23:23 -0600 Subject: gallivm: Add byte-swap construct calls This patch adds two more functions in type conversions header: * lp_build_bswap: construct a call to llvm.bswap intrinsic for an element * lp_build_bswap_vec: byte swap every element in a vector base on the input and output types. Reviewed-by: Roland Scheidegger Reviewed-by: Jose Fonseca --- src/gallium/auxiliary/gallivm/lp_bld_conv.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/gallium/auxiliary/gallivm/lp_bld_conv.h') diff --git a/src/gallium/auxiliary/gallivm/lp_bld_conv.h b/src/gallium/auxiliary/gallivm/lp_bld_conv.h index 42a1113..d7dfed8 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_conv.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_conv.h @@ -43,6 +43,17 @@ struct lp_type; LLVMValueRef +lp_build_bswap(struct gallivm_state *gallivm, + LLVMValueRef res, + struct lp_type type); + +LLVMValueRef +lp_build_bswap_vec(struct gallivm_state *gallivm, + LLVMValueRef packed, + struct lp_type src_type, + struct lp_type dst_type); + +LLVMValueRef lp_build_half_to_float(struct gallivm_state *gallivm, LLVMValueRef src); -- cgit v1.1