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 <pekka.paalanen@collabora.com>
dev
Pekka Paalanen 5 years ago
parent 5d6d2b10af
commit 88e5fcb55a
  1. 8
      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) {

Loading…
Cancel
Save