Mesa (lp-binning): llvmpipe: added lp_build_int32_vec4_type()
Brian Paul
brianp at kemper.freedesktop.org
Wed Dec 16 23:12:36 UTC 2009
Module: Mesa
Branch: lp-binning
Commit: e288796c92bb7d75cd6dfee968804c6230ef38d7
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e288796c92bb7d75cd6dfee968804c6230ef38d7
Author: Brian Paul <brianp at vmware.com>
Date: Wed Dec 16 12:33:11 2009 -0700
llvmpipe: added lp_build_int32_vec4_type()
---
src/gallium/drivers/llvmpipe/lp_bld_type.c | 21 +++++++++++++++++++++
src/gallium/drivers/llvmpipe/lp_bld_type.h | 4 ++++
2 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/src/gallium/drivers/llvmpipe/lp_bld_type.c b/src/gallium/drivers/llvmpipe/lp_bld_type.c
index 606243d..e8cf725 100644
--- a/src/gallium/drivers/llvmpipe/lp_bld_type.c
+++ b/src/gallium/drivers/llvmpipe/lp_bld_type.c
@@ -157,6 +157,27 @@ lp_build_int_vec_type(struct lp_type type)
}
+/**
+ * Build int32[4] vector type
+ */
+LLVMTypeRef
+lp_build_int32_vec4_type()
+{
+ struct lp_type t;
+ LLVMTypeRef type;
+
+ memset(&t, 0, sizeof(t));
+ t.floating = FALSE; /* floating point values */
+ t.sign = TRUE; /* values are signed */
+ t.norm = FALSE; /* values are not limited to [0,1] or [-1,1] */
+ t.width = 32; /* 32-bit int */
+ t.length = 4; /* 4 elements per vector */
+
+ type = lp_build_int_elem_type(t);
+ return LLVMVectorType(type, t.length);
+}
+
+
struct lp_type
lp_int_type(struct lp_type type)
{
diff --git a/src/gallium/drivers/llvmpipe/lp_bld_type.h b/src/gallium/drivers/llvmpipe/lp_bld_type.h
index ee5ca34..118fb33 100644
--- a/src/gallium/drivers/llvmpipe/lp_bld_type.h
+++ b/src/gallium/drivers/llvmpipe/lp_bld_type.h
@@ -162,6 +162,10 @@ LLVMTypeRef
lp_build_int_vec_type(struct lp_type type);
+LLVMTypeRef
+lp_build_int32_vec4_type();
+
+
struct lp_type
lp_int_type(struct lp_type type);
More information about the mesa-commit
mailing list