From 4a38b154fd02061d8989f8973fbc10740300bf8b Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Thu, 25 Sep 2014 12:23:02 +0900 Subject: gallivm: More fallout from disabling with LLVM 3.6 The draw module would still try to use gallivm, causing many piglit tests to fail with an assertion failure. llvmpipe might have been similarly affected. Reviewed-by: Tom Stellard --- src/gallium/auxiliary/gallivm/lp_bld_init.c | 16 +++++++++++++--- src/gallium/auxiliary/gallivm/lp_bld_init.h | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) (limited to 'src/gallium/auxiliary/gallivm') diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c index 243d24891da..75ef935eb22 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_init.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c @@ -306,7 +306,8 @@ init_gallivm_state(struct gallivm_state *gallivm, const char *name) assert(!gallivm->context); assert(!gallivm->module); - lp_build_init(); + if (!lp_build_init()) + return FALSE; if (USE_GLOBAL_CONTEXT) { gallivm->context = LLVMGetGlobalContext(); @@ -382,11 +383,18 @@ fail: } -void +boolean lp_build_init(void) { if (gallivm_initialized) - return; + return TRUE; + + /* XXX: Remove this once lp_bld_misc.cpp has been adapted to the removal + * of JITMemoryManager + */ +#if HAVE_LLVM >= 0x0306 + return FALSE; +#endif #ifdef DEBUG gallivm_debug = debug_get_option_gallivm_debug(); @@ -477,6 +485,8 @@ lp_build_init(void) util_cpu_caps.has_avx = 0; util_cpu_caps.has_f16c = 0; #endif + + return TRUE; } diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.h b/src/gallium/auxiliary/gallivm/lp_bld_init.h index 2e32cf8b077..64c5278c24e 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_init.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_init.h @@ -49,7 +49,7 @@ struct gallivm_state }; -void +boolean lp_build_init(void); -- cgit v1.2.3