diff options
author | Michal <[email protected]> | 2007-11-23 11:30:51 +0000 |
---|---|---|
committer | José Fonseca <[email protected]> | 2007-12-09 14:03:34 +0000 |
commit | d75454840672f462de933724daae24a839aac48e (patch) | |
tree | 71242b6abbea53ca4753bd8900d582a1e6ebfa36 /src/mesa/pipe/draw/draw_vbuf.c | |
parent | 74fe189b2e1d8f661a1678e65d21da788b3b4435 (diff) |
gallium: add draw_stage::destroy().
Diffstat (limited to 'src/mesa/pipe/draw/draw_vbuf.c')
-rw-r--r-- | src/mesa/pipe/draw/draw_vbuf.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mesa/pipe/draw/draw_vbuf.c b/src/mesa/pipe/draw/draw_vbuf.c index d00cdec56c6..d010aaba076 100644 --- a/src/mesa/pipe/draw/draw_vbuf.c +++ b/src/mesa/pipe/draw/draw_vbuf.c @@ -369,6 +369,15 @@ vbuf_reset_stipple_counter( struct draw_stage *stage ) } +static void vbuf_destroy( struct draw_stage *stage ) +{ + struct vbuf_stage *vbuf = vbuf_stage( stage ); + + FREE( vbuf->indices ); + FREE( stage ); +} + + /** * Create a new primitive vbuf/render stage. */ @@ -384,12 +393,12 @@ struct draw_stage *draw_vbuf_stage( struct draw_context *draw, vbuf->stage.tri = vbuf_first_tri; vbuf->stage.end = vbuf_end; vbuf->stage.reset_stipple_counter = vbuf_reset_stipple_counter; + vbuf->stage.destroy = vbuf_destroy; vbuf->render = render; assert(render->max_indices < UNDEFINED_VERTEX_ID); vbuf->max_indices = render->max_indices; - /* FIXME: free this memory on takedown */ vbuf->indices = MALLOC( vbuf->max_indices ); vbuf->vertices = NULL; |