On Wed Feb 28 13:24:37 2024 +0000, Alexandros Frantzis wrote:
Mesa's EGL at least, has good autodetection mechanisms based on the provided native_display, but indeed being more explicit with eglGetPlatformDisplay is the better choice if available. I will add support for it, using eglGetDisplay as a fallback. EGL_DEFAULT_DISPLAY doesn't help here, because even if Wayland is the default EGL platform, EGL will create a new connection/wl_display to the compositor which cannot use objects created from our normal Wine wl_display (notably it won't be able to use the wl_surface we want to make a target for rendering).
IMO requiring the EGL_EXT_platform_base (and EXT_platform_wayland) extension would be nice, making the code simpler and later making it easier to move it around if we consider having it in win32u, or extending it for instance for offscreen rendering with the device platforms.
There again I don't know how widespread the extensions are but it's been 10 years now, and we can consider adding fallbacks later only when needed.