summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2017-03-01 19:03:17 -0800
committerEmil Velikov <emil.l.velikov@gmail.com>2017-03-13 11:16:33 +0000
commit12f348bc987991f7014996841c5e37887bcae228 (patch)
tree7f922d2d848bd0c44218751b0cd5f36b90a2b4ef /src
parent1d135e25617b2e321b7ebe5c443d3d6d191dee90 (diff)
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. v2 [Jason] - Add missing wsi/ prefix, MKDIR_GEN v3 [Emil Velikov] - include BUILT_SOURCES/generation rules outside of conditional Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Diffstat (limited to 'src')
-rw-r--r--src/amd/vulkan/Makefile.am3
-rw-r--r--src/intel/vulkan/Makefile.am7
-rw-r--r--src/vulkan/Makefile.am20
-rw-r--r--src/vulkan/Makefile.sources4
-rw-r--r--src/vulkan/wsi/.gitignore2
-rw-r--r--src/vulkan/wsi/wsi_common_wayland.c2
6 files changed, 23 insertions, 15 deletions
diff --git a/src/amd/vulkan/Makefile.am b/src/amd/vulkan/Makefile.am
index 3379a3d6a89..fbd9f5a0305 100644
--- a/src/amd/vulkan/Makefile.am
+++ b/src/amd/vulkan/Makefile.am
@@ -77,15 +77,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 3cd01e4d028..6c902b52e10 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/Makefile.am b/src/vulkan/Makefile.am
index f7aca8e9371..f8d6fae40b4 100644
--- a/src/vulkan/Makefile.am
+++ b/src/vulkan/Makefile.am
@@ -48,17 +48,29 @@ VULKAN_WSI_SOURCES += $(VULKAN_WSI_X11_FILES)
VULKAN_LIB_DEPS += $(XCB_DRI3_LIBS) -lX11-xcb
endif
+BUILT_SOURCES += $(VULKAN_WSI_WAYLAND_GENERATED_FILES)
+CLEANFILES = $(BUILT_SOURCES)
+
+WL_DRM_XML = $(top_srcdir)/src/egl/wayland/wayland-drm/wayland-drm.xml
+
+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 < $< > $@
+
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_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
diff --git a/src/vulkan/Makefile.sources b/src/vulkan/Makefile.sources
index 7510d7264ed..63f4ac11620 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/.gitignore b/src/vulkan/wsi/.gitignore
new file mode 100644
index 00000000000..0b7b71bb666
--- /dev/null
+++ b/src/vulkan/wsi/.gitignore
@@ -0,0 +1,2 @@
+wayland-drm-client-protocol.h
+wayland-drm-protocol.c
diff --git a/src/vulkan/wsi/wsi_common_wayland.c b/src/vulkan/wsi/wsi_common_wayland.c
index 67ac0b8372e..2e47183b9d2 100644
--- a/src/vulkan/wsi/wsi_common_wayland.c
+++ b/src/vulkan/wsi/wsi_common_wayland.c
@@ -22,7 +22,6 @@
*/
#include <wayland-client.h>
-#include <wayland-drm-client-protocol.h>
#include <assert.h>
#include <stdlib.h>
@@ -33,6 +32,7 @@
#include <pthread.h>
#include "wsi_common_wayland.h"
+#include "wayland-drm-client-protocol.h"
#include <util/hash_table.h>
#include <util/u_vector.h>