diff options
author | Marek Olšák <[email protected]> | 2019-01-21 12:09:07 -0500 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-01-23 14:32:57 -0500 |
commit | c89e8470e58066637c4bfd5c76a2247eb3608b8b (patch) | |
tree | 9276dda94716a965b31bc84f0c6ce67ad01309bc /src/mesa | |
parent | 5c17c01815399ceac90b269e5ccc271963231db8 (diff) |
st/mesa: purge framebuffers when unbinding a context
This fixes pipe_surface "leaks".
Cc: 18.3 <[email protected]>
Acked-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_manager.c | 5 |
1 files changed, 5 insertions, 0 deletions
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 @@ -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; |