summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/gallivm/lp_bld_type.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/gallivm/lp_bld_type.c')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_type.c20
1 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 8270cd057f..c327ba045a 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_type.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_type.c
@@ -178,6 +178,25 @@ lp_build_int32_vec4_type(void)
}
+/**
+ * Create unsigned integer type variation of given type.
+ */
+struct lp_type
+lp_uint_type(struct lp_type type)
+{
+ struct lp_type res_type;
+
+ memset(&res_type, 0, sizeof res_type);
+ res_type.width = type.width;
+ res_type.length = type.length;
+
+ return res_type;
+}
+
+
+/**
+ * Create signed integer type variation of given type.
+ */
struct lp_type
lp_int_type(struct lp_type type)
{
@@ -186,6 +205,7 @@ lp_int_type(struct lp_type type)
memset(&res_type, 0, sizeof res_type);
res_type.width = type.width;
res_type.length = type.length;
+ res_type.sign = 1;
return res_type;
}