summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/gallivm/lp_bld_type.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-11-04 10:00:58 -0600
committerBrian Paul <brianp@vmware.com>2010-11-04 10:00:58 -0600
commitfb94747b6639ba976aaaaba5a37aa2fe56999310 (patch)
treee27dd30da9c4e30efe6624013078fbda7a39c8b2 /src/gallium/auxiliary/gallivm/lp_bld_type.c
parentede232e9898698258391a280a098a7ba951b0099 (diff)
gallivm: added lp_elem_type()
Diffstat (limited to 'src/gallium/auxiliary/gallivm/lp_bld_type.c')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_type.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_type.c b/src/gallium/auxiliary/gallivm/lp_bld_type.c
index 06f1aae6dc..5205c7ada9 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