<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Mar 8, 2017 at 9:49 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"><div class="HOEnZb"><div class="h5">On 8 March 2017 at 17:31, Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>> wrote:<br>
> On Wed, Mar 8, 2017 at 9:15 AM, Emil Velikov <<a href="mailto:emil.l.velikov@gmail.com">emil.l.velikov@gmail.com</a>><br>
> wrote:<br>
>><br>
>> 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>
><br>
><br>
> Is this why you replace WAYLAND_SCANNER with ":" when it doesn't exist? My<br>
> understanding of the two options (in or outside the if) are as follows:<br>
><br>
> If we put it inside the if then a reconfigure can cause it to not "make<br>
> clean" properly.<br>
><br>
> If we put it outside the if, then we have to be able to run the above two<br>
> rules without wayland-scanner<br>
><br>
> Is that a good sum-up? If so, then replacing it with ":" seems reasonable<br>
> assuming that actually works. :-)<br>
><br>
</div></div>Yes that's roughly it. Might need to double-check how reconfigure/make<br>
will behave as we toggle the wayland switch w/o make clean... then<br>
again, not sure if we should bother supporting that ?<span class="HOEnZb"><font color="#888888"><br></font></span></blockquote><div><br></div><div>I don't know that we should optimize for that case. Then again, I'm not an autotools expert. <br></div></div><br></div></div>