diff options
author | Marek Olšák <[email protected]> | 2017-11-19 00:19:19 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-11-25 17:16:56 +0100 |
commit | 6ad83b58e28cbcc84fc7d70b7a52eb3f2f803450 (patch) | |
tree | 4985d556dc42ef19122a74da8b7c87b32f1a7595 /src | |
parent | 2cfa319f9f4c798e651cf0bb2f742af9987965ab (diff) |
st/dri: clean up dri_unbind_context
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/state_trackers/dri/dri_context.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/state_trackers/dri/dri_context.c b/src/gallium/state_trackers/dri/dri_context.c index 18bbfa046ca..f5400ab21e6 100644 --- a/src/gallium/state_trackers/dri/dri_context.c +++ b/src/gallium/state_trackers/dri/dri_context.c @@ -228,12 +228,13 @@ dri_unbind_context(__DRIcontext * cPriv) /* dri_util.c ensures cPriv is not null */ struct dri_screen *screen = dri_screen(cPriv->driScreenPriv); struct dri_context *ctx = dri_context(cPriv); + struct st_context_iface *st = ctx->st; struct st_api *stapi = screen->st_api; 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); + if (st == stapi->get_current(stapi)) { + if (st->thread_finish) + st->thread_finish(st); /* For conformance, unbind is supposed to flush the context. * However, if we do it here we might end up flushing a partially |