llvmpipe: Convenience function to obtain the integer type with same bitdepth of an...
authorJosé Fonseca <jfonseca@vmware.com>
Mon, 7 Sep 2009 13:42:57 +0000 (14:42 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Mon, 7 Sep 2009 14:02:07 +0000 (15:02 +0100)
src/gallium/drivers/llvmpipe/lp_bld_type.c
src/gallium/drivers/llvmpipe/lp_bld_type.h

index 8e0026f..577644b 100644 (file)
@@ -157,6 +157,17 @@ lp_build_int_vec_type(union lp_type type)
 }
 
 
+union lp_type
+lp_int_type(union lp_type type)
+{
+   union lp_type int_type;
+   int_type.value = 0;
+   int_type.width = type.width;
+   int_type.length = type.length;
+   return int_type;
+}
+
+
 void
 lp_build_context_init(struct lp_build_context *bld,
                       LLVMBuilderRef builder,
index 3ce566b..9933e0b 100644 (file)
@@ -165,6 +165,10 @@ LLVMTypeRef
 lp_build_int_vec_type(union lp_type type);
 
 
+union lp_type
+lp_int_type(union lp_type type);
+
+
 void
 lp_build_context_init(struct lp_build_context *bld,
                       LLVMBuilderRef builder,