draw: do not use draw_get_option_use_llvm() inside draw execution paths
1c73e919 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> (cherry picked from commit 9af68e9b)
Showing
- src/gallium/auxiliary/draw/draw_context.c 2 additions, 0 deletionssrc/gallium/auxiliary/draw/draw_context.c
- src/gallium/auxiliary/draw/draw_gs.c 5 additions, 5 deletionssrc/gallium/auxiliary/draw/draw_gs.c
- src/gallium/auxiliary/draw/draw_private.h 1 addition, 3 deletionssrc/gallium/auxiliary/draw/draw_private.h
- src/gallium/auxiliary/draw/draw_vs.c 2 additions, 2 deletionssrc/gallium/auxiliary/draw/draw_vs.c
- src/gallium/auxiliary/draw/draw_vs_exec.c 2 additions, 2 deletionssrc/gallium/auxiliary/draw/draw_vs_exec.c
Loading
Please register or sign in to comment