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,