Pulling in libwayland causes undefined symbols in applications that are
linked against vulkan alone. Ideally, we would like to dlopen a platform
support library or something like that. For now, this works and should get
crucible running again.
anv_query.c \
anv_util.c \
anv_wsi.c \
- anv_wsi_wayland.c \
anv_wsi_x11.c \
gen8_state.c \
gen8_cmd_buffer.c \
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
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;
}
void
anv_finish_wsi(struct anv_instance *instance)
{
+#ifdef HAVE_WAYLAND_PLATFORM
anv_wl_finish_wsi(instance);
+#endif
anv_x11_finish_wsi(instance);
}