From c2288a7b88240e4377bfc1c67b44efb58f704a42 Mon Sep 17 00:00:00 2001 From: Julien Olivain Date: Mon, 11 May 2020 08:58:30 +0200 Subject: render/egl: include EGL/eglmesaext.h only if present This patch will make the EGL renderer work on any EGL/GLESv2 driver providing the EGL_WL_bind_wayland_display extensions. Mesa used to declare provisional EGL_WL_bind_wayland_display directly in . Then, all unofficial extensions were moved to , to have a cleaner implementation. See: https://gitlab.freedesktop.org/mesa/mesa/-/commit/ab7bb10a2af711086319ce35815acd797b86fe27 The extension was then approved at Khronos Group, and reached the official . See: https://www.khronos.org/registry/EGL/extensions/WL/EGL_WL_bind_wayland_display.txt https://github.com/KhronosGroup/EGL-Registry/commit/aa9b63f3ab18aee92c95786a2478156430f809e4 In order to make sure the renderer will work on any version of any implementation providing the extension, only include the mesa-specific header if it's present. Signed-off-by: Julien Olivain --- include/wlr/config.h.in | 2 ++ include/wlr/render/egl.h | 4 ++++ 2 files changed, 6 insertions(+) (limited to 'include/wlr') diff --git a/include/wlr/config.h.in b/include/wlr/config.h.in index 94273fac..a7691ff9 100644 --- a/include/wlr/config.h.in +++ b/include/wlr/config.h.in @@ -1,6 +1,8 @@ #ifndef WLR_CONFIG_H #define WLR_CONFIG_H +#mesondefine WLR_HAS_EGLMESAEXT_H + #mesondefine WLR_HAS_LIBCAP #mesondefine WLR_HAS_SYSTEMD diff --git a/include/wlr/render/egl.h b/include/wlr/render/egl.h index 50432887..c810b08e 100644 --- a/include/wlr/render/egl.h +++ b/include/wlr/render/egl.h @@ -16,10 +16,14 @@ #define EGL_NO_X11 #endif +#include + #include #include +#if WLR_HAS_EGLMESAEXT_H // TODO: remove eglmesaext.h #include +#endif #include #include #include -- cgit v1.2.3