Mesa (master): egl: Don't advertise unsupported platform extensions

Chad Versace chadversary at kemper.freedesktop.org
Fri Oct 14 18:21:54 UTC 2016


Module: Mesa
Branch: master
Commit: c177ef9d47943f648a13beed14269f468583c16e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c177ef9d47943f648a13beed14269f468583c16e

Author: Chad Versace <chadversary at chromium.org>
Date:   Wed Oct 12 15:52:12 2016 -0700

egl: Don't advertise unsupported platform extensions

Mesa's set of supported platform extensions depends on the autoconf
option --with-egl-platforms=foo,bar,baz. If --with-egl-platforms lacks
foo, then eglGetPlatformDisplay(EGL_PLATFORM_FOO, ...) unconditonally
fails.

So, if --with-egl-platforms lacks foo, then remove
EGL_VENDOR_platform_foo from the EGL client extension string.

Cc: mesa-stable at lists.freedesktop.org
Reviewed-by: Emil Velikov <emil.velikov at collabora.com>

---

 src/egl/main/eglglobals.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/egl/main/eglglobals.c b/src/egl/main/eglglobals.c
index ac1a263..8fffa55 100644
--- a/src/egl/main/eglglobals.c
+++ b/src/egl/main/eglglobals.c
@@ -53,11 +53,17 @@ struct _egl_global _eglGlobal =
    /* ClientExtensionString */
    "EGL_EXT_client_extensions"
    " EGL_EXT_platform_base"
+#ifdef HAVE_WAYLAND_PLATFORM
    " EGL_EXT_platform_wayland"
+#endif
+#ifdef HAVE_X11_PLATFORM
    " EGL_EXT_platform_x11"
+#endif
+#ifdef HAVE_DRM_PLATFORM
+   " EGL_MESA_platform_gbm"
+#endif
    " EGL_KHR_client_get_all_proc_addresses"
-   " EGL_KHR_debug"
-   " EGL_MESA_platform_gbm",
+   " EGL_KHR_debug",
 
    NULL, /* debugCallback */
    _EGL_DEBUG_BIT_CRITICAL | _EGL_DEBUG_BIT_ERROR, /* debugTypesEnabled */




More information about the mesa-commit mailing list