summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/softpipe/sp_context.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-12-24 17:40:02 -0700
committerBrian <[email protected]>2008-01-01 10:21:21 -0700
commit171a9674c4caf32303a8d09ce48db18cde1d3e7e (patch)
treef47f61bbb7a317fec969330c87cbe4984cec5efd /src/mesa/pipe/softpipe/sp_context.c
parentaec6009ece010f334f5777d727620cc042746e31 (diff)
free surface caches in softpipe_destroy()
Diffstat (limited to 'src/mesa/pipe/softpipe/sp_context.c')
-rw-r--r--src/mesa/pipe/softpipe/sp_context.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/pipe/softpipe/sp_context.c b/src/mesa/pipe/softpipe/sp_context.c
index b6995b8a6cd..52672a9b292 100644
--- a/src/mesa/pipe/softpipe/sp_context.c
+++ b/src/mesa/pipe/softpipe/sp_context.c
@@ -127,6 +127,7 @@ softpipe_unmap_surfaces(struct softpipe_context *sp)
static void softpipe_destroy( struct pipe_context *pipe )
{
struct softpipe_context *softpipe = softpipe_context( pipe );
+ uint i;
draw_destroy( softpipe->draw );
@@ -143,6 +144,14 @@ static void softpipe_destroy( struct pipe_context *pipe )
softpipe->quad.colormask->destroy( softpipe->quad.colormask );
softpipe->quad.output->destroy( softpipe->quad.output );
+ for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++)
+ sp_destroy_tile_cache(softpipe->cbuf_cache[i]);
+ sp_destroy_tile_cache(softpipe->zbuf_cache);
+ sp_destroy_tile_cache(softpipe->sbuf_cache_sep);
+
+ for (i = 0; i < PIPE_MAX_SAMPLERS; i++)
+ sp_destroy_tile_cache(softpipe->tex_cache[i]);
+
FREE( softpipe );
}