draw: do not use draw_get_option_use_llvm() inside draw execution paths
authorRoland Scheidegger <sroland@vmware.com>
Wed, 7 May 2014 17:06:39 +0000 (19:06 +0200)
committerRoland Scheidegger <sroland@vmware.com>
Thu, 8 May 2014 14:26:49 +0000 (16:26 +0200)
commit9af68e9b1d116cdc8eb6a22bac091fe4716679e6
treefbcbda42c4b4a5f4079375f1457a909eaf5a558f
parente6967270c75a5b669152127bb7a746d55f4407a6
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" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/auxiliary/draw/draw_context.c
src/gallium/auxiliary/draw/draw_gs.c
src/gallium/auxiliary/draw/draw_private.h
src/gallium/auxiliary/draw/draw_vs.c
src/gallium/auxiliary/draw/draw_vs_exec.c