Revert "i965: Fix depth (array slices) computation for 1D_ARRAY render targets."
[mesa.git] / src / glx / glxcurrent.c
index c92a2fd3cc28b26d6d5f5d07ec8555d2c9fe1f0a..2e5111b8cf73738135cec72a1e7bf1ddaa6e18a1 100644 (file)
@@ -33,7 +33,7 @@
  * Client-side GLX interface for current context management.
  */
 
-#ifdef PTHREADS
+#ifdef HAVE_PTHREAD
 #include <pthread.h>
 #endif
 
@@ -73,7 +73,7 @@ struct glx_context dummyContext = {
  * Current context management and locking
  */
 
-#if defined( PTHREADS )
+#if defined( HAVE_PTHREAD )
 
 _X_HIDDEN pthread_mutex_t __glXmutex = PTHREAD_MUTEX_INITIALIZER;
 
@@ -213,16 +213,6 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw,
    struct glx_context *gc = (struct glx_context *) gc_user;
    struct glx_context *oldGC = __glXGetCurrentContext();
 
-   /* XXX: If this is left out, then libGL ends up not having this
-    * symbol, and drivers using it fail to load.  Compare the
-    * implementation of this symbol to _glapi_noop_enable_warnings(),
-    * though, which gets into the library despite no callers, the same
-    * prototypes, and the same compile flags to the files containing
-    * them.  Moving the definition to glapi_nop.c gets it into the
-    * library, though.
-    */
-   (void)_glthread_GetID();
-
    /* Make sure that the new context has a nonzero ID.  In the request,
     * a zero context ID is used only to mean that we bind to no current
     * context.
@@ -231,16 +221,6 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw,
       return GL_FALSE;
    }
 
-   if (gc == NULL && (draw != None || read != None)) {
-      __glXGenerateError(dpy, (draw != None) ? draw : read,
-                         BadMatch, X_GLXMakeContextCurrent);
-      return False;
-   }
-   if (gc != NULL && (draw == None || read == None)) {
-      __glXGenerateError(dpy, None, BadMatch, X_GLXMakeContextCurrent);
-      return False;
-   }
-
    _glapi_check_multithread();
 
    __glXLock();