From 9493260fdcef4a8238b9d9a9dc3e753dd89810fe Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Sat, 8 Aug 2009 22:49:23 +0100 Subject: llvmpipe: Centralize lp_build_context initialization. --- src/gallium/drivers/llvmpipe/lp_bld_type.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/gallium/drivers/llvmpipe/lp_bld_type.c') diff --git a/src/gallium/drivers/llvmpipe/lp_bld_type.c b/src/gallium/drivers/llvmpipe/lp_bld_type.c index 1e95a1a349..fd6ff99e2e 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_type.c +++ b/src/gallium/drivers/llvmpipe/lp_bld_type.c @@ -155,3 +155,16 @@ lp_build_int_vec_type(union lp_type type) LLVMTypeRef elem_type = lp_build_int_elem_type(type); return LLVMVectorType(elem_type, type.length); } + + +void +lp_build_context_init(struct lp_build_context *bld, + LLVMBuilderRef builder, + union lp_type type) +{ + bld->builder = builder; + bld->type = type; + bld->undef = lp_build_undef(type); + bld->zero = lp_build_zero(type); + bld->one = lp_build_one(type); +} -- cgit v1.2.3