From 9af68e9b1d116cdc8eb6a22bac091fe4716679e6 Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Wed, 7 May 2014 19:06:39 +0200 Subject: draw: do not use draw_get_option_use_llvm() inside draw execution paths 1c73e919a4b4dd79166d0633075990056f27fd28 made it possible to not allocate the tgsi machine if llvm was used. However, draw_get_option_use_llvm() is not reliable after draw context creation, since drivers can explicitly request a non-llvm draw context even if draw_get_option_use_llvm() would return true (and softpipe does just that) which leads to crashes. Thus use draw->llvm to determine if we're using llvm or not instead (and make draw->llvm available even if HAVE_LLVM is false so we don't have to put even more ifdefs). Cc: "10.2" Reviewed-by: Brian Paul --- src/gallium/auxiliary/draw/draw_private.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/gallium/auxiliary/draw/draw_private.h') diff --git a/src/gallium/auxiliary/draw/draw_private.h b/src/gallium/auxiliary/draw/draw_private.h index 801d009..783c3ef 100644 --- a/src/gallium/auxiliary/draw/draw_private.h +++ b/src/gallium/auxiliary/draw/draw_private.h @@ -47,7 +47,6 @@ #include "tgsi/tgsi_scan.h" #ifdef HAVE_LLVM -struct draw_llvm; struct gallivm_state; #endif @@ -69,6 +68,7 @@ struct tgsi_exec_machine; struct tgsi_sampler; struct draw_pt_front_end; struct draw_assembler; +struct draw_llvm; /** @@ -318,9 +318,7 @@ struct draw_context unsigned start_instance; unsigned start_index; -#ifdef HAVE_LLVM struct draw_llvm *llvm; -#endif /** Texture sampler and sampler view state. * Note that we have arrays indexed by shader type. At this time -- cgit v1.1