Mesa (master): st/fbo: use pipe_surface_release instead of pipe_surface_reference

Brian Paul brianp at kemper.freedesktop.org
Wed Oct 14 18:48:23 UTC 2015


Module: Mesa
Branch: master
Commit: 14f7ce42484c31a45fcb6aabdf503f7496a9a94c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=14f7ce42484c31a45fcb6aabdf503f7496a9a94c

Author: Krzysztof Sobiecki <sobkas at gmail.com>
Date:   Wed Oct 14 10:03:00 2015 -0600

st/fbo: use pipe_surface_release instead of pipe_surface_reference

pipe_surface_reference have problems with deleted contexts,
so use of pipe_surface_release might be more appropriate.

Fixes Wasteland 2 Director's Cut crash on start.

Cc: mesa-stable at lists.freedesktop.org

Reviewed-by: Brian Paul <brianp at vmware.com>

---

 src/mesa/state_tracker/st_cb_fbo.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c
index ff703fa..2a2eb09 100644
--- a/src/mesa/state_tracker/st_cb_fbo.c
+++ b/src/mesa/state_tracker/st_cb_fbo.c
@@ -456,7 +456,7 @@ st_update_renderbuffer_surface(struct st_context *st,
       surf_tmpl.u.tex.first_layer = first_layer;
       surf_tmpl.u.tex.last_layer = last_layer;
 
-      pipe_surface_reference(&strb->surface, NULL);
+      pipe_surface_release(pipe, &strb->surface);
 
       strb->surface = pipe->create_surface(pipe, resource, &surf_tmpl);
    }




More information about the mesa-commit mailing list