[Mesa-dev] [PATCH] st/mesa: purge framebuffers when unbinding a context
Timothy Arceri
tarceri at itsqueeze.com
Tue Jan 22 22:33:47 UTC 2019
Acked-by: Timothy Arceri <tarceri at itsqueeze.com>
On 23/1/19 3:16 am, Marek Olšák wrote:
> From: Marek Olšák <marek.olsak at amd.com>
>
> This fixes pipe_surface "leaks".
>
> Cc: 18.3 <mesa-stable at lists.freedesktop.org>
> ---
> src/mesa/state_tracker/st_manager.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c
> index 7a3d9777101..7064b99743c 100644
> --- a/src/mesa/state_tracker/st_manager.c
> +++ b/src/mesa/state_tracker/st_manager.c
> @@ -1088,21 +1088,26 @@ st_api_make_current(struct st_api *stapi, struct st_context_iface *stctxi,
>
> st_framebuffer_reference(&stdraw, NULL);
> st_framebuffer_reference(&stread, NULL);
>
> /* Purge the context's winsys_buffers list in case any
> * of the referenced drawables no longer exist.
> */
> 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;
> }
>
>
> static void
> st_api_destroy(struct st_api *stapi)
> {
> }
>
More information about the mesa-dev
mailing list