From: Pekka Paalanen Date: Fri, 13 Sep 2019 14:31:07 +0000 (+0300) Subject: gl-renderer: pbuffer config for non-surfaceless X-Git-Tag: upstream/9.0.0~374 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=88e5fcb55a36dc4f1e09440f1d0449eb1dd1878c;p=platform%2Fupstream%2Fweston.git gl-renderer: pbuffer config for non-surfaceless If we don't have the surfaceless_context extension, we create a pbuffer as a dummy surface to work with. If we also don't have configless_context, then it is possible the config used for creating the context does not support pbuffers. Therefore, if both conditions apply, we need to pick a config that supports both window and pbuffer surfaces. This makes the "base" config compatible, but it does not yet guarantee that we actually pick it again when creating the pbuffer surface. Fixing that is another patch. Signed-off-by: Pekka Paalanen --- diff --git a/libweston/renderer-gl/gl-renderer.c b/libweston/renderer-gl/gl-renderer.c index ed4ea652..35203b2b 100644 --- a/libweston/renderer-gl/gl-renderer.c +++ b/libweston/renderer-gl/gl-renderer.c @@ -3427,7 +3427,13 @@ gl_renderer_display_create(struct weston_compositor *ec, goto fail_with_error; if (!gr->has_configless_context) { - gr->egl_config = gl_renderer_get_egl_config(gr, EGL_WINDOW_BIT, + EGLint surface_type = EGL_WINDOW_BIT; + + if (!gr->has_surfaceless_context) + surface_type |= EGL_PBUFFER_BIT; + + gr->egl_config = gl_renderer_get_egl_config(gr, + surface_type, drm_formats, drm_formats_count); if (gr->egl_config == EGL_NO_CONFIG_KHR) {