Revert "glx: Implement GLX_EXT_no_config_context (v2)"

Pushed ahead of things actually working.

This reverts commit 5293b96b160b904c0e53cbce93679c3aa090f846.
diff --git a/src/glx/create_context.c b/src/glx/create_context.c
index eab6511..38e949a 100644
--- a/src/glx/create_context.c
+++ b/src/glx/create_context.c
@@ -47,11 +47,21 @@
    xcb_generic_error_t *err;
    xcb_void_cookie_t cookie;
    unsigned dummy_err = 0;
-   int screen = -1;
 
-   if (dpy == NULL)
+
+   if (dpy == NULL || cfg == NULL)
       return NULL;
 
+   /* This means that either the caller passed the wrong display pointer or
+    * one of the internal GLX data structures (probably the fbconfig) has an
+    * error.  There is nothing sensible to do, so return an error.
+    */
+   psc = GetGLXScreenConfigs(dpy, cfg->screen);
+   if (psc == NULL)
+      return NULL;
+
+   assert(cfg->screen == psc->scr);
+
    /* Count the number of attributes specified by the application.  All
     * attributes appear in pairs, except the terminating None.
     */
@@ -60,29 +70,6 @@
 	 /* empty */ ;
    }
 
-   if (cfg) {
-      screen = cfg->screen;
-   } else {
-      int i;
-      for (i = 0; i < num_attribs; i++) {
-         if (attrib_list[i * 2] == GLX_SCREEN)
-            screen = attrib_list[i * 2 + 1];
-      }
-   }
-
-   /* This means that either the caller passed the wrong display pointer or
-    * one of the internal GLX data structures (probably the fbconfig) has an
-    * error.  There is nothing sensible to do, so return an error.
-    */
-   psc = GetGLXScreenConfigs(dpy, screen);
-   if (psc == NULL)
-      return NULL;
-
-   assert(screen == psc->scr);
-
-   if (!cfg && !__glXExtensionBitIsEnabled(psc, EXT_no_config_context_bit))
-      return NULL;
-
    if (direct && psc->vtable->create_context_attribs) {
       /* GLX drops the error returned by the driver.  The expectation is that
        * an error will also be returned by the server.  The server's error
@@ -117,8 +104,8 @@
    cookie =
       xcb_glx_create_context_attribs_arb_checked(c,
 						 gc->xid,
-						 cfg ? cfg->fbconfigID : 0,
-						 screen,
+						 cfg->fbconfigID,
+						 cfg->screen,
 						 gc->share_xid,
 						 gc->isDirect,
 						 num_attribs,
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index eeec4f0..0f44635 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -1129,7 +1129,6 @@
 
       __glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context");
       __glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context_profile");
-      __glXEnableDirectExtension(&psc->base, "GLX_EXT_no_config_context");
 
       if ((mask & ((1 << __DRI_API_GLES) |
                    (1 << __DRI_API_GLES2) |
diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c
index 4470d1e..fa048f9 100644
--- a/src/glx/dri3_glx.c
+++ b/src/glx/dri3_glx.c
@@ -719,7 +719,6 @@
 
    __glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context");
    __glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context_profile");
-   __glXEnableDirectExtension(&psc->base, "GLX_EXT_no_config_context");
 
    if ((mask & ((1 << __DRI_API_GLES) |
                 (1 << __DRI_API_GLES2) |
diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c
index 1f86ac2..2f0675a 100644
--- a/src/glx/drisw_glx.c
+++ b/src/glx/drisw_glx.c
@@ -630,7 +630,6 @@
    if (psc->swrast->base.version >= 3) {
       __glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context");
       __glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context_profile");
-      __glXEnableDirectExtension(&psc->base, "GLX_EXT_no_config_context");
 
       /* DRISW version >= 2 implies support for OpenGL ES.
        */
diff --git a/src/glx/glxextensions.c b/src/glx/glxextensions.c
index 4853ad5..af6ffbf 100644
--- a/src/glx/glxextensions.c
+++ b/src/glx/glxextensions.c
@@ -146,7 +146,6 @@
    { GLX(EXT_fbconfig_packed_float),   VER(0,0), Y, Y, N, N },
    { GLX(EXT_framebuffer_sRGB),        VER(0,0), Y, Y, N, N },
    { GLX(EXT_import_context),          VER(0,0), Y, Y, N, N },
-   { GLX(EXT_no_config_context),       VER(0,0), Y, N, N, N },
    { GLX(EXT_texture_from_pixmap),     VER(0,0), Y, N, N, N },
    { GLX(EXT_visual_info),             VER(0,0), Y, Y, N, N },
    { GLX(EXT_visual_rating),           VER(0,0), Y, Y, N, N },
diff --git a/src/glx/glxextensions.h b/src/glx/glxextensions.h
index 07cd3af..d73128b 100644
--- a/src/glx/glxextensions.h
+++ b/src/glx/glxextensions.h
@@ -50,7 +50,6 @@
    EXT_fbconfig_packed_float_bit,
    EXT_framebuffer_sRGB_bit,
    EXT_import_context_bit,
-   EXT_no_config_context_bit,
    EXT_texture_from_pixmap_bit,
    EXT_visual_info_bit,
    EXT_visual_rating_bit,