From: Brian Paul Date: Fri, 16 May 2008 22:11:00 +0000 (-0600) Subject: gallium: fix glBitmap surface memleak in context tear-down X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b4219e35e2de783ca03e53c311a8a56f8b633aa1;p=mesa.git gallium: fix glBitmap surface memleak in context tear-down --- 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) {