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 8e0026fd973b21c126909c2a07bcb292c02cdfd2..577644b7ab8f96bd448d199230e9383dcb8512fd 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 3ce566be641ebf2d922d20e29b6ca76ec894545b..9933e0b45c31e793c52721fc2db8771cc6e7fe95 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,