st/dri: wait for thread to finish before unbinding context
authorTimothy Arceri <tarceri@itsqueeze.com>
Fri, 17 Mar 2017 00:02:14 +0000 (11:02 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Sat, 18 Mar 2017 03:15:52 +0000 (14:15 +1100)
commit9e42b93f338d73d5bb97279060cedef70622c1d0
tree5feea530ad16cdb8af95288101beb03c0cc6d94e
parent40bc1afc9437433f2f1d1c0a6980376ff5670638
st/dri: wait for thread to finish before unbinding context

Fixes a bunch of piglit crashes that hit an assert() when trying
to delete the framebuffer. The assert() was triggered because
WinSysDrawBuffer was set to NULL before glDeleteFramebuffers()
was called.

Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/state_trackers/dri/dri_context.c