st/wgl: flush with ST_FLUSH_WAIT before releasing shared contexts
authorCharmaine Lee <charmainel@vmware.com>
Sat, 18 Feb 2017 09:26:52 +0000 (01:26 -0800)
committerCharmaine Lee <charmainel@vmware.com>
Sat, 18 Feb 2017 17:36:42 +0000 (09:36 -0800)
commit043883647acaee0b2c67c1c6b496404ebb4e8d67
treeeba737224c47e8a75f985b70518736659e3a3ac6
parentd793b54c4e921a8560a6aac6b9949f2784a5dc73
st/wgl: flush with ST_FLUSH_WAIT before releasing shared contexts

Before releasing a shared context, flush the context
with ST_FLUSH_WAIT to make sure all commands are executed.
This ensures that rendering to any shared resources is completed
before they will be referenced by another context.

Fixes an intermittent flickering with Photoshop. (VMware bug# 1779340)

Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/state_trackers/wgl/stw_context.c
src/gallium/state_trackers/wgl/stw_context.h