summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/draw/draw_cull.c
diff options
context:
space:
mode:
authorMichal <michal@tungstengraphics.com>2007-11-23 11:30:51 +0000
committerJosé Fonseca <jrfonseca@tungstengraphics.com>2007-12-09 14:03:34 +0000
commitd75454840672f462de933724daae24a839aac48e (patch)
tree71242b6abbea53ca4753bd8900d582a1e6ebfa36 /src/mesa/pipe/draw/draw_cull.c
parent74fe189b2e1d8f661a1678e65d21da788b3b4435 (diff)
gallium: add draw_stage::destroy().
Diffstat (limited to 'src/mesa/pipe/draw/draw_cull.c')
-rw-r--r--src/mesa/pipe/draw/draw_cull.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/pipe/draw/draw_cull.c b/src/mesa/pipe/draw/draw_cull.c
index f898834ba5..9bd53f45f2 100644
--- a/src/mesa/pipe/draw/draw_cull.c
+++ b/src/mesa/pipe/draw/draw_cull.c
@@ -116,6 +116,14 @@ static void cull_reset_stipple_counter( struct draw_stage *stage )
stage->next->reset_stipple_counter( stage->next );
}
+
+static void cull_destroy( struct draw_stage *stage )
+{
+ draw_free_tmps( stage );
+ FREE( stage );
+}
+
+
/**
* Create a new polygon culling stage.
*/
@@ -133,6 +141,7 @@ struct draw_stage *draw_cull_stage( struct draw_context *draw )
cull->stage.tri = cull_tri;
cull->stage.end = cull_end;
cull->stage.reset_stipple_counter = cull_reset_stipple_counter;
+ cull->stage.destroy = cull_destroy;
return &cull->stage;
}