aboutsummaryrefslogtreecommitdiff
path: root/render/gles2
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-04-08 14:56:05 +0200
committerScott Anderson <scott@anderso.nz>2020-04-09 00:16:03 +0000
commit4a1015faff7fb620779dedf473cedfef77f938c6 (patch)
tree6ec4bd734620e19ed2cf805339145bebabe2a9b2 /render/gles2
parent9acca4fc731cbdc12380ccd7efb924d846ee6646 (diff)
render/gles2: only call wlr_egl_bind_display if supported
This allows us to hard-fail if the extension is advertised but we fail to enable it.
Diffstat (limited to 'render/gles2')
-rw-r--r--render/gles2/renderer.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/render/gles2/renderer.c b/render/gles2/renderer.c
index 9df21fcc..523c5bd5 100644
--- a/render/gles2/renderer.c
+++ b/render/gles2/renderer.c
@@ -355,9 +355,14 @@ static bool gles2_init_wl_display(struct wlr_renderer *wlr_renderer,
struct wl_display *wl_display) {
struct wlr_gles2_renderer *renderer =
gles2_get_renderer(wlr_renderer);
- if (!wlr_egl_bind_display(renderer->egl, wl_display)) {
- wlr_log(WLR_INFO, "failed to bind wl_display to EGL");
- return false;
+
+ if (renderer->egl->exts.bind_wayland_display_wl) {
+ if (!wlr_egl_bind_display(renderer->egl, wl_display)) {
+ wlr_log(WLR_ERROR, "Failed to bind wl_display to EGL");
+ return false;
+ }
+ } else {
+ wlr_log(WLR_INFO, "EGL_WL_bind_wayland_display is not supported");
}
return true;
}