mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
gallium/dri: Remove the memory of GLX_MESA_multithread_makecurrent
The only way this could happen was if GLX did it, which it doesn't. Reviewed-by: Emma Anholt <emma@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17473>
This commit is contained in:
parent
92b2e479b8
commit
4fbc237cae
2 changed files with 7 additions and 13 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue