gallium: fix a few more shader-related mem leaks

This commit is contained in:
Brian
2008-03-22 10:29:30 -06:00
parent f8acc3965e
commit a35c1ca3ad
4 changed files with 45 additions and 42 deletions

View File

@@ -77,34 +77,6 @@ struct translated_vertex_program
/**
* Free data hanging off the st vert prog.
*/
void
st_remove_vertex_program(struct st_context *st, struct st_vertex_program *stvp)
{
/* no-op, for now? */
}
/**
* Free data hanging off the st frag prog.
*/
void
st_remove_fragment_program(struct st_context *st,
struct st_fragment_program *stfp)
{
struct translated_vertex_program *xvp, *next;
for (xvp = stfp->vertex_programs; xvp; xvp = next) {
next = xvp->next;
/* XXX free xvp->vs */
free(xvp);
}
}
/**
* Given a vertex program output attribute, return the corresponding
* fragment program input attribute.
@@ -265,6 +237,21 @@ find_translated_vp(struct st_context *st,
}
void
st_free_translated_vertex_programs(struct st_context *st,
struct translated_vertex_program *xvp)
{
struct translated_vertex_program *next;
while (xvp) {
next = xvp->next;
free(xvp);
xvp = next;
}
}
static void
update_linkage( struct st_context *st )
{