summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/gallivm/lp_bld_conv.h
diff options
context:
space:
mode:
authorAdhemerval Zanella <azanella@linux.vnet.ibm.com>2012-11-22 12:23:23 -0600
committerJosé Fonseca <jfonseca@vmware.com>2012-11-29 11:54:14 +0000
commitb772d784b25771ff939e3c0c87fdf0d8053827be (patch)
tree4a20dc8403f1959e5a0e235b6b0d0aa825b10262 /src/gallium/auxiliary/gallivm/lp_bld_conv.h
parent86902b513469635bb0bc027db0500e2f4d6c498d (diff)
downloadexternal_mesa3d-b772d784b25771ff939e3c0c87fdf0d8053827be.zip
external_mesa3d-b772d784b25771ff939e3c0c87fdf0d8053827be.tar.gz
external_mesa3d-b772d784b25771ff939e3c0c87fdf0d8053827be.tar.bz2
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 <sroland@vmware.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Diffstat (limited to 'src/gallium/auxiliary/gallivm/lp_bld_conv.h')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_conv.h11
1 files changed, 11 insertions, 0 deletions
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);