From f1a23a546720e4f1541404185ff8e765463e6bf6 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Tue, 31 Jan 2017 15:04:33 +0100 Subject: Basic Vulkan enablers For Android, Windows and xcb. Verified on Win10 with NVIDIA, Win10 with AMD, Android with Tegra K1, Android aarch64 with Tegra X1, and Linux aarch64 with Tegra X1 (Jetson TX1, L4T). Introduce QPA-based Vulkan library loader, core function resolver, and instance creation support. In addition to creating a new VkInstance, adopting an existing one from an external engine is supported as well. The WSI specifics are hidden in the platform plugins. Vulkan-capable windows use the new surface type VulkanSurface and are associated with a QVulkanInstance. On Windows VULKAN_SDK is picked up automatically so finding vulkan.h needs no additional manual steps once the LunarG SDK is installed. [ChangeLog][QtGui] Added support for rendering to QWindow via the Vulkan graphics API. Task-number: QTBUG-55981 Change-Id: I50fa92d313fa440e0cc73939c6d7510ca317fbc9 Reviewed-by: Qt CI Bot Reviewed-by: Oswald Buddenhagen Reviewed-by: Andy Nichols --- mkspecs/common/linux.conf | 1 + mkspecs/common/msvc-desktop.conf | 1 + mkspecs/common/windows-vulkan.conf | 5 +++++ mkspecs/win32-g++/qmake.conf | 1 + mkspecs/win32-icc/qmake.conf | 1 + 5 files changed, 9 insertions(+) create mode 100644 mkspecs/common/windows-vulkan.conf (limited to 'mkspecs') diff --git a/mkspecs/common/linux.conf b/mkspecs/common/linux.conf index 13916a5646..5e2b5b59eb 100644 --- a/mkspecs/common/linux.conf +++ b/mkspecs/common/linux.conf @@ -35,6 +35,7 @@ QMAKE_LIBS_OPENGL = -lGL QMAKE_LIBS_OPENGL_ES2 = -lGLESv2 QMAKE_LIBS_OPENVG = -lOpenVG QMAKE_LIBS_THREAD = -lpthread +QMAKE_LIBS_VULKAN = QMAKE_INCDIR_WAYLAND = QMAKE_LIBS_WAYLAND_CLIENT = -lwayland-client diff --git a/mkspecs/common/msvc-desktop.conf b/mkspecs/common/msvc-desktop.conf index 0ca27fe4ec..bd9098d7f1 100644 --- a/mkspecs/common/msvc-desktop.conf +++ b/mkspecs/common/msvc-desktop.conf @@ -106,3 +106,4 @@ VCSOLUTION_EXTENSION = .sln VCPROJ_KEYWORD = Qt4VSv1.0 include(windows-gles.conf) +include(windows-vulkan.conf) diff --git a/mkspecs/common/windows-vulkan.conf b/mkspecs/common/windows-vulkan.conf new file mode 100644 index 0000000000..c928a8f315 --- /dev/null +++ b/mkspecs/common/windows-vulkan.conf @@ -0,0 +1,5 @@ +# Pick up the VULKAN_SDK env var set by the LunarG SDK so that the Vulkan +# headers are found out-of-the-box on typical Windows setups. + +QMAKE_INCDIR_VULKAN = $(VULKAN_SDK)\\include +QMAKE_LIBS_VULKAN = diff --git a/mkspecs/win32-g++/qmake.conf b/mkspecs/win32-g++/qmake.conf index 5f98bd1d03..224c81fb4a 100644 --- a/mkspecs/win32-g++/qmake.conf +++ b/mkspecs/win32-g++/qmake.conf @@ -80,6 +80,7 @@ QMAKE_OBJCOPY = $${CROSS_COMPILE}objcopy QMAKE_NM = $${CROSS_COMPILE}nm -P include(../common/windows-gles.conf) +include(../common/windows-vulkan.conf) include(../common/gcc-base.conf) load(qt_config) diff --git a/mkspecs/win32-icc/qmake.conf b/mkspecs/win32-icc/qmake.conf index 9a86407043..171145690e 100644 --- a/mkspecs/win32-icc/qmake.conf +++ b/mkspecs/win32-icc/qmake.conf @@ -59,5 +59,6 @@ QMAKE_LIB = xilib /NOLOGO DSP_EXTENSION = .dsp include(../common/windows-gles.conf) +include(../common/windows-vulkan.conf) load(qt_config) -- cgit v1.2.3