llvmpipe: Ensure context is flushed when destroying shaders.
authorJosé Fonseca <jfonseca@vmware.com>
Wed, 3 Mar 2010 18:47:29 +0000 (18:47 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Wed, 3 Mar 2010 19:55:49 +0000 (19:55 +0000)
src/gallium/drivers/llvmpipe/lp_state_fs.c

index 90dae3f91018f27b3cf1849cc33e4123a415c4e5..c4b79dd415613dd22613542c999f5a7959c853da 100644 (file)
@@ -974,6 +974,13 @@ llvmpipe_delete_fs_state(struct pipe_context *pipe, void *fs)
    assert(fs != llvmpipe->fs);
    (void) llvmpipe;
 
+   /*
+    * XXX: we need to flush the context until we have some sort of reference
+    * counting in fragment shaders as they may still be binned
+    */
+   draw_flush(llvmpipe->draw);
+   lp_setup_flush(llvmpipe->setup, 0);
+
    variant = shader->variants;
    while(variant) {
       struct lp_fragment_shader_variant *next = variant->next;