From: Marek Olšák <[email protected]> This fixes pipe_surface "leaks".
Cc: 18.3 <[email protected]> --- 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) { } -- 2.17.1 _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
