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:
parent
5c17c01815
commit
c89e8470e5
|
@ -1095,7 +1095,12 @@ st_api_make_current(struct st_api *stapi, struct st_context_iface *stctxi,
|
||||||
st_framebuffers_purge(st);
|
st_framebuffers_purge(st);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
GET_CURRENT_CONTEXT(ctx);
|
||||||
|
|
||||||
ret = _mesa_make_current(NULL, NULL, NULL);
|
ret = _mesa_make_current(NULL, NULL, NULL);
|
||||||
|
|
||||||
|
if (ctx)
|
||||||
|
st_framebuffers_purge(ctx->st);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in New Issue