summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_program.c
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2008-03-23 14:18:06 +1100
committerBen Skeggs <skeggsb@gmail.com>2008-03-23 14:18:06 +1100
commitdcf04ee23c0131c2a3fdb267d132d6b27db393c4 (patch)
treed1a3fa9823f28c37dc8d7d8649d68e2f9a7c4b47 /src/mesa/state_tracker/st_program.c
parent75b85fd33abe143d9cca6f8405f0a4243b6a5ddb (diff)
parenta35c1ca3ad4361fee30d21ef13d8d37ae91aee66 (diff)
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
Diffstat (limited to 'src/mesa/state_tracker/st_program.c')
-rw-r--r--src/mesa/state_tracker/st_program.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index d9d11ee0e8..101a6a48af 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -260,6 +260,16 @@ st_translate_vertex_program(struct st_context *st,
outputMapping = defaultOutputMapping;
}
+ /* free old shader state, if any */
+ if (stvp->state.tokens) {
+ FREE((void *) stvp->state.tokens);
+ stvp->state.tokens = NULL;
+ }
+ if (stvp->driver_shader) {
+ pipe->delete_vs_state(pipe, stvp->driver_shader);
+ stvp->driver_shader = NULL;
+ }
+
/* XXX: fix static allocation of tokens:
*/
num_tokens = tgsi_translate_mesa_program( TGSI_PROCESSOR_VERTEX,