From b4219e35e2de783ca03e53c311a8a56f8b633aa1 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 16 May 2008 16:11:00 -0600 Subject: gallium: fix glBitmap surface memleak in context tear-down --- src/mesa/state_tracker/st_cb_bitmap.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c index b17681a05b8..d39fce1bb7d 100644 --- a/src/mesa/state_tracker/st_cb_bitmap.c +++ b/src/mesa/state_tracker/st_cb_bitmap.c @@ -747,6 +747,11 @@ void st_destroy_bitmap(struct st_context *st) { struct pipe_context *pipe = st->pipe; + struct pipe_screen *screen = pipe->screen; + struct bitmap_cache *cache = st->bitmap.cache; + + screen->surface_unmap(screen, cache->surf); + screen->tex_surface_release(screen, &cache->surf); #if 0 if (st->bitmap.combined_prog) { -- cgit v1.2.3