From a1633c07164e8bc9630f1fa77769e7ceee585a59 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 20 Oct 2007 15:20:46 -0600 Subject: [PATCH] unmap regions when reallocating renderbuffer storage --- src/mesa/state_tracker/st_cb_fbo.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c index e1cc7d98bd6..64a64fd6b9c 100644 --- a/src/mesa/state_tracker/st_cb_fbo.c +++ b/src/mesa/state_tracker/st_cb_fbo.c @@ -92,6 +92,10 @@ st_renderbuffer_alloc_storage(GLcontext * ctx, struct gl_renderbuffer *rb, /* free old region */ if (strb->surface->region) { + /* loop here since mapping is refcounted */ + struct pipe_region *r = strb->surface->region; + while (r->map) + pipe->region_unmap(pipe, r); pipe->region_release(pipe, &strb->surface->region); } -- 2.30.2