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@lists.freedesktop.org

Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
Krzysztof Sobiecki
2015-10-14 10:03:00 -06:00
committed by Brian Paul
parent 93267887a0
commit 14f7ce4248
+1 -1
View File
@@ -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);
}