<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Mar 8, 2017 at 9:15 AM, Emil Velikov <span dir="ltr"><<a href="mailto:emil.l.velikov@gmail.com" target="_blank">emil.l.velikov@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Jason Ekstrand <<a href="mailto:jason.ekstrand@intel.com">jason.ekstrand@intel.com</a>><br>
<br>
Previously, we were depending on EGL for generating the headers and<br>
providing the protocol symbols. However, since neither Vulkan driver<br>
actually wants to link against EGL, this is kind of pointless. It also<br>
creates a weird build dependency.<br>
<br>
v2 [Jason]<br>
- Add missing wsi/ prefix, MKDIR_GEN<br>
<br>
v3 [Emil Velikov]<br>
- include BUILT_SOURCES/generation rules outside of conditional<br>
<br>
Reviewed-by: Emil Velikov <<a href="mailto:emil.velikov@collabora.com">emil.velikov@collabora.com</a>><br>
---<br>
src/amd/vulkan/Makefile.am | 3 ---<br>
src/intel/vulkan/Makefile.am | 7 -------<br>
src/vulkan/Makefile.am | 20 ++++++++++++++++----<br>
src/vulkan/Makefile.sources | 4 ++++<br>
src/vulkan/wsi/.gitignore | 2 ++<br>
src/vulkan/wsi/wsi_common_<wbr>wayland.c | 2 +-<br>
6 files changed, 23 insertions(+), 15 deletions(-)<br>
create mode 100644 src/vulkan/wsi/.gitignore<br>
<br>
diff --git a/src/amd/vulkan/Makefile.am b/src/amd/vulkan/Makefile.am<br>
index 3379a3d6a8..fbd9f5a030 100644<br>
--- a/src/amd/vulkan/Makefile.am<br>
+++ b/src/amd/vulkan/Makefile.am<br>
@@ -77,15 +77,12 @@ endif<br>
<br>
if HAVE_PLATFORM_WAYLAND<br>
AM_CPPFLAGS += \<br>
- -I$(top_builddir)/src/egl/<wbr>wayland/wayland-drm \<br>
- -I$(top_srcdir)/src/egl/<wbr>wayland/wayland-drm \<br>
$(WAYLAND_CFLAGS) \<br>
-DVK_USE_PLATFORM_WAYLAND_KHR<br>
<br>
VULKAN_SOURCES += $(VULKAN_WSI_WAYLAND_FILES)<br>
<br>
VULKAN_LIB_DEPS += \<br>
- $(top_builddir)/src/egl/<wbr>wayland/wayland-drm/<a href="http://libwayland-drm.la" rel="noreferrer" target="_blank">libwayland<wbr>-drm.la</a> \<br>
$(WAYLAND_LIBS)<br>
endif<br>
<br>
diff --git a/src/intel/vulkan/Makefile.am b/src/intel/vulkan/Makefile.am<br>
index 3cd01e4d02..6c902b52e1 100644<br>
--- a/src/intel/vulkan/Makefile.am<br>
+++ b/src/intel/vulkan/Makefile.am<br>
@@ -63,12 +63,6 @@ AM_CPPFLAGS = \<br>
-I$(top_builddir)/src/intel \<br>
-I$(top_srcdir)/src/intel<br>
<br>
-if HAVE_PLATFORM_WAYLAND<br>
-AM_CPPFLAGS += \<br>
- -I$(top_builddir)/src/egl/<wbr>wayland/wayland-drm \<br>
- -I$(top_srcdir)/src/egl/<wbr>wayland/wayland-drm<br>
-endif<br>
-<br>
AM_CPPFLAGS += \<br>
$(LIBDRM_CFLAGS) \<br>
$(INTEL_CFLAGS) \<br>
@@ -119,7 +113,6 @@ AM_CPPFLAGS += \<br>
VULKAN_SOURCES += $(VULKAN_WSI_WAYLAND_FILES)<br>
<br>
VULKAN_LIB_DEPS += \<br>
- $(top_builddir)/src/egl/<wbr>wayland/wayland-drm/<a href="http://libwayland-drm.la" rel="noreferrer" target="_blank">libwayland<wbr>-drm.la</a> \<br>
$(WAYLAND_LIBS)<br>
endif<br>
<br>
diff --git a/src/vulkan/Makefile.am b/src/vulkan/Makefile.am<br>
index f7aca8e937..f8d6fae40b 100644<br>
--- a/src/vulkan/Makefile.am<br>
+++ b/src/vulkan/Makefile.am<br>
@@ -48,17 +48,29 @@ VULKAN_WSI_SOURCES += $(VULKAN_WSI_X11_FILES)<br>
VULKAN_LIB_DEPS += $(XCB_DRI3_LIBS) -lX11-xcb<br>
endif<br>
<br>
+BUILT_SOURCES += $(VULKAN_WSI_WAYLAND_<wbr>GENERATED_FILES)<br>
+CLEANFILES = $(BUILT_SOURCES)<br>
+<br>
+WL_DRM_XML = $(top_srcdir)/src/egl/wayland/<wbr>wayland-drm/wayland-drm.xml<br>
+<br>
+wsi/wayland-drm-protocol.c : $(WL_DRM_XML)<br>
+ $(MKDIR_GEN)<br>
+ $(AM_V_GEN)$(WAYLAND_SCANNER) code < $< > $@<br>
+<br>
+wsi/wayland-drm-client-<wbr>protocol.h : $(WL_DRM_XML)<br>
+ $(MKDIR_GEN)<br>
+ $(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@<br></blockquote><div><br></div><div>Is this why you replace WAYLAND_SCANNER with ":" when it doesn't exist? My understanding of the two options (in or outside the if) are as follows:<br><br></div><div>If we put it inside the if then a reconfigure can cause it to not "make clean" properly.<br><br></div><div>If we put it outside the if, then we have to be able to run the above two rules without wayland-scanner<br><br></div><div>Is that a good sum-up? If so, then replacing it with ":" seems reasonable assuming that actually works. :-)<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+<br>
if HAVE_PLATFORM_WAYLAND<br>
AM_CPPFLAGS += \<br>
- -I$(top_builddir)/src/egl/<wbr>wayland/wayland-drm \<br>
- -I$(top_srcdir)/src/egl/<wbr>wayland/wayland-drm \<br>
$(WAYLAND_CFLAGS) \<br>
-DVK_USE_PLATFORM_WAYLAND_KHR<br>
<br>
-VULKAN_WSI_SOURCES += $(VULKAN_WSI_WAYLAND_FILES)<br>
+VULKAN_WSI_SOURCES += \<br>
+ $(VULKAN_WSI_WAYLAND_FILES) \<br>
+ $(VULKAN_WSI_WAYLAND_<wbr>GENERATED_FILES)<br>
<br>
VULKAN_LIB_DEPS += \<br>
- $(top_builddir)/src/egl/<wbr>wayland/wayland-drm/<a href="http://libwayland-drm.la" rel="noreferrer" target="_blank">libwayland<wbr>-drm.la</a> \<br>
$(WAYLAND_LIBS)<br>
endif<br>
<br>
diff --git a/src/vulkan/Makefile.sources b/src/vulkan/Makefile.sources<br>
index 7510d7264e..63f4ac1162 100644<br>
--- a/src/vulkan/Makefile.sources<br>
+++ b/src/vulkan/Makefile.sources<br>
@@ -7,6 +7,10 @@ VULKAN_WSI_WAYLAND_FILES := \<br>
wsi/wsi_common_wayland.c \<br>
wsi/wsi_common_wayland.h<br>
<br>
+VULKAN_WSI_WAYLAND_GENERATED_<wbr>FILES := \<br>
+ wsi/wayland-drm-protocol.c \<br>
+ wsi/wayland-drm-client-<wbr>protocol.h<br>
+<br>
VULKAN_WSI_X11_FILES := \<br>
wsi/wsi_common_x11.c \<br>
wsi/wsi_common_x11.h<br>
diff --git a/src/vulkan/wsi/.gitignore b/src/vulkan/wsi/.gitignore<br>
new file mode 100644<br>
index 0000000000..0b7b71bb66<br>
--- /dev/null<br>
+++ b/src/vulkan/wsi/.gitignore<br>
@@ -0,0 +1,2 @@<br>
+wayland-drm-client-protocol.h<br>
+wayland-drm-protocol.c<br>
diff --git a/src/vulkan/wsi/wsi_common_<wbr>wayland.c b/src/vulkan/wsi/wsi_common_<wbr>wayland.c<br>
index 67ac0b8372..2e47183b9d 100644<br>
--- a/src/vulkan/wsi/wsi_common_<wbr>wayland.c<br>
+++ b/src/vulkan/wsi/wsi_common_<wbr>wayland.c<br>
@@ -22,7 +22,6 @@<br>
*/<br>
<br>
#include <wayland-client.h><br>
-#include <wayland-drm-client-protocol.<wbr>h><br>
<br>
#include <assert.h><br>
#include <stdlib.h><br>
@@ -33,6 +32,7 @@<br>
#include <pthread.h><br>
<br>
#include "wsi_common_wayland.h"<br>
+#include "wayland-drm-client-protocol.<wbr>h"<br>
<br>
#include <util/hash_table.h><br>
#include <util/u_vector.h><br>
<span class="HOEnZb"><font color="#888888">--<br>
2.11.1<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div></div>