st/mesa: purge framebuffers with current context after unbinding winsys buffers
authorCharmaine Lee <charmainel@vmware.com>
Sun, 19 May 2019 01:32:13 +0000 (18:32 -0700)
committerCharmaine Lee <charmainel@vmware.com>
Mon, 20 May 2019 20:09:32 +0000 (13:09 -0700)
commitb480adfa5ee224528eaed7e1da934a2d3e2b94d6
treec54a64cee480c7a169aa16bebf4ca63dca635f19
parent7e5723d6d7631604116b3cef4ab571200e1820d4
st/mesa: purge framebuffers with current context after unbinding winsys buffers

With commit c89e8470e58, framebuffers are purged after unbinding context,
but this change also introduces a heap corruption when running Rhino application
on VMware svga device. Instead of purging the framebuffers after the context
is unbound, this patch first ubinds the winsys buffers, then purges the framebuffers
with the current context, and then finally unbinds the context.

This fixes heap corruption.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/state_tracker/st_manager.c