diff options
author | Timothy Arceri <[email protected]> | 2017-03-16 23:09:19 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-03-17 09:47:02 +1100 |
commit | 124ec417f968bfb081b238fdcde04b9aaf9d6a2d (patch) | |
tree | eb372be8acda8dc0bf7027a706390e82d212840c /src/mesa/state_tracker/st_context.c | |
parent | 08df015b9de8ccb16ce6db93890910f8a02be4c6 (diff) |
st/mesa: call glthread_destroy() before _vbo_DestroyContext()
Otherwise we have a race condition between vbo calls in the
glthread and the _vbo_DestroyContext() call.
This fixes a bunch of piglit crashes.
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_context.c')
-rw-r--r-- | src/mesa/state_tracker/st_context.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 869e6e9f87b..c7d25ecd755 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -575,6 +575,9 @@ void st_destroy_context( struct st_context *st ) struct gl_context *ctx = st->ctx; GLuint i; + /* This must be called first so that glthread has a chance to finish */ + _mesa_glthread_destroy(ctx); + _mesa_HashWalk(ctx->Shared->TexObjects, destroy_tex_sampler_cb, st); st_reference_fragprog(st, &st->fp, NULL); |