summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-05-16 16:11:00 -0600
committerBrian Paul <[email protected]>2008-05-16 16:11:00 -0600
commitb4219e35e2de783ca03e53c311a8a56f8b633aa1 (patch)
tree6038905a5b15701650d4caf293d4aa93ed05fed3 /src/mesa/state_tracker
parentb2562736894b6a97e4f1be6c6861e250e9d0a765 (diff)
gallium: fix glBitmap surface memleak in context tear-down
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_cb_bitmap.c5
1 files changed, 5 insertions, 0 deletions
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) {