st/mesa: remove unneeded pipe_surface_release() in st_render_texture()
authorBrian Paul <brianp@vmware.com>
Mon, 22 Jun 2015 20:04:09 +0000 (14:04 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 24 Jun 2015 13:14:56 +0000 (07:14 -0600)
commitc1de7df6d4086070e63369ab0af3950f53a03592
tree782a3ff9eab4bb2b9aa722876fd986caf3025cd4
parenta552c897caea31bbff3f16d2af8f5028a58bd344
st/mesa: remove unneeded pipe_surface_release() in st_render_texture()

This caused us to always free the pipe_surface for the renderbuffer.
The subsequent call to st_update_renderbuffer_surface() would typically
just recreate it.  Remove the call to pipe_surface_release() and let
st_update_renderbuffer_surface() take care of freeing the old surface
if it needs to be replaced (because of change to mipmap level, etc).

This can save quite a few calls to pipe_context::create_surface() and
surface_destroy().

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/mesa/state_tracker/st_cb_fbo.c