Mesa (master): gallivm: added lp_elem_type()
Brian Paul
brianp at kemper.freedesktop.org
Thu Nov 4 16:02:52 UTC 2010
Module: Mesa
Branch: master
Commit: fb94747b6639ba976aaaaba5a37aa2fe56999310
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=fb94747b6639ba976aaaaba5a37aa2fe56999310
Author: Brian Paul <brianp at vmware.com>
Date: Thu Nov 4 10:00:58 2010 -0600
gallivm: added lp_elem_type()
---
src/gallium/auxiliary/gallivm/lp_bld_type.c | 16 ++++++++++++++++
src/gallium/auxiliary/gallivm/lp_bld_type.h | 4 ++++
2 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_type.c b/src/gallium/auxiliary/gallivm/lp_bld_type.c
index 06f1aae..5205c7a 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_type.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_type.c
@@ -188,6 +188,22 @@ lp_build_int32_vec4_type(void)
/**
+ * Create element of vector type
+ */
+struct lp_type
+lp_elem_type(struct lp_type type)
+{
+ struct lp_type res_type;
+
+ assert(type.length > 1);
+ res_type = type;
+ res_type.length = 1;
+
+ return res_type;
+}
+
+
+/**
* Create unsigned integer type variation of given type.
*/
struct lp_type
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_type.h b/src/gallium/auxiliary/gallivm/lp_bld_type.h
index fec1d3d..a135d0d 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_type.h
+++ b/src/gallium/auxiliary/gallivm/lp_bld_type.h
@@ -365,6 +365,10 @@ lp_unorm8_vec4_type(void)
struct lp_type
+lp_elem_type(struct lp_type type);
+
+
+struct lp_type
lp_uint_type(struct lp_type type);
More information about the mesa-commit
mailing list