summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/nv40/nv40_state.c
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2007-12-16 16:01:25 +1100
committerBen Skeggs <skeggsb@gmail.com>2007-12-16 16:01:25 +1100
commitab4c2e014d4117d6ef43685a57c0ea1b93ba5562 (patch)
treeda12e103c50c0970dcc2f8af84a361cfa628ba7c /src/mesa/pipe/nv40/nv40_state.c
parentaf0b4a50e59435a782f59ccec7ad0552c0304016 (diff)
nv40: destroy programs
Diffstat (limited to 'src/mesa/pipe/nv40/nv40_state.c')
-rw-r--r--src/mesa/pipe/nv40/nv40_state.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/mesa/pipe/nv40/nv40_state.c b/src/mesa/pipe/nv40/nv40_state.c
index 5aeba684ee..5b070a280d 100644
--- a/src/mesa/pipe/nv40/nv40_state.c
+++ b/src/mesa/pipe/nv40/nv40_state.c
@@ -505,7 +505,11 @@ nv40_vp_state_bind(struct pipe_context *pipe, void *hwcso)
static void
nv40_vp_state_delete(struct pipe_context *pipe, void *hwcso)
{
- free(hwcso);
+ struct nv40_context *nv40 = (struct nv40_context *)pipe;
+ struct nv40_vertex_program *vp = hwcso;
+
+ nv40_vertprog_destroy(nv40, vp);
+ free(vp);
}
static void *
@@ -533,7 +537,11 @@ nv40_fp_state_bind(struct pipe_context *pipe, void *hwcso)
static void
nv40_fp_state_delete(struct pipe_context *pipe, void *hwcso)
{
- free(hwcso);
+ struct nv40_context *nv40 = (struct nv40_context *)pipe;
+ struct nv40_fragment_program *fp = hwcso;
+
+ nv40_fragprog_destroy(nv40, fp);
+ free(fp);
}
static void