projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b480adf
)
mesa: unreference current winsys buffers when unbinding winsys buffers
author
Charmaine Lee
<charmainel@vmware.com>
Sun, 19 May 2019 01:34:06 +0000
(18:34 -0700)
committer
Charmaine Lee
<charmainel@vmware.com>
Mon, 20 May 2019 20:09:32 +0000
(13:09 -0700)
This fixes surface leak when no winsys buffers are bound.
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/main/context.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/context.c
b/src/mesa/main/context.c
index 34da16b88f4f8439e716d2ce18d5b45181988a74..04ef4d500d858211b3a4b3a866c8a047965d6306 100644
(file)
--- a/
src/mesa/main/context.c
+++ b/
src/mesa/main/context.c
@@
-1765,6
+1765,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);