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 771636 - gles2 x session bound to glx winsys
gles2 x session bound to glx winsys
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
3.21.x
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
: 774648 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-09-18 22:30 UTC by Alban Browaeys
Modified: 2017-03-24 16:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
x11: Use EGL instead of GLX when drawing using GLES (4.80 KB, patch)
2016-09-23 04:27 UTC, Jonas Ådahl
none Details | Review
x11: Use EGL instead of GLX when drawing using GLES (4.79 KB, patch)
2016-09-28 08:34 UTC, Jonas Ådahl
committed Details | Review

Description Alban Browaeys 2016-09-18 22:30:03 UTC
in meta-renderer-x11 the vtable bounds non compositor sessions to glx and compositor ones to egl xlib. 
Before commit 2ceff4ee9b3d9e94f6ad72ac4256786d0c5b62c2  ("Create cogl renderer in MetaRenderer") this was different.
That is wayland compositor session was forced to be egl, otherwise it was up to the constraints.
That is, gles2 was bound to egl xlib before (Odroid U2 with MALI 400 GPU this with mali 400 x11/egl userspace blob). 

Now that teh gdm x session is started as gles2 with a glx winsys , gnome-shell breaks at startup with clutter no driver error.

Locally I disabled setting the winsys at all in src/backends/x11/meta-renderer-x11.c .

PS: Odroid U2 Mali 400 support  for gnome shell has other issues, though this one is a regression that should affect all gles2 x11 sessions, so I felt it deserved a report. Mind this is mutter-clutter only issue, plain cogl/clutter are not affected.
Comment 1 Jonas Ådahl 2016-09-23 04:27:20 UTC
Created attachment 336137 [details] [review]
x11: Use EGL instead of GLX when drawing using GLES

When running as a X11 CM we shouldn't use the GLX winsys when the
driver doesn't support it, i.e. OpenGL ES drivers.

---

I still avoid going through the cogl winsys contraint path, as I think that it really should be mutter that configures this, not cogl.
Comment 2 Alban Browaeys 2016-09-23 09:38:23 UTC
Comment on attachment 336137 [details] [review]
x11: Use EGL instead of GLX when drawing using GLES

In the get_x11_cogl_winsys_vtable switch, did you mean glx when gl or gl3 ? All the cases resolve to egl xlib.
I test the patch this evening. Thank you for the fix !
Comment 3 Jonas Ådahl 2016-09-23 10:19:47 UTC
Review of attachment 336137 [details] [review]:

Gah, right, it should use GLX when the driver is plain OpenGL
Comment 4 Alban Browaeys 2016-09-24 10:20:50 UTC
Works for me ! (with above change , that is glx for GL and GL3).
Comment 5 Jonas Ådahl 2016-09-28 08:34:31 UTC
Created attachment 336420 [details] [review]
x11: Use EGL instead of GLX when drawing using GLES

When running as a X11 CM we shouldn't use the GLX winsys when the
driver doesn't support it, i.e. OpenGL ES drivers.
Comment 6 Alban Browaeys 2016-10-05 17:16:07 UTC
Already confirmed ok (I checked the latest patch has no diff to the patch I applied beforehand).
Mind this does not work as is (requires other tweaks to /etc clutter and cogl config files and patches to Xorg. But regression is gone.
Comment 7 Jonas Ådahl 2016-11-18 01:33:00 UTC
*** Bug 774648 has been marked as a duplicate of this bug. ***
Comment 8 Carlos Garnacho 2017-03-24 10:22:04 UTC
Review of attachment 336420 [details] [review]:

Looks good IMHO.
Comment 9 Jonas Ådahl 2017-03-24 16:23:38 UTC
Attachment 336420 [details] pushed as ac813d5 - x11: Use EGL instead of GLX when drawing using GLES