On Thu, 2018-08-02 at 17:21 -0700, Madhurkiran Harikrishnan wrote:
> The original implementation always chose first egl config for pbuffer
> surface type, however the returned configs are implementation specific
> and egl config may not always match between ctx and surface. Hence,
> use gr->egl_config which already has the matching config but ensure that
> windows and pbuffer bit are set for the surface type.

Does this make pbuffer surface support mandatory? (Or, is it mandatory
already.) If so it might make more sense to just do:

diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c
index 2c50d2da..97a8ef6a 100644
--- a/libweston/gl-renderer.c
+++ b/libweston/gl-renderer.c
@@ -3263,7 +3263,7 @@ gl_renderer_setup_egl_extensions(struct weston_compositor 
*ec)
 }
 
 static const EGLint gl_renderer_opaque_attribs[] = {
-       EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
+       EGL_SURFACE_TYPE, EGL_WINDOW_BIT | EGL_PBUFFER_BIT,
        EGL_RED_SIZE, 1,
        EGL_GREEN_SIZE, 1,
        EGL_BLUE_SIZE, 1,
@@ -3273,7 +3273,7 @@ static const EGLint gl_renderer_opaque_attribs[] = {
 };
 
 static const EGLint gl_renderer_alpha_attribs[] = {
-       EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
+       EGL_SURFACE_TYPE, EGL_WINDOW_BIT | EGL_PBUFFER_BIT,
        EGL_RED_SIZE, 1,
        EGL_GREEN_SIZE, 1,
        EGL_BLUE_SIZE, 1,

As that way you'll always pick an EGLConfig with pbuffer support.

- ajax
_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to