[Mesa-dev] [PATCH 1/9] gallivm: add a lp_build_intrinsic_map_trinary() function

Maxence Le Doré maxence.ledore at gmail.com
Sat Jan 4 15:42:36 PST 2014


From: Maxence Le Doré <Maxence Le Doré>

---
 src/gallium/auxiliary/gallivm/lp_bld_intr.c | 16 ++++++++++++++++
 src/gallium/auxiliary/gallivm/lp_bld_intr.h |  9 +++++++++
 2 files changed, 25 insertions(+)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_intr.c b/src/gallium/auxiliary/gallivm/lp_bld_intr.c
index 2bf1211..d501be1 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_intr.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_intr.c
@@ -276,3 +276,19 @@ lp_build_intrinsic_map_binary(struct gallivm_state *gallivm,
 }
 
 
+LLVMValueRef
+lp_build_intrinsic_map_trinary(struct gallivm_state *gallivm,
+                               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_map(gallivm, name, ret_type, args, 3);
+}
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_intr.h b/src/gallium/auxiliary/gallivm/lp_bld_intr.h
index 38c5c29..c9f911c 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_intr.h
+++ b/src/gallium/auxiliary/gallivm/lp_bld_intr.h
@@ -109,4 +109,13 @@ lp_build_intrinsic_map_binary(struct gallivm_state *gallivm,
                               LLVMValueRef b);
 
 
+LLVMValueRef
+lp_build_intrinsic_map_trinary(struct gallivm_state *gallivm,
+                               const char *name,
+                               LLVMTypeRef ret_type,
+                               LLVMValueRef a,
+                               LLVMValueRef b,
+                               LLVMValueRef c);
+
+
 #endif /* !LP_BLD_INTR_H */
-- 
1.8.5.2



More information about the mesa-dev mailing list