summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_state_fs.c
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2010-03-03 18:47:29 +0000
committerJosé Fonseca <[email protected]>2010-03-03 19:55:49 +0000
commit4d5dd82558fcf1f6fcfdb95b225a4e3f842a9133 (patch)
tree8094559e9494e7df951577677975d98b2e32a5bb /src/gallium/drivers/llvmpipe/lp_state_fs.c
parentb87406e55f029d29594ae76a4b39a4fe1007fe4f (diff)
llvmpipe: Ensure context is flushed when destroying shaders.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_state_fs.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_fs.c7
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 90dae3f9101..c4b79dd4156 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;