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>
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) {