Re: [Mesa-dev] [PATCH 1/7] vulkan/wsi: Generate wayland protocol headers separately from EGL
On Thu, Mar 2, 2017 at 4:15 AM, Emil Velikovwrote: > On 2 March 2017 at 05:28, Jason Ekstrand wrote: > > Previously, we were depending on EGL for generating the headers and > > providing the protocol symbols. However, since neither Vulkan driver > > actually wants to link against EGL, this is kind-of pointless. It also > > creates a weird build dependency. > > Yeah, the Vulkan dependency on egl/wayland is quite weird. This > alongside my "rename --with-egl-platforms -> --with-platforms" will > get us close to nirvana. > The final piece being wl_drm_interface always being exported... for > which I'll try to polish the wayland patches and send them upstream > ;-) > > A couple of small nitpicks below: > > > --- > > src/amd/vulkan/Makefile.am | 3 --- > > src/intel/vulkan/Makefile.am| 7 --- > > src/vulkan/.gitignore | 2 ++ > > src/vulkan/Makefile.am | 19 +++ > > src/vulkan/Makefile.sources | 4 > > src/vulkan/wsi/wsi_common_wayland.c | 2 +- > > 6 files changed, 22 insertions(+), 15 deletions(-) > > create mode 100644 src/vulkan/.gitignore > > > > > --- /dev/null > > +++ b/src/vulkan/.gitignore > > @@ -0,0 +1,2 @@ > > +wayland-drm-client-protocol.h > > +wayland-drm-protocol.c > Missing wsi/ prefix ? > already fixed locally > > diff --git a/src/vulkan/Makefile.am b/src/vulkan/Makefile.am > > index f7aca8e..81cd23d 100644 > > --- a/src/vulkan/Makefile.am > > +++ b/src/vulkan/Makefile.am > > @@ -49,17 +49,28 @@ VULKAN_LIB_DEPS += $(XCB_DRI3_LIBS) -lX11-xcb > > endif > > > > if HAVE_PLATFORM_WAYLAND > > +BUILT_SOURCES += $(VULKAN_WSI_WAYLAND_GENERATED_FILES) > Move this outside of the conditional, otherwise we'll be missing files > in some 'fun' cases. > > Which reminds me to send a related fix to configure.ac > > > + > > +WL_DRM_XML = $(top_srcdir)/src/egl/wayland/wayland-drm/wayland-drm.xml > > + > > MKDIR_GEN = $(AM_V_at)$(MKDIR_P) $(@D) > > > +wsi/wayland-drm-protocol.c : $(WL_DRM_XML) >$(MKDIR_GEN) > > > + $(AM_V_GEN)$(WAYLAND_SCANNER) code < $< > $@ > > + > > +wsi/wayland-drm-client-protocol.h : $(WL_DRM_XML) >$(MKDIR_GEN) > > > + $(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@ > > + > ... or older autotools versions will fail. > > With the above > Reviewed-by: Emil Velikov > > Thanks > Emil > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 1/7] vulkan/wsi: Generate wayland protocol headers separately from EGL
On Thu, Mar 2, 2017 at 4:15 AM, Emil Velikovwrote: > On 2 March 2017 at 05:28, Jason Ekstrand wrote: > > Previously, we were depending on EGL for generating the headers and > > providing the protocol symbols. However, since neither Vulkan driver > > actually wants to link against EGL, this is kind-of pointless. It also > > creates a weird build dependency. > > Yeah, the Vulkan dependency on egl/wayland is quite weird. This > alongside my "rename --with-egl-platforms -> --with-platforms" will > get us close to nirvana. > The final piece being wl_drm_interface always being exported... for > which I'll try to polish the wayland patches and send them upstream > ;-) > > A couple of small nitpicks below: > > > --- > > src/amd/vulkan/Makefile.am | 3 --- > > src/intel/vulkan/Makefile.am| 7 --- > > src/vulkan/.gitignore | 2 ++ > > src/vulkan/Makefile.am | 19 +++ > > src/vulkan/Makefile.sources | 4 > > src/vulkan/wsi/wsi_common_wayland.c | 2 +- > > 6 files changed, 22 insertions(+), 15 deletions(-) > > create mode 100644 src/vulkan/.gitignore > > > > > --- /dev/null > > +++ b/src/vulkan/.gitignore > > @@ -0,0 +1,2 @@ > > +wayland-drm-client-protocol.h > > +wayland-drm-protocol.c > Missing wsi/ prefix ? > > > diff --git a/src/vulkan/Makefile.am b/src/vulkan/Makefile.am > > index f7aca8e..81cd23d 100644 > > --- a/src/vulkan/Makefile.am > > +++ b/src/vulkan/Makefile.am > > @@ -49,17 +49,28 @@ VULKAN_LIB_DEPS += $(XCB_DRI3_LIBS) -lX11-xcb > > endif > > > > if HAVE_PLATFORM_WAYLAND > > +BUILT_SOURCES += $(VULKAN_WSI_WAYLAND_GENERATED_FILES) > Move this outside of the conditional, otherwise we'll be missing files > in some 'fun' cases. > Really? Care to elaborate? Won't that cause it to complain that it can't generate those files when Wayland is disabled? > Which reminds me to send a related fix to configure.ac > > > + > > +WL_DRM_XML = $(top_srcdir)/src/egl/wayland/wayland-drm/wayland-drm.xml > > + > > MKDIR_GEN = $(AM_V_at)$(MKDIR_P) $(@D) > Already exists > > +wsi/wayland-drm-protocol.c : $(WL_DRM_XML) >$(MKDIR_GEN) > > > + $(AM_V_GEN)$(WAYLAND_SCANNER) code < $< > $@ > > + > > +wsi/wayland-drm-client-protocol.h : $(WL_DRM_XML) >$(MKDIR_GEN) > I'll add those two. > > + $(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@ > > + > ... or older autotools versions will fail. > > With the above > Reviewed-by: Emil Velikov > > Thanks > Emil > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 1/7] vulkan/wsi: Generate wayland protocol headers separately from EGL
On 2 March 2017 at 05:28, Jason Ekstrandwrote: > Previously, we were depending on EGL for generating the headers and > providing the protocol symbols. However, since neither Vulkan driver > actually wants to link against EGL, this is kind-of pointless. It also > creates a weird build dependency. Yeah, the Vulkan dependency on egl/wayland is quite weird. This alongside my "rename --with-egl-platforms -> --with-platforms" will get us close to nirvana. The final piece being wl_drm_interface always being exported... for which I'll try to polish the wayland patches and send them upstream ;-) A couple of small nitpicks below: > --- > src/amd/vulkan/Makefile.am | 3 --- > src/intel/vulkan/Makefile.am| 7 --- > src/vulkan/.gitignore | 2 ++ > src/vulkan/Makefile.am | 19 +++ > src/vulkan/Makefile.sources | 4 > src/vulkan/wsi/wsi_common_wayland.c | 2 +- > 6 files changed, 22 insertions(+), 15 deletions(-) > create mode 100644 src/vulkan/.gitignore > > --- /dev/null > +++ b/src/vulkan/.gitignore > @@ -0,0 +1,2 @@ > +wayland-drm-client-protocol.h > +wayland-drm-protocol.c Missing wsi/ prefix ? > diff --git a/src/vulkan/Makefile.am b/src/vulkan/Makefile.am > index f7aca8e..81cd23d 100644 > --- a/src/vulkan/Makefile.am > +++ b/src/vulkan/Makefile.am > @@ -49,17 +49,28 @@ VULKAN_LIB_DEPS += $(XCB_DRI3_LIBS) -lX11-xcb > endif > > if HAVE_PLATFORM_WAYLAND > +BUILT_SOURCES += $(VULKAN_WSI_WAYLAND_GENERATED_FILES) Move this outside of the conditional, otherwise we'll be missing files in some 'fun' cases. Which reminds me to send a related fix to configure.ac > + > +WL_DRM_XML = $(top_srcdir)/src/egl/wayland/wayland-drm/wayland-drm.xml > + MKDIR_GEN = $(AM_V_at)$(MKDIR_P) $(@D) > +wsi/wayland-drm-protocol.c : $(WL_DRM_XML) $(MKDIR_GEN) > + $(AM_V_GEN)$(WAYLAND_SCANNER) code < $< > $@ > + > +wsi/wayland-drm-client-protocol.h : $(WL_DRM_XML) $(MKDIR_GEN) > + $(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@ > + ... or older autotools versions will fail. With the above Reviewed-by: Emil Velikov Thanks Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 1/7] vulkan/wsi: Generate wayland protocol headers separately from EGL
Previously, we were depending on EGL for generating the headers and providing the protocol symbols. However, since neither Vulkan driver actually wants to link against EGL, this is kind-of pointless. It also creates a weird build dependency. --- src/amd/vulkan/Makefile.am | 3 --- src/intel/vulkan/Makefile.am| 7 --- src/vulkan/.gitignore | 2 ++ src/vulkan/Makefile.am | 19 +++ src/vulkan/Makefile.sources | 4 src/vulkan/wsi/wsi_common_wayland.c | 2 +- 6 files changed, 22 insertions(+), 15 deletions(-) create mode 100644 src/vulkan/.gitignore diff --git a/src/amd/vulkan/Makefile.am b/src/amd/vulkan/Makefile.am index 740f2f9..806c297 100644 --- a/src/amd/vulkan/Makefile.am +++ b/src/amd/vulkan/Makefile.am @@ -75,15 +75,12 @@ endif if HAVE_PLATFORM_WAYLAND AM_CPPFLAGS += \ - -I$(top_builddir)/src/egl/wayland/wayland-drm \ - -I$(top_srcdir)/src/egl/wayland/wayland-drm \ $(WAYLAND_CFLAGS) \ -DVK_USE_PLATFORM_WAYLAND_KHR VULKAN_SOURCES += $(VULKAN_WSI_WAYLAND_FILES) VULKAN_LIB_DEPS += \ - $(top_builddir)/src/egl/wayland/wayland-drm/libwayland-drm.la \ $(WAYLAND_LIBS) endif diff --git a/src/intel/vulkan/Makefile.am b/src/intel/vulkan/Makefile.am index 47cf419..fa594c0 100644 --- a/src/intel/vulkan/Makefile.am +++ b/src/intel/vulkan/Makefile.am @@ -63,12 +63,6 @@ AM_CPPFLAGS = \ -I$(top_builddir)/src/intel \ -I$(top_srcdir)/src/intel -if HAVE_PLATFORM_WAYLAND -AM_CPPFLAGS += \ - -I$(top_builddir)/src/egl/wayland/wayland-drm \ - -I$(top_srcdir)/src/egl/wayland/wayland-drm -endif - AM_CPPFLAGS += \ $(LIBDRM_CFLAGS) \ $(INTEL_CFLAGS) \ @@ -119,7 +113,6 @@ AM_CPPFLAGS += \ VULKAN_SOURCES += $(VULKAN_WSI_WAYLAND_FILES) VULKAN_LIB_DEPS += \ - $(top_builddir)/src/egl/wayland/wayland-drm/libwayland-drm.la \ $(WAYLAND_LIBS) endif diff --git a/src/vulkan/.gitignore b/src/vulkan/.gitignore new file mode 100644 index 000..0b7b71b --- /dev/null +++ b/src/vulkan/.gitignore @@ -0,0 +1,2 @@ +wayland-drm-client-protocol.h +wayland-drm-protocol.c diff --git a/src/vulkan/Makefile.am b/src/vulkan/Makefile.am index f7aca8e..81cd23d 100644 --- a/src/vulkan/Makefile.am +++ b/src/vulkan/Makefile.am @@ -49,17 +49,28 @@ VULKAN_LIB_DEPS += $(XCB_DRI3_LIBS) -lX11-xcb endif if HAVE_PLATFORM_WAYLAND +BUILT_SOURCES += $(VULKAN_WSI_WAYLAND_GENERATED_FILES) + +WL_DRM_XML = $(top_srcdir)/src/egl/wayland/wayland-drm/wayland-drm.xml + +wsi/wayland-drm-protocol.c : $(WL_DRM_XML) + $(AM_V_GEN)$(WAYLAND_SCANNER) code < $< > $@ + +wsi/wayland-drm-client-protocol.h : $(WL_DRM_XML) + $(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@ + AM_CPPFLAGS += \ - -I$(top_builddir)/src/egl/wayland/wayland-drm \ - -I$(top_srcdir)/src/egl/wayland/wayland-drm \ $(WAYLAND_CFLAGS) \ -DVK_USE_PLATFORM_WAYLAND_KHR -VULKAN_WSI_SOURCES += $(VULKAN_WSI_WAYLAND_FILES) +VULKAN_WSI_SOURCES += \ + $(VULKAN_WSI_WAYLAND_FILES) \ + $(VULKAN_WSI_WAYLAND_GENERATED_FILES) VULKAN_LIB_DEPS += \ - $(top_builddir)/src/egl/wayland/wayland-drm/libwayland-drm.la \ $(WAYLAND_LIBS) endif +CLEANFILES = $(BUILT_SOURCES) + libvulkan_wsi_la_SOURCES = $(VULKAN_WSI_SOURCES) diff --git a/src/vulkan/Makefile.sources b/src/vulkan/Makefile.sources index 7510d72..63f4ac1 100644 --- a/src/vulkan/Makefile.sources +++ b/src/vulkan/Makefile.sources @@ -7,6 +7,10 @@ VULKAN_WSI_WAYLAND_FILES := \ wsi/wsi_common_wayland.c \ wsi/wsi_common_wayland.h +VULKAN_WSI_WAYLAND_GENERATED_FILES := \ + wsi/wayland-drm-protocol.c \ + wsi/wayland-drm-client-protocol.h + VULKAN_WSI_X11_FILES := \ wsi/wsi_common_x11.c \ wsi/wsi_common_x11.h diff --git a/src/vulkan/wsi/wsi_common_wayland.c b/src/vulkan/wsi/wsi_common_wayland.c index 67ac0b8..2e47183 100644 --- a/src/vulkan/wsi/wsi_common_wayland.c +++ b/src/vulkan/wsi/wsi_common_wayland.c @@ -22,7 +22,6 @@ */ #include -#include #include #include @@ -33,6 +32,7 @@ #include #include "wsi_common_wayland.h" +#include "wayland-drm-client-protocol.h" #include #include -- 2.5.0.400.gff86faf ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev