aboutsummaryrefslogtreecommitdiff
path: root/render/gles2
diff options
context:
space:
mode:
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);