On Wednesday, 2018-03-14 17:42:16 +0000, Emil Velikov wrote: > From: Emil Velikov <[email protected]> > > Instead of indirectly pulling the wayland headers everywhere, use > forward declarations and #include only as needed. > > Should effectively fix build errors like the following: > > make[5]: Entering directory > '/.../src/gallium/state_trackers/omx/tizonia' > CC h264dprc.lo > In file included from h264dprc.c:45:0: > .../src/egl/drivers/dri2/egl_dri2.h:47:10: fatal error: > wayland/wayland-egl/wayland-egl-backend.h: No such file or directory > #include "wayland/wayland-egl/wayland-egl-backend.h" > > Cc: Andy Furniss <[email protected]> > Cc: Dylan Baker <[email protected]> > Signed-off-by: Emil Velikov <[email protected]> > --- > Dylan had epiphany a minute after I hit Send. Sorry about that. > > Gents this should remove the need of any the following patches. > Please you give them a try, manually reverting the meson fix. > > Thanks! > > https://patchwork.freedesktop.org/patch/208770/ > https://patchwork.freedesktop.org/patch/208306/ > https://patchwork.freedesktop.org/patch/208322/ > --- > src/egl/drivers/dri2/egl_dri2.c | 1 + > src/egl/drivers/dri2/egl_dri2.h | 12 +++++++++--- > src/egl/drivers/dri2/platform_wayland.c | 2 ++ > 3 files changed, 12 insertions(+), 3 deletions(-) > > diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c > index 864f7eb0c68..535806e4bfe 100644 > --- a/src/egl/drivers/dri2/egl_dri2.c > +++ b/src/egl/drivers/dri2/egl_dri2.c > @@ -48,6 +48,7 @@ > #include <sys/stat.h> > > #ifdef HAVE_WAYLAND_PLATFORM > +#include <wayland-client.h> > #include "wayland-drm.h" > #include "wayland-drm-client-protocol.h" > #include "linux-dmabuf-unstable-v1-client-protocol.h" > diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h > index bd637f73c9d..adabc527f85 100644 > --- a/src/egl/drivers/dri2/egl_dri2.h > +++ b/src/egl/drivers/dri2/egl_dri2.h > @@ -43,9 +43,15 @@ > #endif > > #ifdef HAVE_WAYLAND_PLATFORM > -#include <wayland-client.h> > -#include "wayland/wayland-egl/wayland-egl-backend.h" > -/* forward declarations of protocol elements */ > +/* forward declarations to avoid pulling wayland headers everywhere */ > +struct wl_egl_window; > +struct wl_event_queue; > +struct wl_callback; > +struct wl_display; > +struct wl_drm; > +struct wl_registry; > +struct wl_shm; > +struct wl_surface;
Haven't verified this list, so no r-b, but ack on the idea: Acked-by: Eric Engestrom <[email protected]> > struct zwp_linux_dmabuf_v1; > #endif > > diff --git a/src/egl/drivers/dri2/platform_wayland.c > b/src/egl/drivers/dri2/platform_wayland.c > index 877f7933b9a..94f7defa657 100644 > --- a/src/egl/drivers/dri2/platform_wayland.c > +++ b/src/egl/drivers/dri2/platform_wayland.c > @@ -49,6 +49,8 @@ > #include "wayland-drm-client-protocol.h" > #include "linux-dmabuf-unstable-v1-client-protocol.h" > > +#include "wayland/wayland-egl/wayland-egl-backend.h" > + > #ifndef DRM_FORMAT_MOD_INVALID > #define DRM_FORMAT_MOD_INVALID ((1ULL << 56) - 1) > #endif > -- > 2.16.0 > > _______________________________________________ > mesa-dev mailing list > [email protected] > https://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
