AC_SUBST([VA_MAJOR], $VA_MAJOR)
AC_SUBST([VA_MINOR], $VA_MINOR)
+AM_CONDITIONAL(HAVE_VULKAN_COMMON, test "x$VULKAN_DRIVERS" != "x")
+
AC_SUBST([XVMC_MAJOR], 1)
AC_SUBST([XVMC_MINOR], 0)
src/mesa/drivers/x11/Makefile
src/mesa/main/tests/Makefile
src/util/Makefile
- src/util/tests/hash_table/Makefile])
+ src/util/tests/hash_table/Makefile
+ src/vulkan/wsi/Makefile])
AC_OUTPUT
SUBDIRS += intel/tools
endif
+if HAVE_VULKAN_COMMON
+SUBDIRS += vulkan/wsi
+endif
+
## Requires the i965 compiler (part of mesa) and wayland-drm
if HAVE_INTEL_VULKAN
SUBDIRS += intel/vulkan
-I$(top_srcdir)/include \
-I$(top_builddir)/src \
-I$(top_srcdir)/src \
+ -I$(top_srcdir)/src/vulkan/wsi \
-I$(top_builddir)/src/compiler \
-I$(top_srcdir)/src/compiler \
-I$(top_builddir)/src/compiler/nir \
VULKAN_LIB_DEPS += \
libvulkan_common.la \
+ $(top_builddir)/src/vulkan/wsi/libvulkan_wsi.la \
$(top_builddir)/src/mesa/drivers/dri/i965/libi965_compiler.la \
$(top_builddir)/src/compiler/nir/libnir.la \
$(top_builddir)/src/util/libmesautil.la \
anv_query.c \
anv_util.c \
anv_wsi.c \
- wsi_common.h \
genX_pipeline_util.h \
vk_format_info.h
VULKAN_WSI_WAYLAND_FILES := \
- anv_wsi_wayland.c \
- wsi_common_wayland.c \
- wsi_common_wayland.h
+ anv_wsi_wayland.c
VULKAN_WSI_X11_FILES := \
- anv_wsi_x11.c \
- wsi_common_x11.c \
- wsi_common_x11.h
+ anv_wsi_x11.c
VULKAN_GEM_FILES := \
anv_gem.c
--- /dev/null
+
+include Makefile.sources
+
+vulkan_includedir = $(includedir)/vulkan
+
+noinst_LTLIBRARIES = libvulkan_wsi.la
+
+AM_CPPFLAGS = \
+ $(DEFINES) \
+ -I$(top_srcdir)/include \
+ -I$(top_builddir)/src \
+ -I$(top_srcdir)/src/gallium/auxiliary \
+ -I$(top_srcdir)/src/gallium/include
+
+AM_CFLAGS = \
+ $(VISIBILITY_CFLAGS)
+
+VULKAN_LIB_DEPS =
+
+VULKAN_WSI_SOURCES = \
+ $(VULKAN_WSI_FILES)
+
+if HAVE_PLATFORM_X11
+AM_CPPFLAGS += \
+ $(XCB_DRI3_CFLAGS) \
+ -DVK_USE_PLATFORM_XCB_KHR \
+ -DVK_USE_PLATFORM_XLIB_KHR
+
+VULKAN_WSI_SOURCES += $(VULKAN_WSI_X11_FILES)
+
+# FIXME: Use pkg-config for X11-xcb ldflags.
+VULKAN_LIB_DEPS += $(XCB_DRI3_LIBS) -lX11-xcb
+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_WSI_SOURCES += $(VULKAN_WSI_WAYLAND_FILES)
+
+VULKAN_LIB_DEPS += \
+ $(top_builddir)/src/egl/wayland/wayland-drm/libwayland-drm.la \
+ $(WAYLAND_LIBS)
+endif
+
+libvulkan_wsi_la_SOURCES = $(VULKAN_WSI_SOURCES)
--- /dev/null
+
+VULKAN_WSI_FILES := \
+ wsi_common.h
+
+VULKAN_WSI_WAYLAND_FILES := \
+ wsi_common_wayland.c \
+ wsi_common_wayland.h
+
+VULKAN_WSI_X11_FILES := \
+ wsi_common_x11.c \
+ wsi_common_x11.h
\ No newline at end of file
#include <wayland-client.h>
#include <wayland-drm-client-protocol.h>
+#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include "wsi_common_wayland.h"
-#include "vk_format_info.h"
+
#include <util/hash_table.h>
#include <util/u_vector.h>
#include <xcb/dri3.h>
#include <xcb/present.h>
-#include "util/hash_table.h"
+#include "util/macros.h"
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
+
+#include "util/hash_table.h"
+
#include "wsi_common.h"
#include "wsi_common_x11.h"