Mesa (master): llvmpipe: Ensure context is flushed when destroying shaders.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Wed Mar 3 11:56:03 PST 2010


Module: Mesa
Branch: master
Commit: 4d5dd82558fcf1f6fcfdb95b225a4e3f842a9133
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4d5dd82558fcf1f6fcfdb95b225a4e3f842a9133

Author: José Fonseca <jfonseca at vmware.com>
Date:   Wed Mar  3 18:47:29 2010 +0000

llvmpipe: Ensure context is flushed when destroying shaders.

---

 src/gallium/drivers/llvmpipe/lp_state_fs.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c
index 90dae3f..c4b79dd 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_fs.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c
@@ -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;



More information about the mesa-commit mailing list