gl_renderer: poor error messages when config matching fails
Submitted by Bruno
Assigned to Wayland bug list
Description
On a rather old system (i855GM), trying to start weston (1.6.1) fails with rather unclear error message:
[21:49:59.073] Loading module '/usr/lib/weston/drm-backend.so'
[21:49:59.078] initializing drm backend
[21:49:59.084] using /dev/dri/card0
[21:49:59.084] Loading module '/usr/lib/weston/gl-renderer.so'
[21:49:59.157] failed to choose EGL config
[21:49:59.157] EGL error state: EGL_SUCCESS (0x3000)
[21:49:59.157] failed to initialize egl
[21:49:59.168] fatal: failed to create compositor
The reason of that failure is that the system does not provide any config matching expectation.
System only provides configs with EGL_RENDERABLE_TYPE=EGL_OPENGL_ES_BIT | EGL_OPENGL_BIT while weston wants EGL_OPENGL_ES2_BIT.
In addition EGL_*_SIZE is requested with 1-bit size while system has either 16bit (R=5,G=6,B=5) or 32bit (A=8,R=8,G=8,B=8) pixels.
It would be good if weston's gl_renderer could handle GLESv1 systems and, until then, provide a more explicit error message.