summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mesa/state_tracker/st_cb_program.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_cb_program.c b/src/mesa/state_tracker/st_cb_program.c
index 63a954264e..1f34fc86ad 100644
--- a/src/mesa/state_tracker/st_cb_program.c
+++ b/src/mesa/state_tracker/st_cb_program.c
@@ -190,11 +190,15 @@ static void st_program_string_notify( GLcontext *ctx,
stvp->cso = NULL;
}
+ if (stvp->draw_shader) {
+ draw_delete_vertex_shader(st->draw, stvp->draw_shader);
+ stvp->draw_shader = NULL;
+ }
+
stvp->param_state = stvp->Base.Base.Parameters->StateFlags;
if (st->vp == stvp)
st->dirty.st |= ST_NEW_VERTEX_PROGRAM;
-
}
}