After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 728978 - Don't set EGL_PLATFORM
Don't set EGL_PLATFORM
Status: RESOLVED FIXED
Product: cogl
Classification: Platform
Component: EGL
1.18.x
Other Linux
: Normal normal
: ---
Assigned To: Cogl maintainer(s)
Cogl maintainer(s)
wayland
Depends on:
Blocks: wayland
 
 
Reported: 2014-04-25 20:51 UTC by Kristian Høgsberg
Modified: 2014-11-30 23:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to fix the issue (2.11 KB, patch)
2014-04-25 20:51 UTC, Kristian Høgsberg
none Details | Review

Description Kristian Høgsberg 2014-04-25 20:51:41 UTC
Created attachment 275167 [details] [review]
patch to fix the issue

This environment variable predates the reliable platform detection in mesa
    and typically just causes crashes when the specified platform doesn't
    match what's passed in.  Aside from being unecessary and problematic
    it also leaks into the GNOME session, preventing clients from
    automatically detecting the wayland platform.
Comment 1 Neil Roberts 2014-04-30 15:59:46 UTC
Thanks for the patch. I've pushed it to master and the 1.18 branch:

https://git.gnome.org/browse/cogl/commit/?id=e3e516612dcce10b949370bf82a6d82
https://git.gnome.org/browse/cogl/commit/?h=cogl-1.18&id=8fb9cea4515161effda

The EGL_PLATFORM part in the KMS winsys was added in August from bug 705836. However it looks like that was only added to compensate for the fact that the Wayland winsys sets the environment variable which would mess up the KMS winsys if it is tried after the Wayland winsys. The Wayland part was added back in 2011 in commit 653d59af043. I think it's safe to assume that at that point the Wayland backend was experimental and has changed a lot since then so we can safely revert it.
Comment 2 Steve Newbury 2014-11-30 23:16:45 UTC
I'm not convinced everything is working correctly here.  Without EGL_PLATFORM set in the environment, in a gnome-wayland session (I have with gtk+ patched to use wayland first, but I don't think it matters), eglinfo uses the X11 platfrom via Xwayland.

If DISPLAY is unset, initialisation fails unless EGL_PLATFORM is set to wayland.
Comment 3 Steve Newbury 2014-11-30 23:20:21 UTC
On the other hand, lauching weston works, as does running SDL2 applications using the wayland driver.