diff options
author | michal <michal@michal-laptop.(none)> | 2007-10-26 17:25:09 +0100 |
---|---|---|
committer | michal <michal@michal-laptop.(none)> | 2007-10-27 19:01:11 +0100 |
commit | 6961769cb23c8b9ed2fb56d8ce6e649848412357 (patch) | |
tree | 1944b5907079b103f227c9eed4107963701e7598 | |
parent | dee9406e4847f98b346f0fff72d16df46e9584a4 (diff) | |
download | external_mesa3d-6961769cb23c8b9ed2fb56d8ce6e649848412357.zip external_mesa3d-6961769cb23c8b9ed2fb56d8ce6e649848412357.tar.gz external_mesa3d-6961769cb23c8b9ed2fb56d8ce6e649848412357.tar.bz2 |
Define destroy method called by softpipe's destructor.
-rw-r--r-- | src/mesa/pipe/softpipe/sp_quad.h | 2 | ||||
-rw-r--r-- | src/mesa/pipe/softpipe/sp_quad_alpha_test.c | 7 | ||||
-rw-r--r-- | src/mesa/pipe/softpipe/sp_quad_blend.c | 7 | ||||
-rw-r--r-- | src/mesa/pipe/softpipe/sp_quad_bufloop.c | 7 | ||||
-rw-r--r-- | src/mesa/pipe/softpipe/sp_quad_colormask.c | 7 | ||||
-rw-r--r-- | src/mesa/pipe/softpipe/sp_quad_coverage.c | 7 | ||||
-rw-r--r-- | src/mesa/pipe/softpipe/sp_quad_depth_test.c | 7 | ||||
-rw-r--r-- | src/mesa/pipe/softpipe/sp_quad_fs.c | 7 | ||||
-rw-r--r-- | src/mesa/pipe/softpipe/sp_quad_occlusion.c | 6 | ||||
-rw-r--r-- | src/mesa/pipe/softpipe/sp_quad_output.c | 7 | ||||
-rw-r--r-- | src/mesa/pipe/softpipe/sp_quad_stencil.c | 7 | ||||
-rw-r--r-- | src/mesa/pipe/softpipe/sp_quad_stipple.c | 7 |
12 files changed, 78 insertions, 0 deletions
diff --git a/src/mesa/pipe/softpipe/sp_quad.h b/src/mesa/pipe/softpipe/sp_quad.h index cca7dbd..5345411 100644 --- a/src/mesa/pipe/softpipe/sp_quad.h +++ b/src/mesa/pipe/softpipe/sp_quad.h @@ -45,6 +45,8 @@ struct quad_stage { /** the stage action */ void (*run)(struct quad_stage *qs, struct quad_header *quad); + + void (*destroy)(struct quad_stage *qs); }; diff --git a/src/mesa/pipe/softpipe/sp_quad_alpha_test.c b/src/mesa/pipe/softpipe/sp_quad_alpha_test.c index 4f28414..d9b914d 100644 --- a/src/mesa/pipe/softpipe/sp_quad_alpha_test.c +++ b/src/mesa/pipe/softpipe/sp_quad_alpha_test.c @@ -88,6 +88,12 @@ static void alpha_test_begin(struct quad_stage *qs) } +static void alpha_test_destroy(struct quad_stage *qs)
+{
+ free( qs );
+} + + struct quad_stage * sp_quad_alpha_test_stage( struct softpipe_context *softpipe ) { @@ -96,6 +102,7 @@ sp_quad_alpha_test_stage( struct softpipe_context *softpipe ) stage->softpipe = softpipe; stage->begin = alpha_test_begin; stage->run = alpha_test_quad; + stage->destroy = alpha_test_destroy; return stage; } diff --git a/src/mesa/pipe/softpipe/sp_quad_blend.c b/src/mesa/pipe/softpipe/sp_quad_blend.c index 9b7a486..cecf8af 100644 --- a/src/mesa/pipe/softpipe/sp_quad_blend.c +++ b/src/mesa/pipe/softpipe/sp_quad_blend.c @@ -727,6 +727,12 @@ static void blend_begin(struct quad_stage *qs) } +static void blend_destroy(struct quad_stage *qs)
+{
+ free( qs );
+} + + struct quad_stage *sp_quad_blend_stage( struct softpipe_context *softpipe ) { struct quad_stage *stage = CALLOC_STRUCT(quad_stage); @@ -734,6 +740,7 @@ struct quad_stage *sp_quad_blend_stage( struct softpipe_context *softpipe ) stage->softpipe = softpipe; stage->begin = blend_begin; stage->run = blend_quad; + stage->destroy = blend_destroy; return stage; } diff --git a/src/mesa/pipe/softpipe/sp_quad_bufloop.c b/src/mesa/pipe/softpipe/sp_quad_bufloop.c index ae2fb5e..bdf491d 100644 --- a/src/mesa/pipe/softpipe/sp_quad_bufloop.c +++ b/src/mesa/pipe/softpipe/sp_quad_bufloop.c @@ -50,6 +50,12 @@ static void cbuf_loop_begin(struct quad_stage *qs) } +static void cbuf_loop_destroy(struct quad_stage *qs)
+{
+ free( qs );
+} + + /** * Create the colorbuffer loop stage. * This is used to implement multiple render targets and GL_FRONT_AND_BACK @@ -62,6 +68,7 @@ struct quad_stage *sp_quad_bufloop_stage( struct softpipe_context *softpipe ) stage->softpipe = softpipe; stage->begin = cbuf_loop_begin; stage->run = cbuf_loop_quad; + stage->destroy = cbuf_loop_destroy; return stage; } diff --git a/src/mesa/pipe/softpipe/sp_quad_colormask.c b/src/mesa/pipe/softpipe/sp_quad_colormask.c index 8872825..f0aa657 100644 --- a/src/mesa/pipe/softpipe/sp_quad_colormask.c +++ b/src/mesa/pipe/softpipe/sp_quad_colormask.c @@ -90,6 +90,12 @@ static void colormask_begin(struct quad_stage *qs) } +static void colormask_destroy(struct quad_stage *qs)
+{
+ free( qs );
+} + + struct quad_stage *sp_quad_colormask_stage( struct softpipe_context *softpipe ) { struct quad_stage *stage = CALLOC_STRUCT(quad_stage); @@ -97,6 +103,7 @@ struct quad_stage *sp_quad_colormask_stage( struct softpipe_context *softpipe ) stage->softpipe = softpipe; stage->begin = colormask_begin; stage->run = colormask_quad; + stage->destroy = colormask_destroy; return stage; } diff --git a/src/mesa/pipe/softpipe/sp_quad_coverage.c b/src/mesa/pipe/softpipe/sp_quad_coverage.c index 89f50bc..25e7b03 100644 --- a/src/mesa/pipe/softpipe/sp_quad_coverage.c +++ b/src/mesa/pipe/softpipe/sp_quad_coverage.c @@ -69,6 +69,12 @@ static void coverage_begin(struct quad_stage *qs) } +static void coverage_destroy(struct quad_stage *qs)
+{
+ free( qs );
+} + + struct quad_stage *sp_quad_coverage_stage( struct softpipe_context *softpipe ) { struct quad_stage *stage = CALLOC_STRUCT(quad_stage); @@ -76,6 +82,7 @@ struct quad_stage *sp_quad_coverage_stage( struct softpipe_context *softpipe ) stage->softpipe = softpipe; stage->begin = coverage_begin; stage->run = coverage_quad; + stage->destroy = coverage_destroy; return stage; } diff --git a/src/mesa/pipe/softpipe/sp_quad_depth_test.c b/src/mesa/pipe/softpipe/sp_quad_depth_test.c index 1885090..c24232b 100644 --- a/src/mesa/pipe/softpipe/sp_quad_depth_test.c +++ b/src/mesa/pipe/softpipe/sp_quad_depth_test.c @@ -231,6 +231,12 @@ static void depth_test_begin(struct quad_stage *qs) } +static void depth_test_destroy(struct quad_stage *qs)
+{
+ free( qs );
+} + + struct quad_stage *sp_quad_depth_test_stage( struct softpipe_context *softpipe ) { struct quad_stage *stage = CALLOC_STRUCT(quad_stage); @@ -238,6 +244,7 @@ struct quad_stage *sp_quad_depth_test_stage( struct softpipe_context *softpipe ) stage->softpipe = softpipe; stage->begin = depth_test_begin; stage->run = depth_test_quad; + stage->destroy = depth_test_destroy; return stage; } diff --git a/src/mesa/pipe/softpipe/sp_quad_fs.c b/src/mesa/pipe/softpipe/sp_quad_fs.c index 9b9504c..dc8d6e0 100644 --- a/src/mesa/pipe/softpipe/sp_quad_fs.c +++ b/src/mesa/pipe/softpipe/sp_quad_fs.c @@ -190,6 +190,12 @@ static void shade_begin(struct quad_stage *qs) } +static void shade_destroy(struct quad_stage *qs)
+{
+ free( qs );
+} + + struct quad_stage *sp_quad_shade_stage( struct softpipe_context *softpipe ) { struct quad_shade_stage *qss = CALLOC_STRUCT(quad_shade_stage); @@ -204,6 +210,7 @@ struct quad_stage *sp_quad_shade_stage( struct softpipe_context *softpipe ) qss->stage.softpipe = softpipe; qss->stage.begin = shade_begin; qss->stage.run = shade_quad; + qss->stage.destroy = shade_destroy; /* set TGSI sampler state that's constant */ for (i = 0; i < PIPE_MAX_SAMPLERS; i++) { diff --git a/src/mesa/pipe/softpipe/sp_quad_occlusion.c b/src/mesa/pipe/softpipe/sp_quad_occlusion.c index 4f178f05..18a36e8 100644 --- a/src/mesa/pipe/softpipe/sp_quad_occlusion.c +++ b/src/mesa/pipe/softpipe/sp_quad_occlusion.c @@ -64,6 +64,11 @@ static void occlusion_begin(struct quad_stage *qs) } +static void occlusion_destroy(struct quad_stage *qs)
+{
+ free( qs );
+} + struct quad_stage *sp_quad_occlusion_stage( struct softpipe_context *softpipe ) { @@ -72,6 +77,7 @@ struct quad_stage *sp_quad_occlusion_stage( struct softpipe_context *softpipe ) stage->softpipe = softpipe; stage->begin = occlusion_begin; stage->run = occlusion_count_quad; + stage->destroy = occlusion_destroy; return stage; } diff --git a/src/mesa/pipe/softpipe/sp_quad_output.c b/src/mesa/pipe/softpipe/sp_quad_output.c index f757a43..09194c1 100644 --- a/src/mesa/pipe/softpipe/sp_quad_output.c +++ b/src/mesa/pipe/softpipe/sp_quad_output.c @@ -70,6 +70,12 @@ static void output_begin(struct quad_stage *qs) } +static void output_destroy(struct quad_stage *qs)
+{
+ free( qs );
+} + + struct quad_stage *sp_quad_output_stage( struct softpipe_context *softpipe ) { struct quad_stage *stage = CALLOC_STRUCT(quad_stage); @@ -77,6 +83,7 @@ struct quad_stage *sp_quad_output_stage( struct softpipe_context *softpipe ) stage->softpipe = softpipe; stage->begin = output_begin; stage->run = output_quad; + stage->destroy = output_destroy; return stage; } diff --git a/src/mesa/pipe/softpipe/sp_quad_stencil.c b/src/mesa/pipe/softpipe/sp_quad_stencil.c index c4240f1..14aa7df 100644 --- a/src/mesa/pipe/softpipe/sp_quad_stencil.c +++ b/src/mesa/pipe/softpipe/sp_quad_stencil.c @@ -323,6 +323,12 @@ static void stencil_begin(struct quad_stage *qs) } +static void stencil_destroy(struct quad_stage *qs)
+{
+ free( qs );
+} + + struct quad_stage *sp_quad_stencil_test_stage( struct softpipe_context *softpipe ) { struct quad_stage *stage = CALLOC_STRUCT(quad_stage); @@ -330,6 +336,7 @@ struct quad_stage *sp_quad_stencil_test_stage( struct softpipe_context *softpipe stage->softpipe = softpipe; stage->begin = stencil_begin; stage->run = stencil_test_quad; + stage->destroy = stencil_destroy; return stage; } diff --git a/src/mesa/pipe/softpipe/sp_quad_stipple.c b/src/mesa/pipe/softpipe/sp_quad_stipple.c index 4af5059..7916dcd 100644 --- a/src/mesa/pipe/softpipe/sp_quad_stipple.c +++ b/src/mesa/pipe/softpipe/sp_quad_stipple.c @@ -65,6 +65,12 @@ static void stipple_begin(struct quad_stage *qs) } +static void stipple_destroy(struct quad_stage *qs)
+{
+ free( qs );
+} + + struct quad_stage * sp_quad_polygon_stipple_stage( struct softpipe_context *softpipe ) { @@ -73,6 +79,7 @@ sp_quad_polygon_stipple_stage( struct softpipe_context *softpipe ) stage->softpipe = softpipe; stage->begin = stipple_begin; stage->run = stipple_quad; + stage->destroy = stipple_destroy; return stage; } |