diff options
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 |