aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2012-01-27 14:40:06 +0000
committerIan Romanick <[email protected]>2012-07-06 10:08:59 -0700
commitde8bb6a59b09821d66f7ff38e35cce20c3cfa86f (patch)
tree0ec9e7a657258e6114fa4fa043317104b24b9022 /src
parent646ac024624ebc74ec540992507060968c3d9a4e (diff)
draw: Ensure that prepare is always run after LLVM garbagge collection.
Should avoid dangling pointer derreference with glean --run results --overwrite --quick --tests texSwizzle NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Brian Paul <[email protected]> (cherry picked from commit 07635a4799b15a7575e1feb8859ecc7734850deb)
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/draw/draw_llvm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c
index e71c802696f..b81c72573bd 100644
--- a/src/gallium/auxiliary/draw/draw_llvm.c
+++ b/src/gallium/auxiliary/draw/draw_llvm.c
@@ -65,8 +65,13 @@ static void
draw_llvm_garbage_collect_callback(void *cb_data)
{
struct draw_llvm *llvm = (struct draw_llvm *) cb_data;
+ struct draw_context *draw = llvm->draw;
struct draw_llvm_variant_list_item *li;
+ /* Ensure prepare will be run and shaders recompiled */
+ assert(!draw->suspend_flushing);
+ draw_do_flush(draw, DRAW_FLUSH_STATE_CHANGE);
+
/* free all shader variants */
li = first_elem(&llvm->vs_variants_list);
while (!at_end(&llvm->vs_variants_list, li)) {