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>
(cherry picked from commit 14f7ce4248)
This commit is contained in:
Krzysztof Sobiecki 2015-10-14 10:03:00 -06:00 committed by Emil Velikov
parent c0b85c5a4c
commit b0b31397e2

View file

@ -478,7 +478,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);
}