egl: Rename MESA_configless_context bit to KHR_no_config_context
authorAdam Jackson <ajax@redhat.com>
Fri, 9 Sep 2016 16:25:34 +0000 (12:25 -0400)
committerAdam Jackson <ajax@redhat.com>
Mon, 12 Sep 2016 15:29:09 +0000 (11:29 -0400)
Keep the old name in the extension string, but refer to the KHR
extension internally.

Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
src/egl/drivers/dri2/egl_dri2.c
src/egl/main/eglapi.c
src/egl/main/eglcontext.c
src/egl/main/egldisplay.h

index 859612f1b978bd638f1de7929b186d5c39833d59..bbc457c8bb0210be72c124a048dbebde6b2f7e3a 100644 (file)
@@ -603,8 +603,8 @@ dri2_setup_screen(_EGLDisplay *disp)
       disp->ClientAPIs |= EGL_OPENGL_ES3_BIT_KHR;
 
    assert(dri2_dpy->image_driver || dri2_dpy->dri2 || dri2_dpy->swrast);
+   disp->Extensions.KHR_no_config_context = EGL_TRUE;
    disp->Extensions.KHR_surfaceless_context = EGL_TRUE;
-   disp->Extensions.MESA_configless_context = EGL_TRUE;
 
    if (dri2_renderer_query_integer(dri2_dpy,
                                    __DRI2_RENDERER_HAS_FRAMEBUFFER_SRGB))
index df2dcd6016f816fc6c4680bee23b32f37b5055e4..ba8305e08ed0eeba66dddae6a18d459b41d8ee96 100644 (file)
@@ -406,11 +406,13 @@ _eglCreateExtensionsString(_EGLDisplay *dpy)
       _eglAppendExtension(&exts, "EGL_KHR_image");
    _EGL_CHECK_EXTENSION(KHR_image_base);
    _EGL_CHECK_EXTENSION(KHR_image_pixmap);
+   _EGL_CHECK_EXTENSION(KHR_no_config_context);
    _EGL_CHECK_EXTENSION(KHR_reusable_sync);
    _EGL_CHECK_EXTENSION(KHR_surfaceless_context);
    _EGL_CHECK_EXTENSION(KHR_wait_sync);
 
-   _EGL_CHECK_EXTENSION(MESA_configless_context);
+   if (dpy->Extensions.KHR_no_config_context)
+      _eglAppendExtension(&exts, "EGL_MESA_configless_context");
    _EGL_CHECK_EXTENSION(MESA_drm_image);
    _EGL_CHECK_EXTENSION(MESA_image_dma_buf_export);
 
@@ -627,7 +629,7 @@ eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_list,
 
    _EGL_CHECK_DISPLAY(disp, EGL_NO_CONTEXT, drv);
 
-   if (!config && !disp->Extensions.MESA_configless_context)
+   if (!config && !disp->Extensions.KHR_no_config_context)
       RETURN_EGL_ERROR(disp, EGL_BAD_CONFIG, EGL_NO_CONTEXT);
 
    if (!share && share_list != EGL_NO_CONTEXT)
index 7eac79ac952dc3afc1dffc9abce1a1cc9ea32f22..60625f64705c67d90c00964ac26f4bfd45ef5542 100644 (file)
@@ -642,9 +642,9 @@ _eglCheckMakeCurrent(_EGLContext *ctx, _EGLSurface *draw, _EGLSurface *read)
           (read && read->Config != ctx->Config))
          return _eglError(EGL_BAD_MATCH, "eglMakeCurrent");
    } else {
-      /* Otherwise we must be using the EGL_MESA_configless_context
+      /* Otherwise we must be using the EGL_KHR_no_config_context
        * extension */
-      assert(dpy->Extensions.MESA_configless_context);
+      assert(dpy->Extensions.KHR_no_config_context);
 
       /* The extension doesn't permit binding draw and read buffers with
        * differing contexts */
index 6bfc8589a42786958cfdc5d5010852445f0384d4..6f3340ef40433b0710eb998cd517d02a109b0d89 100644 (file)
@@ -112,11 +112,11 @@ struct _egl_extensions
    EGLBoolean KHR_gl_texture_cubemap_image;
    EGLBoolean KHR_image_base;
    EGLBoolean KHR_image_pixmap;
+   EGLBoolean KHR_no_config_context;
    EGLBoolean KHR_reusable_sync;
    EGLBoolean KHR_surfaceless_context;
    EGLBoolean KHR_wait_sync;
 
-   EGLBoolean MESA_configless_context;
    EGLBoolean MESA_drm_image;
    EGLBoolean MESA_image_dma_buf_export;