Mesa (main): glx: Remove the remains of GLX_MESA_multithread_makecurrent
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jul 12 10:47:45 UTC 2022
Module: Mesa
Branch: main
Commit: 92b2e479b8d017f437837d07607f3777e01033a5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=92b2e479b8d017f437837d07607f3777e01033a5
Author: Adam Jackson <ajax at redhat.com>
Date: Mon Jul 11 16:11:53 2022 -0400
glx: Remove the remains of GLX_MESA_multithread_makecurrent
This hasn't actually been exported for a while. I think I probably broke
this in
commit 63a6b719d98fb1ad58ae93c2de859e6d4bfa8b8b
Author: Adam Jackson <ajax at redhat.com>
Date: Tue Dec 5 11:10:09 2017 -0500
glx: GLX_MESA_multithread_makecurrent is direct-only
in which I made it no longer default to having client support, but
failed to instruct dri{2,3,sw} to enable it. In any case, it was never
widely used, there is no EGL equivalent, and we've had zero complaints
about it getting nerfed.
Reviewed-by: Emma Anholt <emma at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17473>
---
src/glx/glxclient.h | 5 -----
src/glx/glxcurrent.c | 17 ++++++-----------
src/glx/glxextensions.c | 1 -
src/glx/glxextensions.h | 1 -
4 files changed, 6 insertions(+), 18 deletions(-)
diff --git a/src/glx/glxclient.h b/src/glx/glxclient.h
index 9d402bec664..179b4ddff4d 100644
--- a/src/glx/glxclient.h
+++ b/src/glx/glxclient.h
@@ -424,11 +424,6 @@ struct glx_context
int server_minor; /**< Minor version number. */
/*@} */
- /**
- * Number of threads we're currently current in.
- */
- unsigned long thread_refcount;
-
/**
* GLX_ARB_create_context_no_error setting for this context.
* This needs to be kept here to enforce shared context rules.
diff --git a/src/glx/glxcurrent.c b/src/glx/glxcurrent.c
index 05ab830b522..5f0a5fae627 100644
--- a/src/glx/glxcurrent.c
+++ b/src/glx/glxcurrent.c
@@ -202,10 +202,8 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw,
}
if (oldGC != &dummyContext) {
- if (--oldGC->thread_refcount == 0) {
- oldGC->vtable->unbind(oldGC, gc);
- oldGC->currentDpy = NULL;
- }
+ oldGC->vtable->unbind(oldGC, gc);
+ oldGC->currentDpy = NULL;
}
if (gc) {
@@ -224,18 +222,15 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw,
return GL_FALSE;
}
- if (gc->thread_refcount == 0) {
- gc->currentDpy = dpy;
- gc->currentDrawable = draw;
- gc->currentReadable = read;
- }
- gc->thread_refcount++;
+ gc->currentDpy = dpy;
+ gc->currentDrawable = draw;
+ gc->currentReadable = read;
__glXSetCurrentContext(gc);
} else {
__glXSetCurrentContextNull();
}
- if (oldGC->thread_refcount == 0 && oldGC != &dummyContext && oldGC->xid == None) {
+ if (oldGC->currentDpy == NULL && oldGC != &dummyContext && oldGC->xid == None) {
/* We are switching away from a context that was
* previously destroyed, so we need to free the memory
* for the old handle. */
diff --git a/src/glx/glxextensions.c b/src/glx/glxextensions.c
index 71f84936a70..d72d286eb1c 100644
--- a/src/glx/glxextensions.c
+++ b/src/glx/glxextensions.c
@@ -105,7 +105,6 @@ static const struct extension_info known_glx_extensions[] = {
{ GLX(ATI_pixel_format_float), N, N },
{ GLX(INTEL_swap_event), N, N },
{ GLX(MESA_copy_sub_buffer), N, N },
- { GLX(MESA_multithread_makecurrent), N, Y },
{ GLX(MESA_query_renderer), N, Y },
{ GLX(MESA_swap_control), N, Y },
{ GLX(NV_float_buffer), N, N },
diff --git a/src/glx/glxextensions.h b/src/glx/glxextensions.h
index 0af2db04e17..0fdabb8d089 100644
--- a/src/glx/glxextensions.h
+++ b/src/glx/glxextensions.h
@@ -61,7 +61,6 @@ enum
INTEL_swap_event_bit,
MESA_copy_sub_buffer_bit,
MESA_depth_float_bit,
- MESA_multithread_makecurrent_bit,
MESA_query_renderer_bit,
MESA_swap_control_bit,
MESA_swap_frame_usage_bit,
More information about the mesa-commit
mailing list