requested to merge github/fork/kbrenneman/egl-vendor-platform-detection into master
Created by: kbrenneman
This is an extension to the EGL vendor library interface that allows vendor libraries to add platform detection for new platforms that libglvnd can't detect on its own.
It adds one new optional function, which takes the display handle passed to eglGetDisplay, and returns a platform enum.
Just calling a vendor's eglGetDisplay implementation directly wouldn't work, because vendor libraries can use things like a fallback platform when it can't otherwise figure it out. In Mesa, for example, if the app passes in something that doesn't look like a Wayland or GBM display, then it would fall back to X11. If it's not an X11 display, then that would prevent any later vendor library from correctly identifying it.
The new function in this change is more constrained, and it keeps a clean separation between platform detection and the resulting eglGetPlatformDisplay call.