mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-30 20:50:09 +01:00
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>
This commit is contained in:
parent
40bc1afc94
commit
9e42b93f33
1 changed files with 3 additions and 0 deletions
|
|
@ -206,6 +206,9 @@ dri_unbind_context(__DRIcontext * cPriv)
|
|||
|
||||
if (--ctx->bind_count == 0) {
|
||||
if (ctx->st == ctx->stapi->get_current(ctx->stapi)) {
|
||||
if (ctx->st->thread_finish)
|
||||
ctx->st->thread_finish(ctx->st);
|
||||
|
||||
/* For conformance, unbind is supposed to flush the context.
|
||||
* However, if we do it here we might end up flushing a partially
|
||||
* destroyed context. Instead, we flush in dri_make_current and
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue