summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vulkan/Makefile.am6
-rw-r--r--src/vulkan/anv_wsi.c4
2 files changed, 9 insertions, 1 deletions
diff --git a/src/vulkan/Makefile.am b/src/vulkan/Makefile.am
index 014183c0f71..b2eb4fb1cb1 100644
--- a/src/vulkan/Makefile.am
+++ b/src/vulkan/Makefile.am
@@ -75,7 +75,6 @@ VULKAN_SOURCES = \
anv_query.c \
anv_util.c \
anv_wsi.c \
- anv_wsi_wayland.c \
anv_wsi_x11.c \
gen8_state.c \
gen8_cmd_buffer.c \
@@ -84,6 +83,11 @@ VULKAN_SOURCES = \
gen7_cmd_buffer.c \
gen7_pipeline.c
+if HAVE_EGL_PLATFORM_WAYLAND
+VULKAN_SOURCES += anv_wsi_wayland.c
+libvulkan_la_CFLAGS += -DHAVE_WAYLAND_PLATFORM
+endif
+
libvulkan_la_SOURCES = \
$(VULKAN_SOURCES) \
anv_gem.c
diff --git a/src/vulkan/anv_wsi.c b/src/vulkan/anv_wsi.c
index 3778a1b20e2..21e01fc61f2 100644
--- a/src/vulkan/anv_wsi.c
+++ b/src/vulkan/anv_wsi.c
@@ -34,11 +34,13 @@ anv_init_wsi(struct anv_instance *instance)
if (result != VK_SUCCESS)
return result;
+#ifdef HAVE_WAYLAND_PLATFORM
result = anv_wl_init_wsi(instance);
if (result != VK_SUCCESS) {
anv_x11_finish_wsi(instance);
return result;
}
+#endif
return VK_SUCCESS;
}
@@ -46,7 +48,9 @@ anv_init_wsi(struct anv_instance *instance)
void
anv_finish_wsi(struct anv_instance *instance)
{
+#ifdef HAVE_WAYLAND_PLATFORM
anv_wl_finish_wsi(instance);
+#endif
anv_x11_finish_wsi(instance);
}