gl-renderer: fix pbuffer surface creation

When there's neither configless nor surfaceless EGL extension
(i.e. not a Mesa driver), Weston falls back to a dummy pbuffer surface.

Weston attempts to find for that surface an EGL config but uses a NULL
array of pixel formats. This fails with the following messages:

 EGL_KHR_surfaceless_context unavailable. Trying PbufferSurface
 Found an EGLConfig matching { pbf;  } but it is not usable because
    neither EGL_KHR_no_config_context nor EGL_MESA_configless_context
    are supported by EGL.
 failed to choose EGL config for PbufferSurface
 EGL error state: EGL_SUCCESS (0x3000)
 Failed to initialise the GL renderer;

Signed-off-by: Tomek Bury <tomek.bury@broadcom.com>
dev
Tomek Bury 5 years ago
parent 15c603caa6
commit ba54831100
  1. 6
      libweston/renderer-gl/gl-renderer.c

@ -3448,8 +3448,12 @@ gl_renderer_create_pbuffer_surface(struct gl_renderer *gr) {
EGL_NONE
};
pbuffer_config = gl_renderer_get_egl_config(gr, EGL_PBUFFER_BIT,
pbuffer_config = gr->egl_config;
if (pbuffer_config == EGL_NO_CONFIG_KHR) {
pbuffer_config =
gl_renderer_get_egl_config(gr, EGL_PBUFFER_BIT,
NULL, 0);
}
if (pbuffer_config == EGL_NO_CONFIG_KHR) {
weston_log("failed to choose EGL config for PbufferSurface\n");
return -1;

Loading…
Cancel
Save