Revert "glx: Implement GLX_EXT_no_config_context (v2)"
authorAdam Jackson <ajax@redhat.com>
Thu, 9 Nov 2017 16:41:14 +0000 (11:41 -0500)
committerAdam Jackson <ajax@redhat.com>
Thu, 9 Nov 2017 16:41:14 +0000 (11:41 -0500)
Pushed ahead of things actually working.

This reverts commit 5293b96b160b904c0e53cbce93679c3aa090f846.

src/glx/create_context.c
src/glx/dri2_glx.c
src/glx/dri3_glx.c
src/glx/drisw_glx.c
src/glx/glxextensions.c
src/glx/glxextensions.h

index eab6511ad877b6dc2b8c8ab1833d30f8c85bfc6d..38e949ab4cd94e09d4574710fdadac05a4328ce0 100644 (file)
@@ -47,41 +47,28 @@ glXCreateContextAttribsARB(Display *dpy, GLXFBConfig config,
    xcb_generic_error_t *err;
    xcb_void_cookie_t cookie;
    unsigned dummy_err = 0;
-   int screen = -1;
 
-   if (dpy == NULL)
-      return NULL;
-
-   /* Count the number of attributes specified by the application.  All
-    * attributes appear in pairs, except the terminating None.
-    */
-   if (attrib_list != NULL) {
-      for (/* empty */; attrib_list[num_attribs * 2] != 0; num_attribs++)
-        /* 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];
-      }
-   }
+   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, screen);
+   psc = GetGLXScreenConfigs(dpy, cfg->screen);
    if (psc == NULL)
       return NULL;
 
-   assert(screen == psc->scr);
+   assert(cfg->screen == psc->scr);
 
-   if (!cfg && !__glXExtensionBitIsEnabled(psc, EXT_no_config_context_bit))
-      return NULL;
+   /* Count the number of attributes specified by the application.  All
+    * attributes appear in pairs, except the terminating None.
+    */
+   if (attrib_list != NULL) {
+      for (/* empty */; attrib_list[num_attribs * 2] != 0; num_attribs++)
+        /* empty */ ;
+   }
 
    if (direct && psc->vtable->create_context_attribs) {
       /* GLX drops the error returned by the driver.  The expectation is that
@@ -117,8 +104,8 @@ glXCreateContextAttribsARB(Display *dpy, GLXFBConfig config,
    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,
index eeec4f0d6031a77ad7e114a2479911867cfb268f..0f44635725d86161a3ca7f2e104a208c62960706 100644 (file)
@@ -1129,7 +1129,6 @@ dri2BindExtensions(struct dri2_screen *psc, struct glx_display * priv,
 
       __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) |
index 4470d1ef68d08b00f06511070fdf610200b485a7..fa048f990a9ed9c0911aea1de0319e63b1ef3a86 100644 (file)
@@ -719,7 +719,6 @@ dri3_bind_extensions(struct dri3_screen *psc, struct glx_display * priv,
 
    __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) |
index 1f86ac2d4c0f0cc1f4e749d8a0eac7a5874e7aca..2f0675addb42a8065bf476702bebd5c2c867529e 100644 (file)
@@ -630,7 +630,6 @@ driswBindExtensions(struct drisw_screen *psc, const __DRIextension **extensions)
    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.
        */
index 4853ad534e2184ceb0e07c9d6331959d560e65a4..af6ffbf660072a9014bb568c29ab447caca1fd7f 100644 (file)
@@ -146,7 +146,6 @@ static const struct extension_info known_glx_extensions[] = {
    { 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 },
index 07cd3af0ff7dd4fae4c12e7901e551c90a8c6b62..d73128bd0ea382627b3c0578b6d1b3ec2545da0c 100644 (file)
@@ -50,7 +50,6 @@ enum
    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,