summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-05-20 15:20:29 -0600
committerBrian Paul <[email protected]>2008-05-20 15:20:29 -0600
commit26f874e967e5bcbd0e0c73674df3d3900b98d35b (patch)
tree8c982c2c7b2e0990207507f44ee9772ed9a5d9d3 /src/mesa/state_tracker
parent7899ecdd6502a323b052f9ad4acd23cbb9ba88db (diff)
gallium: fix vertex shader mem leak (glRasterPos)
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_cb_program.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_cb_program.c b/src/mesa/state_tracker/st_cb_program.c
index a1694d93c5d..5f753afdd36 100644
--- a/src/mesa/state_tracker/st_cb_program.c
+++ b/src/mesa/state_tracker/st_cb_program.c
@@ -143,6 +143,12 @@ st_delete_program(GLcontext *ctx, struct gl_program *prog)
stvp->driver_shader = NULL;
}
+ if (stvp->draw_shader) {
+ /* this would only have been allocated for the RasterPos path */
+ draw_delete_vertex_shader(st->draw, stvp->draw_shader);
+ stvp->draw_shader = NULL;
+ }
+
if (stvp->state.tokens) {
FREE((void *) stvp->state.tokens);
stvp->state.tokens = NULL;
@@ -225,6 +231,7 @@ static void st_program_string_notify( GLcontext *ctx,
}
if (stvp->draw_shader) {
+ /* this would only have been allocated for the RasterPos path */
draw_delete_vertex_shader(st->draw, stvp->draw_shader);
stvp->draw_shader = NULL;
}