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:
committed by
Brian Paul
parent
93267887a0
commit
14f7ce4248
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user