diff options
author | Younes Manton <[email protected]> | 2009-12-28 17:33:34 -0500 |
---|---|---|
committer | Younes Manton <[email protected]> | 2009-12-28 17:59:01 -0500 |
commit | 85dcc070719ef6a6bcf65dc4996b1733f63912d8 (patch) | |
tree | 909e191a4b44987761756c53514cdc950ce4ea14 /src/gallium/drivers/nv30/nv30_fragprog.c | |
parent | cb9214f33030e1f482d59049c239f20061d24ad8 (diff) |
nouveau: Unreference state/buffer objects on context/screen destruction.
- unreference state objects so that buffer objects are unreferenced and
eventually destroyed
- free channel at screen's destruction
Based on Krzysztof Smiechowicz's patch.
Diffstat (limited to 'src/gallium/drivers/nv30/nv30_fragprog.c')
-rw-r--r-- | src/gallium/drivers/nv30/nv30_fragprog.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/nv30/nv30_fragprog.c b/src/gallium/drivers/nv30/nv30_fragprog.c index dc4e583ce9d..d1ff18e2dfb 100644 --- a/src/gallium/drivers/nv30/nv30_fragprog.c +++ b/src/gallium/drivers/nv30/nv30_fragprog.c @@ -886,6 +886,12 @@ void nv30_fragprog_destroy(struct nv30_context *nv30, struct nv30_fragment_program *fp) { + if (fp->buffer) + pipe_buffer_reference(&fp->buffer, NULL); + + if (fp->so) + so_ref(NULL, &fp->so); + if (fp->insn_len) FREE(fp->insn); } |