gallium: fix glBitmap surface memleak in context tear-down
authorBrian Paul <brian.paul@tungstengraphics.com>
Fri, 16 May 2008 22:11:00 +0000 (16:11 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Fri, 16 May 2008 22:11:00 +0000 (16:11 -0600)
src/mesa/state_tracker/st_cb_bitmap.c

index b17681a05b825d14d5008f5d095f65c7885c9e4c..d39fce1bb7d521051b7d4d6d3de3b5205a2b9f7d 100644 (file)
@@ -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) {