diff --git a/src/gallium/frontends/dri/dri_context.c b/src/gallium/frontends/dri/dri_context.c index c32e795f681..3a98eb2496a 100644 --- a/src/gallium/frontends/dri/dri_context.c +++ b/src/gallium/frontends/dri/dri_context.c @@ -265,17 +265,15 @@ dri_unbind_context(__DRIcontext * cPriv) struct st_context_iface *st = ctx->st; struct st_api *stapi = screen->st_api; - if (--ctx->bind_count == 0) { - if (st == stapi->get_current(stapi)) { - if (st->thread_finish) - st->thread_finish(st); + if (st == stapi->get_current(stapi)) { + if (st->thread_finish) + st->thread_finish(st); - /* Record HUD queries for the duration the context was "current". */ - if (ctx->hud) - hud_record_only(ctx->hud, st->pipe); + /* Record HUD queries for the duration the context was "current". */ + if (ctx->hud) + hud_record_only(ctx->hud, st->pipe); - stapi->make_current(stapi, NULL, NULL, NULL); - } + stapi->make_current(stapi, NULL, NULL, NULL); } ctx->dPriv = NULL; ctx->rPriv = NULL; @@ -293,8 +291,6 @@ dri_make_current(__DRIcontext * cPriv, struct dri_drawable *draw = dri_drawable(driDrawPriv); struct dri_drawable *read = dri_drawable(driReadPriv); - ++ctx->bind_count; - if (!draw && !read) return ctx->stapi->make_current(ctx->stapi, ctx->st, NULL, NULL); else if (!draw || !read) diff --git a/src/gallium/frontends/dri/dri_context.h b/src/gallium/frontends/dri/dri_context.h index 4b2b045092c..561be68927c 100644 --- a/src/gallium/frontends/dri/dri_context.h +++ b/src/gallium/frontends/dri/dri_context.h @@ -50,8 +50,6 @@ struct dri_context __DRIdrawable *dPriv; __DRIdrawable *rPriv; - unsigned int bind_count; - /** * True if the __DRIdrawable's current __DRIimageBufferMask is * __DRI_IMAGE_BUFFER_SHARED.