From: Brian Date: Sat, 20 Oct 2007 21:20:46 +0000 (-0600) Subject: unmap regions when reallocating renderbuffer storage X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a1633c07164e8bc9630f1fa77769e7ceee585a59;p=mesa.git unmap regions when reallocating renderbuffer storage --- 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); }