summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_program.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-12-13 17:29:56 -0700
committerBrian Paul <[email protected]>2010-12-13 17:29:56 -0700
commitc21807d2f7329a363f2c68cd8ef4dfc46575d52f (patch)
tree67e5a0ba0826704470110b57b38fc4e0518c5f7d /src/mesa/state_tracker/st_program.c
parentb830b62a47dec70640062c488cbebd2c8ac487f9 (diff)
st/mesa: add geom program code in destroy_program_variants()
Diffstat (limited to 'src/mesa/state_tracker/st_program.c')
-rw-r--r--src/mesa/state_tracker/st_program.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index 0e67fcca17b..65a56319964 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -1046,6 +1046,27 @@ destroy_program_variants(struct st_context *st, struct gl_program *program)
}
}
break;
+ case MESA_GEOMETRY_PROGRAM:
+ {
+ struct st_geometry_program *stgp =
+ (struct st_geometry_program *) program;
+ struct st_gp_varient *gpv, **prev = &stgp->varients;
+
+ for (gpv = stgp->varients; gpv; ) {
+ struct st_gp_varient *next = gpv->next;
+ if (gpv->key.st == st) {
+ /* unlink from list */
+ *prev = next;
+ /* destroy this variant */
+ delete_gp_varient(st, gpv);
+ }
+ else {
+ prev = &gpv;
+ }
+ gpv = next;
+ }
+ }
+ break;
default:
_mesa_problem(NULL, "Unexpected program target in "
"destroy_program_variants_cb()");