aboutsummaryrefslogtreecommitdiff
path: root/render/gles2
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-12-08 19:32:34 +0100
committerSimon Ser <contact@emersion.fr>2020-12-09 21:45:28 +0100
commitbe8403e73d01acafbe849d92b19dc6d95c05dde0 (patch)
treed9d25e9df62efd8c26f59ac9003988a49f5fe858 /render/gles2
parent6ff478632a685c64f9977b83d8555b61700f12be (diff)
render/gles2: don't eglGetConfigAttrib on EGL_NO_CONFIG_KHR
If we don't have an EGL config, don't try to query anything from it.
Diffstat (limited to 'render/gles2')
-rw-r--r--render/gles2/renderer.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/render/gles2/renderer.c b/render/gles2/renderer.c
index c90108fb..bb8dab02 100644
--- a/render/gles2/renderer.c
+++ b/render/gles2/renderer.c
@@ -453,8 +453,10 @@ static enum wl_shm_format gles2_preferred_read_format(
pop_gles2_debug(renderer);
EGLint alpha_size = -1;
- eglGetConfigAttrib(renderer->egl->display, renderer->egl->config,
- EGL_ALPHA_SIZE, &alpha_size);
+ if (renderer->egl->config != EGL_NO_CONFIG_KHR) {
+ eglGetConfigAttrib(renderer->egl->display, renderer->egl->config,
+ EGL_ALPHA_SIZE, &alpha_size);
+ }
const struct wlr_gles2_pixel_format *fmt =
get_gles2_format_from_gl(gl_format, gl_type, alpha_size > 0);