FS#37386 - [qt5-base] why GLES?

Attached to Project: Arch Linux
Opened by Byoung-young Lee (xylosper) - Friday, 18 October 2013, 13:22 GMT
Last edited by Felix Yan (felixonmars) - Sunday, 13 December 2015, 13:54 GMT
Task Type Feature Request
Category Packages: Extra
Status Closed
Assigned To Felix Yan (felixonmars)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:
I found that Qt5 recetly updated is built with gles, but why? Is there critical issue related this change?
OpenGL ES lacks lots of features of OpenGL, for instance, no GL_TEXTURE_3D support.
Even if some platforms like wayland require only EGL, GLX is still major implmentation for OpenGL in Linux.
This change implies the restriction of OpenGL ES to all applications integrated with Qt5 and could break OpenGL(and GLX) dependent functionalities.
Can you revert it to desktop OpenGL?
This task depends upon

Closed by  Felix Yan (felixonmars)
Sunday, 13 December 2015, 13:54 GMT
Reason for closing:  None
Additional comments about closing:  See comments.
Comment by Andrea Scarpino (BaSh) - Friday, 18 October 2013, 15:12 GMT
A wayland developer told me to enable that so he can develop some stuff.
He didn't know of any regression, neither I, so I enabled it.
I'll revert it.
Comment by Byoung-young Lee (xylosper) - Friday, 18 October 2013, 23:25 GMT
I'm glad to hear that. I deeply appreciate your decision to rever it.
Just for your information, the wayland site is also mentioning about this issue:
--------------------------------------
Why does Wayland use EGL and GLES2?

EGL is the only GL binding API that lets us avoid dependencies on existing window systems, in particular X. GLX obviously pulls in X dependencies and only lets us set up GL on X drawables. The alternative is to write a Wayland specific GL binding API, say, WaylandGL.

A more subtle point is that libGL.so includes the GLX symbols, so linking to that library will pull in all the X dependencies. This means that we can't link to full GL without pulling in the client side of X, so we're using GLES2 for now. Longer term, we'll need a way to use full GL under Wayland.
--------------------------------------
They are saying that the abcence of full GL support shoud be fixed and EGL is a temporary solution 'for now'.
Comment by Ricardo Vieira (ricardomv) - Tuesday, 20 January 2015, 10:05 GMT
  • Field changed: Percent Complete (100% → 0%)
Can you take a look at this again are there still problems with egl? Because this would be useful for running qt compositors from qt5-wayland
Comment by Byoung-young Lee (xylosper) - Tuesday, 20 January 2015, 11:38 GMT
There was never problem with EGL itself.
It's compatibility issue.
OpenGL ES is not compatible with OpenGL.
EGL is an implementation of OpenGL ES and GLX is an implementation of OpenGL.
Enabling EGL means disabling OpenGL support which is totally nonsense because OpenGL is much more extensible than OpenGL ES, which is natural because OpenGL ES is for ES(embedded system).
OpenGL ES is powerful enough to be used in desktop but it's not as powerful as non-ES OpenGL.
If OpenGL ES support for Qt 5 is really required, it should be provided by separated pacakge, such as qt5-base-egl which conflicts with qt5-base.
Comment by Pier Luigi Fiorini (plfiorini) - Tuesday, 20 January 2015, 11:51 GMT
To my knowledge nowadays GLESv2 is no longer a hard requirement to get QtWayland working.
Just make sure EGL is still enabled via the -egl configure switch (-eglfs will also be needed to enable the eglfs QPA plugin).
This is especially true with Qt 5.5 and the xcb plugin that has now separate GL integrations or with platform plugins where EGL is mandatory such as kms.
EDIT: This won't interfere with GLX.
Comment by Byoung-young Lee (xylosper) - Tuesday, 20 January 2015, 12:01 GMT
Enabling EGL support makes all Qt 5 applications lose OpenGL support.
That's what happened when I posted this issue.
Comment by Pier Luigi Fiorini (plfiorini) - Tuesday, 20 January 2015, 12:07 GMT Comment by Byoung-young Lee (xylosper) - Tuesday, 20 January 2015, 12:16 GMT
If it's the feature of Qt 5.5 as you said, I cannot say anything about this because I didn't test it.
If you have no problem with OpenGL sepecific functions with EGL support, then it would be fine.
Comment by Pier Luigi Fiorini (plfiorini) - Tuesday, 20 January 2015, 12:21 GMT
As far as I remember back then (more than a year ago) there was this bug that was causing EGL to be excluded unless GLESv2 was enabled.
This was fixed with Qt 5.3 or Qt 5.4.

To my knowledge both GL and EGL can coexist especially with the upcoming release that enables a QtWayland compositor to run a X11 window and still get EGL support, while preserving the ability to use GLX.
Comment by Ricardo Vieira (ricardomv) - Tuesday, 20 January 2015, 17:20 GMT
I have been looking into this and i think @plfiorini is right using -egl and -eglfs would fix my issue. Maybe you can add it to the testing repo so we can try it.
Comment by Mihai Coman (z0id) - Monday, 02 February 2015, 13:35 GMT
I'm trying to run kwin 5.2 with EGL (possibly with GLES, too) instead of GLX on nvidia-340xx 340.65-8. I recompiled qt with -egl and -eglfs. When I run "KWIN_OPENGL_INTERFACE=egl kwin_x11 --replace" I get:
[...]
kwin_core: Forcing EGL native interface through environment variable
kwin_core: Initializing OpenGL compositing
kwin_core: bind OpenGL API failed
kwin_core: Creating the OpenGL rendering failed: "Could not initialize rendering context"
kwin_core: Failed to initialize compositing, compositing disabled
[...]

The nvidia driver has EGL and GLES 2.0 support. EGL tests from mesa-demos work.
Is this qt5 recompile not enough for egl & gles support in qt apps such as kwin? Is there something else that I'm missing?

EDIT: I changed to radeon driver & mesa, and now kwin works with EGL. Seems to be nvidia-related.
Comment by James (thx1138) - Monday, 09 February 2015, 00:50 GMT
Has there been a decision about qt5 configure options? I'm interested in trying Wayland shells running on the QtCompositor. If I understand, configure needs the additional options: -opengl es2 -egl and -eglfs. Qt 5.4.1 is supposed to be released very soon. Can these options be included?
Comment by James (thx1138) - Wednesday, 25 February 2015, 21:52 GMT
Ok, I'm looking at "configure --help" for qt-5.4.1 released 2015 Feb 24. The only egl related configure option is "-eglfs", and it is the default. Other vaguely related things, like "-kms" and "-evdev", as well as "-xcb" are also the defaults.

It would seem that egl support should be a non issue now. Can this bug be closed?
Comment by Felix Yan (felixonmars) - Monday, 02 March 2015, 02:23 GMT
Looks like we don't touch any egl related configure options in the qt5 PKGBUILD now. Is there any more issues or should this bug report be closed?
Comment by Ricardo Vieira (ricardomv) - Wednesday, 04 March 2015, 15:53 GMT
seems to work for me now. i think this can be closed

Loading...