diff options
author | Jakob Bornecrantz <[email protected]> | 2011-01-23 05:22:30 +0100 |
---|---|---|
committer | Jakob Bornecrantz <[email protected]> | 2011-01-24 03:26:59 +0100 |
commit | 4c73030d47f39441d718157f7d9a59c136bbfac0 (patch) | |
tree | 39c6e9864fe012eb79fcd43d832ad53d85b1ab6c /src/gallium/auxiliary/gallivm | |
parent | 832029e1c1c027e8f697cc8fdc75902e3c24f38a (diff) |
draw: Init llvm if not provided
Diffstat (limited to 'src/gallium/auxiliary/gallivm')
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_init.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c index 7504cb5cf2f..45addee8fab 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_init.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c @@ -222,11 +222,12 @@ free_gallivm_state(struct gallivm_state *gallivm) static boolean init_gallivm_state(struct gallivm_state *gallivm) { - assert(gallivm_initialized); assert(!gallivm->context); assert(!gallivm->module); assert(!gallivm->provider); + lp_build_init(); + gallivm->context = LLVMContextCreate(); if (!gallivm->context) goto fail; @@ -387,6 +388,9 @@ gallivm_garbage_collect(struct gallivm_state *gallivm) void lp_build_init(void) { + if (gallivm_initialized) + return; + #ifdef DEBUG gallivm_debug = debug_get_option_gallivm_debug(); #endif |