summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_cb_fbo.c
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-10-20 15:20:46 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-10-20 15:20:46 -0600
commita1633c07164e8bc9630f1fa77769e7ceee585a59 (patch)
treea370b9ae050d987c2c9a2ab6813d75942261239d /src/mesa/state_tracker/st_cb_fbo.c
parentfd3876e9e3fb17df61dbf45d400796d682a8fbe0 (diff)
unmap regions when reallocating renderbuffer storage
Diffstat (limited to 'src/mesa/state_tracker/st_cb_fbo.c')
-rw-r--r--src/mesa/state_tracker/st_cb_fbo.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c
index e1cc7d98bd..64a64fd6b9 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);
}