From b4e70a49ef953ed174041dd0432e163311639554 Mon Sep 17 00:00:00 2001 From: Manuel Stoeckl Date: Sun, 31 Oct 2021 21:36:58 -0400 Subject: [PATCH] simple-egl: only force config buffer size for 16bpp Constraining the buffer size of an EGLConfig to 32 means that the sum of red, green, blue, and alpha channels must equal 32. This constraint prevented weston-simple-egl from picking an RGBX pixel format when an opaque surface was asked for, since the typical RGBX pixel formats have buffer sizes of 30, 24, and 16. Signed-off-by: Manuel Stoeckl --- clients/simple-egl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clients/simple-egl.c b/clients/simple-egl.c index c7b46a7b..c7b73b0e 100644 --- a/clients/simple-egl.c +++ b/clients/simple-egl.c @@ -181,7 +181,7 @@ init_egl(struct display *display, struct window *window) for (i = 0; i < n; i++) { eglGetConfigAttrib(display->egl.dpy, configs[i], EGL_BUFFER_SIZE, &size); - if (window->buffer_size == size) { + if (window->buffer_size == 0 || window->buffer_size == size) { display->egl.conf = configs[i]; break; } @@ -818,7 +818,7 @@ main(int argc, char **argv) window.geometry.width = 250; window.geometry.height = 250; window.window_size = window.geometry; - window.buffer_size = 32; + window.buffer_size = 0; window.frame_sync = 1; window.delay = 0;