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 <tarceri@itsqueeze.com>
This commit is contained in:
Marek Olšák 2019-01-21 12:09:07 -05:00
parent 5c17c01815
commit c89e8470e5
1 changed files with 5 additions and 0 deletions

View File

@ -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;