mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-30 22:20:27 +01:00
mesa: unreference current winsys buffers when unbinding winsys buffers
This fixes surface leak when no winsys buffers are bound.
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit 12bf7cfecf)
This commit is contained in:
parent
d1443da4f0
commit
1302f20ddb
1 changed files with 4 additions and 0 deletions
|
|
@ -1760,6 +1760,10 @@ _mesa_make_current( struct gl_context *newCtx,
|
|||
|
||||
check_init_viewport(newCtx, drawBuffer->Width, drawBuffer->Height);
|
||||
}
|
||||
else {
|
||||
_mesa_reference_framebuffer(&newCtx->WinSysDrawBuffer, NULL);
|
||||
_mesa_reference_framebuffer(&newCtx->WinSysReadBuffer, NULL);
|
||||
}
|
||||
|
||||
if (newCtx->FirstTimeCurrent) {
|
||||
handle_first_current(newCtx);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue