[Mesa-dev] [PATCH 2/9] gallivm: add a lp_build_intrinsic_trinary() function
Maxence Le Doré
maxence.ledore at gmail.com
Sat Jan 4 15:42:37 PST 2014
From: Maxence Le Doré <Maxence Le Doré>
---
src/gallium/auxiliary/gallivm/lp_bld_intr.c | 18 ++++++++++++++++++
src/gallium/auxiliary/gallivm/lp_bld_intr.h | 9 +++++++++
2 files changed, 27 insertions(+)
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_intr.c b/src/gallium/auxiliary/gallivm/lp_bld_intr.c
index d501be1..dce889f 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_intr.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_intr.c
@@ -131,6 +131,24 @@ lp_build_intrinsic_binary(LLVMBuilderRef builder,
}
+LLVMValueRef
+lp_build_intrinsic_trinary(LLVMBuilderRef builder,
+ const char *name,
+ LLVMTypeRef ret_type,
+ LLVMValueRef a,
+ LLVMValueRef b,
+ LLVMValueRef c)
+{
+ LLVMValueRef args[3];
+
+ args[0] = a;
+ args[1] = b;
+ args[2] = c;
+
+ return lp_build_intrinsic(builder, name, ret_type, args, 3);
+}
+
+
/**
* Call intrinsic with arguments adapted to intrinsic vector length.
*
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_intr.h b/src/gallium/auxiliary/gallivm/lp_bld_intr.h
index c9f911c..b1f4f96 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_intr.h
+++ b/src/gallium/auxiliary/gallivm/lp_bld_intr.h
@@ -78,6 +78,15 @@ lp_build_intrinsic_binary(LLVMBuilderRef builder,
LLVMValueRef
+lp_build_intrinsic_trinary(LLVMBuilderRef builder,
+ const char *name,
+ LLVMTypeRef ret_type,
+ LLVMValueRef a,
+ LLVMValueRef b,
+ LLVMValueRef c);
+
+
+LLVMValueRef
lp_build_intrinsic_binary_anylength(struct gallivm_state *gallivm,
const char *name,
struct lp_type src_type,
--
1.8.5.2
More information about the mesa-dev
mailing list