eglgears_x11 and es2gears_x11 from mesa-demos(https://gitlab.freedesktop.org/mesa/demos) failed to run: ./es2gears_x11 EGL_VERSION = 1.4 EGLUT: failed to choose a config Reproducible: Always Steps to Reproduce: 1. download source code from https://gitlab.freedesktop.org/mesa/demos 2. cd demos && ./autogen.sh && make && cd src/egl/opengl 3. ./eglgears_x11 Actual Results: the gears didn't show, instead, program exited with following error message: EGL_VERSION = 1.4 EGLUT: failed to choose a config Expected Results: the gears should show up. 1. Per the upstream developer's suggestion (https://gitlab.freedesktop.org/mesa/mesa/issues/2597): should use platform option like '-Dplatforms=x11,drm,surfaceless' when building mesa (aka, put surfaceless in the end). 2. I changed the line in mesa' ebuild file from: emesonargs+=( -Dplatforms=surfaceless$(use X && echo ",x11")$(use wayland && echo ",wayland")$(use gbm && echo ",drm") ) to: emesonargs+=( -Dplatforms=$(use X && echo "x11,")$(use wayland && echo "wayland,")$(use gbm && echo "drm,")surfaceless ) Then the issue that mesa-demo encounters is fixed. 3. the gl feature in spice-gdk also has the problem with eglChooseConfig()
Created attachment 617050 [details] emerge-info.txt output of `emerge --info`
There is a thread talking about this issue in the forum: https://forums.gentoo.org/viewtopic-t-1109214.html.
I can confirm the issue. eglgears_x11, es2gears_x11 and all EGL demo programs from khronos and other web sites fail to run under Mesa 19.2.8, 19.3.4, 20.0.0.
shunlir identified the cuplrit. It's a bug in current Mesa ebuilds. See: - https://forums.gentoo.org/viewtopic-p-8427014.html#8427014 - https://gitlab.freedesktop.org/mesa/mesa/issues/2597 Proposed solution: please fix current Mesa ebuilds
I can confirm that the proposed solution (moving 'surfaceless' to the end of emesonargs) fixes the problem under Mesa 19.2.8. eglgears_x11 and EGL demo programs from various web sites work as expected under Mesa 19.2.8 after I built Mesa with the suggested fix.
Created attachment 617272 [details, diff] shunlir's bug fix as patch for mesa-19.3.4.ebuild
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=406bd0caa2e11ef228a96d38c14550594bf424be commit 406bd0caa2e11ef228a96d38c14550594bf424be Author: Matt Turner <mattst88@gentoo.org> AuthorDate: 2020-03-08 23:57:08 +0000 Commit: Matt Turner <mattst88@gentoo.org> CommitDate: 2020-03-09 00:07:22 +0000 media-libs/mesa: Make X11 the primary EGL platform Closes: https://bugs.gentoo.org/711516 Signed-off-by: Matt Turner <mattst88@gentoo.org> media-libs/mesa/{mesa-19.3.4.ebuild => mesa-19.3.4-r1.ebuild} | 2 +- media-libs/mesa/{mesa-20.0.1.ebuild => mesa-20.0.1-r1.ebuild} | 2 +- media-libs/mesa/mesa-9999.ebuild | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)