Expose EGL_KHR_platform_* when EXT is supported
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Fri, 8 May 2020 17:23:03 +0000 (19:23 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 19 May 2020 16:41:54 +0000 (16:41 +0000)
commita3fb064e000a8706319dc996788159bf84a13f0f
tree65d48fb8b24f9fee4cb11776be480a0f2762b597
parent52d6b4d6c0fa480ead93786851349dbd0a54d394
Expose EGL_KHR_platform_* when EXT is supported

On EGL 1.4, one had to check for the existence of EGL_EXT_platform_base
before querying the eglGetPlatformDisplayEXT() and
eglCreatePlatformWindowSurfaceEXT() symbols, to then use them if the
EGL_EXT_platform_* extension for the given platform was exposed.

Since EGL 1.5, the platform functionality was made core, which means we
can obtain the symbols unconditionally, but we can't know the EGL
version before having created a display, at which point we've already
done a platform selection by passing an EGLNativeDisplay.  The
EGL_KHR_platform_* extensions thus are used by clients to know whether
it's safe or not to dlsym() the EGL 1.5 symbols.

This commit adds those extensions when the given platform is enabled.

Acked-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5052>
src/egl/main/eglglobals.c