Commit c89e8470 authored by Marek Olšák's avatar Marek Olšák

st/mesa: purge framebuffers when unbinding a context

This fixes pipe_surface "leaks".

Cc: 18.3 <mesa-stable@lists.freedesktop.org>
Acked-by: Timothy Arceri's avatarTimothy Arceri <tarceri@itsqueeze.com>
parent 5c17c018
......@@ -1095,7 +1095,12 @@ st_api_make_current(struct st_api *stapi, struct st_context_iface *stctxi,
st_framebuffers_purge(st);
}
else {
GET_CURRENT_CONTEXT(ctx);
ret = _mesa_make_current(NULL, NULL, NULL);
if (ctx)
st_framebuffers_purge(ctx->st);
}
return ret;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment