From: José Fonseca Date: Mon, 7 Sep 2009 13:42:57 +0000 (+0100) Subject: llvmpipe: Convenience function to obtain the integer type with same bitdepth of an... X-Git-Tag: mesa-7.8~2720^2~511 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0c2ea2433833d5eda8a4fefe1412bf0ea40b14bf;p=platform%2Fupstream%2Fmesa.git llvmpipe: Convenience function to obtain the integer type with same bitdepth of an arbitrary type. --- diff --git a/src/gallium/drivers/llvmpipe/lp_bld_type.c b/src/gallium/drivers/llvmpipe/lp_bld_type.c index 8e0026f..577644b 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_type.c +++ b/src/gallium/drivers/llvmpipe/lp_bld_type.c @@ -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, diff --git a/src/gallium/drivers/llvmpipe/lp_bld_type.h b/src/gallium/drivers/llvmpipe/lp_bld_type.h index 3ce566b..9933e0b 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_type.h +++ b/src/gallium/drivers/llvmpipe/lp_bld_type.h @@ -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,