From 0e253e0615469eb9293045483088f713e64e1d82 Mon Sep 17 00:00:00 2001 From: emersion Date: Thu, 15 Mar 2018 15:51:15 +0100 Subject: render/gles2: don't set inverted_y when EGL_WAYLAND_Y_INVERTED_WL is unsupported --- render/gles2/texture.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'render/gles2') diff --git a/render/gles2/texture.c b/render/gles2/texture.c index 5e84890f..775f7cdc 100644 --- a/render/gles2/texture.c +++ b/render/gles2/texture.c @@ -163,8 +163,10 @@ static bool gles2_texture_upload_drm(struct wlr_texture *_tex, (EGLint*)&tex->wlr_texture.height); EGLint inverted_y; - wlr_egl_query_buffer(tex->egl, buf, EGL_WAYLAND_Y_INVERTED_WL, &inverted_y); - tex->wlr_texture.inverted_y = !!inverted_y; + if (wlr_egl_query_buffer(tex->egl, buf, EGL_WAYLAND_Y_INVERTED_WL, + &inverted_y)) { + tex->wlr_texture.inverted_y = !!inverted_y; + } GLenum target; const struct pixel_format *pf; -- cgit v1.2.3