summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_vs_exec.c
diff options
context:
space:
mode:
authorRoland Scheidegger <sroland@vmware.com>2014-05-07 19:06:39 +0200
committerRoland Scheidegger <sroland@vmware.com>2014-05-08 16:26:49 +0200
commit9af68e9b1d116cdc8eb6a22bac091fe4716679e6 (patch)
treefbcbda42c4b4a5f4079375f1457a909eaf5a558f /src/gallium/auxiliary/draw/draw_vs_exec.c
parente6967270c75a5b669152127bb7a746d55f4407a6 (diff)
downloadexternal_mesa3d-9af68e9b1d116cdc8eb6a22bac091fe4716679e6.tar.gz
external_mesa3d-9af68e9b1d116cdc8eb6a22bac091fe4716679e6.tar.bz2
external_mesa3d-9af68e9b1d116cdc8eb6a22bac091fe4716679e6.zip
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>
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_vs_exec.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_vs_exec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/draw/draw_vs_exec.c b/src/gallium/auxiliary/draw/draw_vs_exec.c
index 6a18d8c46b..277d739e2c 100644
--- a/src/gallium/auxiliary/draw/draw_vs_exec.c
+++ b/src/gallium/auxiliary/draw/draw_vs_exec.c
@@ -63,7 +63,7 @@ vs_exec_prepare( struct draw_vertex_shader *shader,
{
struct exec_vertex_shader *evs = exec_vertex_shader(shader);
- debug_assert(!draw_get_option_use_llvm());
+ debug_assert(!draw->llvm);
/* Specify the vertex program to interpret/execute.
* Avoid rebinding when possible.
*/
@@ -97,7 +97,7 @@ vs_exec_run_linear( struct draw_vertex_shader *shader,
unsigned slot;
boolean clamp_vertex_color = shader->draw->rasterizer->clamp_vertex_color;
- debug_assert(!draw_get_option_use_llvm());
+ debug_assert(!shader->draw->llvm);
tgsi_exec_set_constant_buffers(machine, PIPE_MAX_CONSTANT_BUFFERS,
constants, const_size);