summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nvfx/nvfx_context.c
diff options
context:
space:
mode:
authorLuca Barbieri <luca@luca-barbieri.com>2010-08-22 16:15:51 +0200
committerLuca Barbieri <luca@luca-barbieri.com>2010-08-22 20:28:27 +0200
commitdf86f1e7d50e01b92e03dc25fa9e9258d2d4fa2f (patch)
treebd0c4eaa6bee0f09d091d53d150f0189c5d4a9fc /src/gallium/drivers/nvfx/nvfx_context.c
parent47537a4557c8a264f1e0eb308aff07464c81e0ca (diff)
nvfx: refactor to support multiple fragment program versions
Diffstat (limited to 'src/gallium/drivers/nvfx/nvfx_context.c')
-rw-r--r--src/gallium/drivers/nvfx/nvfx_context.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/nvfx/nvfx_context.c b/src/gallium/drivers/nvfx/nvfx_context.c
index 99ad7bfacf..80b36fb7b9 100644
--- a/src/gallium/drivers/nvfx/nvfx_context.c
+++ b/src/gallium/drivers/nvfx/nvfx_context.c
@@ -33,6 +33,9 @@ nvfx_destroy(struct pipe_context *pipe)
{
struct nvfx_context *nvfx = nvfx_context(pipe);
+ if(nvfx->dummy_fs)
+ pipe->delete_fs_state(pipe, nvfx->dummy_fs);
+
for(unsigned i = 0; i < nvfx->vtxbuf_nr; ++i)
pipe_resource_reference(&nvfx->vtxbuf[i].buffer, 0);
pipe_resource_reference(&nvfx->idxbuf.buffer, 0);
@@ -42,6 +45,7 @@ nvfx_destroy(struct pipe_context *pipe)
if (nvfx->draw)
draw_destroy(nvfx->draw);
+
FREE(nvfx);
}