diff options
Diffstat (limited to 'src/mesa/pipe/softpipe')
-rw-r--r-- | src/mesa/pipe/softpipe/sp_prim_setup.c | 7 | ||||
-rw-r--r-- | src/mesa/pipe/softpipe/sp_prim_vbuf.c | 11 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/mesa/pipe/softpipe/sp_prim_setup.c b/src/mesa/pipe/softpipe/sp_prim_setup.c index 9f5a43a827..6980564bdc 100644 --- a/src/mesa/pipe/softpipe/sp_prim_setup.c +++ b/src/mesa/pipe/softpipe/sp_prim_setup.c @@ -1124,6 +1124,12 @@ static void reset_stipple_counter( struct draw_stage *stage ) } +static void render_destroy( struct draw_stage *stage ) +{ + FREE( stage ); +} + + /** * Create a new primitive setup/render stage. */ @@ -1139,6 +1145,7 @@ struct draw_stage *sp_draw_render_stage( struct softpipe_context *softpipe ) setup->stage.tri = setup_tri; setup->stage.end = setup_end; setup->stage.reset_stipple_counter = reset_stipple_counter; + setup->stage.destroy = render_destroy; setup->quad.coef = setup->coef; diff --git a/src/mesa/pipe/softpipe/sp_prim_vbuf.c b/src/mesa/pipe/softpipe/sp_prim_vbuf.c index 59cf1c4eb7..2cfdeb5809 100644 --- a/src/mesa/pipe/softpipe/sp_prim_vbuf.c +++ b/src/mesa/pipe/softpipe/sp_prim_vbuf.c @@ -275,6 +275,16 @@ static void reset_stipple_counter( struct draw_stage *stage ) } +static void vbuf_destroy( struct draw_stage *stage ) +{ + struct vbuf_stage *vbuf = vbuf_stage( stage ); + + FREE( vbuf->element_map ); + FREE( vbuf->vertex_map ); + FREE( stage ); +} + + /** * Create a new primitive vbuf/render stage. */ @@ -290,6 +300,7 @@ struct draw_stage *sp_draw_vbuf_stage( struct draw_context *draw_context, vbuf->stage.tri = vbuf_first_tri; vbuf->stage.end = vbuf_end; vbuf->stage.reset_stipple_counter = reset_stipple_counter; + vbuf->stage.destroy = vbuf_destroy; vbuf->pipe = pipe; vbuf->draw = draw; |