Skip to content

Expose EGL_KHR_platform_* when EXT is supported

Link Mauve requested to merge linkmauve/mesa:expose-khr_platform into master

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.

Merge request reports