llvmpipe: Convenience function to obtain the integer type with same bitdepth of an arbitrary type.

This commit is contained in:
José Fonseca 2009-09-07 14:42:57 +01:00
parent fa0f4b35be
commit 0c2ea24338
2 changed files with 15 additions and 0 deletions

View 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,

View 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,