summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-03-08 11:40:25 -0700
committerBrian Paul <brianp@vmware.com>2010-03-08 11:40:25 -0700
commitd74929702f67483debf04adbafc6a8672a9e2cbf (patch)
tree1cf8bfeb41e32fd0e965925a79b4df2d65b279b7
parent1e431f04544fb7dfc19e20d3903962a88e4e88ba (diff)
st/mesa: don't detach renderbuffer, surface in st_finish_render_texture()
There's no reason to release the renderbuffer from the framebuffer object or release the gallium surface in this function (they're reference counted). In fact, we don't want to do this because we may later use the texture as a pixel source (ex: glBlitFramebuffer) and need the surface. Fixes fd.o bug 26923 and is part of the fix for bug 26932. (cherry picked from commit 80dc54e308dfb1fad344272978ff14646995e00a)
-rw-r--r--src/mesa/state_tracker/st_cb_fbo.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c
index 9cdff5354b4..d2242575db6 100644
--- a/src/mesa/state_tracker/st_cb_fbo.c
+++ b/src/mesa/state_tracker/st_cb_fbo.c
@@ -420,17 +420,12 @@ st_finish_render_texture(GLcontext *ctx,
st_flush( ctx->st, PIPE_FLUSH_RENDER_CACHE, NULL );
- if (strb->surface)
- pipe_surface_reference( &strb->surface, NULL );
-
strb->rtt = NULL;
/*
printf("FINISH RENDER TO TEXTURE surf=%p\n", strb->surface);
*/
- _mesa_reference_renderbuffer(&att->Renderbuffer, NULL);
-
/* restore previous framebuffer state */
st_invalidate_state(ctx, _NEW_BUFFERS);
}