diff -u -r a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c --- a/src/gallium/auxiliary/draw/draw_context.c 2010-12-15 09:36:24.000000000 +0300 +++ b/src/gallium/auxiliary/draw/draw_context.c 2010-12-24 12:12:43.496666686 +0300 @@ -71,7 +71,7 @@ struct draw_context * draw_create(struct pipe_context *pipe) { - return draw_create_gallivm(pipe, NULL); + return draw_create_gallivm(pipe, gallivm_create()); } diff -u -r a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c --- a/src/gallium/auxiliary/draw/draw_llvm.c 2010-12-15 09:36:24.000000000 +0300 +++ b/src/gallium/auxiliary/draw/draw_llvm.c 2010-12-24 12:22:09.720000020 +0300 @@ -360,8 +360,6 @@ if (!llvm) return NULL; - lp_build_init(); - llvm->draw = draw; llvm->gallivm = gallivm; diff -u -r a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c --- a/src/gallium/auxiliary/gallivm/lp_bld_init.c 2010-12-15 09:36:24.000000000 +0300 +++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c 2010-12-24 12:14:37.406666686 +0300 @@ -419,6 +419,7 @@ gallivm_create(void) { if (!GlobalGallivm) { + lp_build_init(); GlobalGallivm = CALLOC_STRUCT(gallivm_state); if (GlobalGallivm) { if (!init_gallivm_state(GlobalGallivm)) {