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 --- src/gui/vulkan/qplatformvulkaninstance.cpp | 88 + src/gui/vulkan/qplatformvulkaninstance.h | 91 + src/gui/vulkan/qvulkanfunctions.cpp | 177 + src/gui/vulkan/qvulkaninstance.cpp | 836 +++++ src/gui/vulkan/qvulkaninstance.h | 163 + src/gui/vulkan/vk.xml | 5269 ++++++++++++++++++++++++++++ src/gui/vulkan/vulkan.pri | 47 + 7 files changed, 6671 insertions(+) create mode 100644 src/gui/vulkan/qplatformvulkaninstance.cpp create mode 100644 src/gui/vulkan/qplatformvulkaninstance.h create mode 100644 src/gui/vulkan/qvulkanfunctions.cpp create mode 100644 src/gui/vulkan/qvulkaninstance.cpp create mode 100644 src/gui/vulkan/qvulkaninstance.h create mode 100644 src/gui/vulkan/vk.xml create mode 100644 src/gui/vulkan/vulkan.pri (limited to 'src/gui/vulkan') diff --git a/src/gui/vulkan/qplatformvulkaninstance.cpp b/src/gui/vulkan/qplatformvulkaninstance.cpp new file mode 100644 index 0000000000..6201d3ec11 --- /dev/null +++ b/src/gui/vulkan/qplatformvulkaninstance.cpp @@ -0,0 +1,88 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qplatformvulkaninstance.h" + +QT_BEGIN_NAMESPACE + +/*! + \class QPlatformVulkanInstance + \since 5.10 + \internal + \preliminary + \ingroup qpa + + \brief The QPlatformVulkanInstance class provides an abstraction for Vulkan instances. + + The platform Vulkan instance is responsible for loading a Vulkan library, + resolving the basic entry points for creating instances, providing support + for creating new or adopting existing VkInstances, and abstracting some + WSI-specifics like checking if a given queue family can be used to present + using a given window. + + \note platform plugins will typically subclass not this class, but rather + QBasicVulkanPlatformInstance. + + \note Vulkan instance creation is split into two phases: a new + QPlatformVulkanInstance is expected to load the Vulkan library and do basic + initialization, after which the supported layers and extensions can be + queried. Everything else is deferred into createOrAdoptInstance(). +*/ + +class QPlatformVulkanInstancePrivate +{ +public: + QPlatformVulkanInstancePrivate() { } +}; + +QPlatformVulkanInstance::QPlatformVulkanInstance() + : d_ptr(new QPlatformVulkanInstancePrivate) +{ +} + +QPlatformVulkanInstance::~QPlatformVulkanInstance() +{ +} + +void QPlatformVulkanInstance::presentQueued(QWindow *window) +{ + Q_UNUSED(window); +} + +QT_END_NAMESPACE diff --git a/src/gui/vulkan/qplatformvulkaninstance.h b/src/gui/vulkan/qplatformvulkaninstance.h new file mode 100644 index 0000000000..5513d1767d --- /dev/null +++ b/src/gui/vulkan/qplatformvulkaninstance.h @@ -0,0 +1,91 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QPLATFORMVULKANINSTANCE_H +#define QPLATFORMVULKANINSTANCE_H + +// +// W A R N I N G +// ------------- +// +// This file is part of the QPA API and is not meant to be used +// in applications. Usage of this API may make your code +// source and binary incompatible with future versions of Qt. +// + +#include + +#if QT_CONFIG(vulkan) + +#include + +QT_BEGIN_NAMESPACE + +class QPlatformVulkanInstancePrivate; + +class Q_GUI_EXPORT QPlatformVulkanInstance +{ + Q_DECLARE_PRIVATE(QPlatformVulkanInstance) + +public: + QPlatformVulkanInstance(); + virtual ~QPlatformVulkanInstance(); + + virtual QVulkanInfoVector supportedLayers() const = 0; + virtual QVulkanInfoVector supportedExtensions() const = 0; + virtual void createOrAdoptInstance() = 0; + virtual bool isValid() const = 0; + virtual VkResult errorCode() const = 0; + virtual VkInstance vkInstance() const = 0; + virtual QByteArrayList enabledLayers() const = 0; + virtual QByteArrayList enabledExtensions() const = 0; + virtual PFN_vkVoidFunction getInstanceProcAddr(const char *name) = 0; + virtual bool supportsPresent(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, QWindow *window) = 0; + virtual void presentQueued(QWindow *window); + +private: + QScopedPointer d_ptr; + Q_DISABLE_COPY(QPlatformVulkanInstance) +}; + +QT_END_NAMESPACE + +#endif // QT_CONFIG(vulkan) + +#endif // QPLATFORMVULKANINSTANCE_H diff --git a/src/gui/vulkan/qvulkanfunctions.cpp b/src/gui/vulkan/qvulkanfunctions.cpp new file mode 100644 index 0000000000..c342535780 --- /dev/null +++ b/src/gui/vulkan/qvulkanfunctions.cpp @@ -0,0 +1,177 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qvulkanfunctions_p.h" + +QT_BEGIN_NAMESPACE + +/*! + \class QVulkanFunctions + \since 5.10 + \ingroup painting-3D + \inmodule QtGui + \wrapper + + \brief The QVulkanFunctions class provides cross-platform access to the + instance level core Vulkan 1.0 API. + + Qt and Qt applications do not link to any Vulkan libraries by default. + Instead, all functions are resolved dynamically at run time. Each + QVulkanInstance provides a QVulkanFunctions object retrievable via + QVulkanInstance::functions(). This does not contain device level functions + in order to avoid the potential overhead of an internal dispatching. + Instead, functions that rely on a device, or a dispatchable child object of + a device, are exposed via QVulkanDeviceFunctions and + QVulkanInstance::deviceFunctions(). QVulkanFunctions and + QVulkanDeviceFunctions together provides access to the full core Vulkan + API, excluding any extensions. + + \note QVulkanFunctions instances cannot be constructed directly. + + The typical usage is the following: + + \code + void Window::render() + { + QVulkanInstance *inst = vulkanInstance(); + QVulkanFunctions *f = inst->functions(); + ... + VkResult err = f->vkAllocateCommandBuffers(device, &cmdBufInfo, &cmdBuf); + ... + } + \endcode + + \note Windowing system interface (WSI) specifics and extensions are + excluded. This class only covers core Vulkan commands, with the exception + of instance creation, destruction, and function resolving, since such + functionality is covered by QVulkanInstance itself. + + To access additional functions, applications can use + QVulkanInstance::getInstanceProcAddr() and vkGetDeviceProcAddr(). + Applications can also decide to link to a Vulkan library directly, as + platforms with an appropriate loader will typically export function symbols + for the core commands. See + \l{https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetInstanceProcAddr.html}{the + man page for vkGetInstanceProcAddr} for more information. + + \sa QVulkanInstance, QVulkanDeviceFunctions, QWindow::setVulkanInstance(), QWindow::setSurfaceType() +*/ + +/*! + \class QVulkanDeviceFunctions + \since 5.10 + \ingroup painting-3D + \inmodule QtGui + \wrapper + + \brief The QVulkanDeviceFunctions class provides cross-platform access to + the device level core Vulkan 1.0 API. + + Qt and Qt applications do not link to any Vulkan libraries by default. + Instead, all functions are resolved dynamically at run time. Each + QVulkanInstance provides a QVulkanFunctions object retrievable via + QVulkanInstance::functions(). This does not contain device level functions + in order to avoid the potential overhead of an internal dispatching. + Instead, functions that rely on a device, or a dispatchable child object of + a device, are exposed via QVulkanDeviceFunctions and + QVulkanInstance::deviceFunctions(). QVulkanFunctions and + QVulkanDeviceFunctions together provides access to the full core Vulkan + API, excluding any extensions. + + \note QVulkanDeviceFunctions instances cannot be constructed directly. + + The typical usage is the following: + + \code + void Window::render() + { + QVulkanInstance *inst = vulkanInstance(); + QVulkanDeviceFunctions *df = inst->deviceFunctions(device); + VkResult err = df->vkAllocateCommandBuffers(device, &cmdBufInfo, &cmdBuf); + ... + } + \endcode + + The QVulkanDeviceFunctions object specific to the provided VkDevice is + created when QVulkanInstance::deviceFunctions() is first called with the + device in question. The object is then cached internally. + + To access additional functions, applications can use + QVulkanInstance::getInstanceProcAddr() and vkGetDeviceProcAddr(). + Applications can also decide to link to a Vulkan library directly, as many + implementations export function symbols for the core commands. See + \l{https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetInstanceProcAddr.html}{the + man page for vkGetInstanceProcAddr} for more information. + + \sa QVulkanInstance, QVulkanFunctions, QWindow::setVulkanInstance(), QWindow::setSurfaceType() +*/ + +/* + Constructs a new QVulkanFunctions for \a inst. + \internal + */ +QVulkanFunctions::QVulkanFunctions(QVulkanInstance *inst) + : d_ptr(new QVulkanFunctionsPrivate(inst)) +{ +} + +/* + Destructor. + */ +QVulkanFunctions::~QVulkanFunctions() +{ +} + +/* + Constructs a new QVulkanDeviceFunctions for \a inst and the given \a device. + \internal + */ +QVulkanDeviceFunctions::QVulkanDeviceFunctions(QVulkanInstance *inst, VkDevice device) + : d_ptr(new QVulkanDeviceFunctionsPrivate(inst, device)) +{ +} + +/* + Destructor. + */ +QVulkanDeviceFunctions::~QVulkanDeviceFunctions() +{ +} + +QT_END_NAMESPACE diff --git a/src/gui/vulkan/qvulkaninstance.cpp b/src/gui/vulkan/qvulkaninstance.cpp new file mode 100644 index 0000000000..c58b9fe916 --- /dev/null +++ b/src/gui/vulkan/qvulkaninstance.cpp @@ -0,0 +1,836 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qvulkaninstance.h" +#include "qvulkanfunctions_p.h" +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +/*! + \class QVulkanInstance + \since 5.10 + \inmodule QtGui + + \brief The QVulkanInstance class represents a native Vulkan instance, enabling + Vulkan rendering onto a QSurface. + + \l{https://www.khronos.org/vulkan/}{Vulkan} is a cross-platform, explicit + graphics and compute API. This class provides support for loading a Vulkan + library and creating an \c instance in a cross-platform manner. For an + introduction on Vulkan instances, refer + \l{https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#initialization-instances}{to + section 3.2 of the specification}. + + \note Platform-specific support for Vulkan instances and windows with + Vulkan-capable surfaces is provided by the various platform plugins. Not + all of them will support Vulkan, however. When running on such a platform, + create() will fail and always return \c false. + + \note Vulkan support may get automatically disabled for a given Qt build due + to not having the necessary Vulkan headers available at build time. When + this is the case, and the output of \c configure indicates Vulkan support is + disabled, the QVulkan* classes will be unavailable. + + \note Some functions changed their signature between the various Vulkan + header revisions. When building Qt and only headers with the old, + conflicting signatures are present in a system, Vulkan support will get + disabled. It is recommended to use headers from Vulkan 1.0.39 or newer. + + \section1 Initialization + + Similarly to QOpenGLContext, any actual Vulkan instance creation happens + only when calling create(). This allows using QVulkanInstance as a plain + member variable while retaining control over when to perform + initialization. + + Querying the supported instance-level layers and extensions is possible by + calling supportedLayers() and supportedExtensions(). These ensure the + Vulkan library is loaded, and can therefore be called safely before + create() as well. + + Instances store per-application Vulkan state and creating a \c VkInstance + object initializes the Vulkan library. In practice there will typically be + a single instance constructed early on in main(). The object then stays + alive until exiting the application. + + Every Vulkan-based QWindow must be associated with a QVulkanInstance by + calling QWindow::setVulkanInstance(). Thus a typical application pattern is + the following: + + \code + int main(int argc, char **argv) + { + QGuiApplication app(argc, argv); + + QVulkanInstance inst; + if (!inst.create()) + return 1; + + ... + window->setVulkanInstance(&inst); + window->show(); + + return app.exec(); + } + \endcode + + \section1 Configuration + + QVulkanInstance automatically enables the minimum set of extensions it + needs on the newly created instance. In practice this means the + \c{VK_KHR_*_surface} family of extensions. + + By default Vulkan debug output, for example messages from the validation + layers, is routed to qDebug(). This can be disabled by passing the flag + \c NoDebugOutputRedirect to setFlags() before invoking create(). + + To enable additional layers and extensions, provide the list via + setLayers() and setExtensions() before invoking create(). When a + given layer or extension is not reported as available from the instance, + the request is ignored. After a successful call to create(), the values + returned from functions like layers() and extensions() reflect the actual + enabled layers and extensions. When necessary, for example to avoid + requesting extensions that conflict and thus would fail the Vulkan instance + creation, the list of actually supported layers and extensions can be + examined via supportedLayers() and supportedExtensions() before calling + create(). + + For example, to enable the standard validation layers, one could do the + following: + + \code + QVulkanInstance inst; + + // Enable validation layer, if supported. Messages go to qDebug by default. + inst.setLayers(QByteArrayList() << "VK_LAYER_LUNARG_standard_validation"); + + bool ok = inst.create(); + if (!ok) + ... // Vulkan not available + if (!inst.layers().contains("VK_LAYER_LUNARG_standard_validation")) + ... // validation layer not available + \endcode + + Or, alternatively, to make decisions before attempting to create a Vulkan + instance: + + \code + QVulkanInstance inst; + + if (inst.supportedLayers().contains("VK_LAYER_LUNARG_standard_validation")) + ... + + bool ok = inst.create(); + ... + \endcode + + \section1 Adopting an Existing Instance + + By default QVulkanInstance creates a new Vulkan instance. When working with + external engines and renderers, this may sometimes not be desirable. When + there is a \c VkInstance handle already available, call setVkInstance() + before invoking create(). This way no additional instances will get + created, and QVulkanInstance will not own the handle. + + \note It is up to the component creating the external instance to ensure + the necessary extensions are enabled on it. These are: \c{VK_KHR_surface}, + the WSI-specific \c{VK_KHR_*_surface} that is appropriate for the platform + in question, and \c{VK_EXT_debug_report} in case QVulkanInstance's debug + output redirection is desired. + + \section1 Accessing Core Vulkan Commands + + To access the \c VkInstance handle the QVulkanInstance wraps, call + vkInstance(). To resolve Vulkan functions, call getInstanceProcAddr(). For + core Vulkan commands manual resolving is not necessary as they are provided + via the QVulkanFunctions object accessible by calling functions(). + + \section1 Getting a Native Vulkan Surface for a Window + + The two common windowing system specific operations are getting a surface + (a \c{VkSurfaceKHR} handle) for a window, and querying if a given queue + family supports presenting to a given surface. To avoid WSI-specific bits + in the applications, these are abstracted by QVulkanInstance and the + underlying QPA layers. + + To create a Vulkan surface for a window, or retrieve an existing one, + call surfaceForWindow(). Most platforms will only create the surface via + \c{VK_KHR_*_surface} when first calling surfaceForWindow(), but there may be + platform-specific variations in the internal behavior. Once created, + subsequent calls to surfaceForWindow() just return the same handle. This + fits the structure of typical Vulkan-enabled QWindow subclasses well. + + To query if a given queue family within a physical device can be used to + perform presentation to a given surface, call supportsPresent(). This + encapsulates both the generic \c vkGetPhysicalDeviceSurfaceSupportKHR and + the WSI-specific \c{vkGetPhysicalDevice*PresentationSupportKHR} checks. + + \section1 Troubleshooting + + Besides returning \c false from create() or \c 0 from surfaceForWindow(), + critical errors will also get printed to the debug output via qWarning(). + Additional logging can be requested by enabling debug output for the + logging category \c{qt.vulkan}. The actual Vulkan error code from instance + creation can be retrieved by calling errorCode() after a failing create(). + + In some special cases it may be necessary to override the Vulkan + library name. This can be achieved by setting the \c{QT_VULKAN_LIB} + environment variable. + + \section1 Example + + The following is the basic outline of creating a Vulkan-capable QWindow: + + \code + class VulkanWindow : public QWindow + { + public: + VulkanWindow() { + setSurfaceType(VulkanSurface); + } + + void exposeEvent(QExposeEvent *) { + if (isExposed()) { + if (!m_initialized) { + m_initialized = true; + // initialize device, swapchain, etc. + QVulkanInstance *inst = vulkanInstance(); + QVulkanFunctions *f = inst->functions(); + uint32_t devCount = 0; + f->vkEnumeratePhysicalDevices(inst->vkInstance(), &devCount, nullptr); + ... + // build the first frame + render(); + } + } + } + + bool event(QEvent *e) { + if (e->type == QEvent::UpdateRequest) + render(); + return QWindow::event(e); + } + + void render() { + ... + requestUpdate(); // render continuously + } + + private: + bool m_initialized = false; + }; + + int main(int argc, char **argv) + { + QGuiApplication app(argc, argv); + + QVulkanInstance inst; + if (!inst.create()) { + qWarning("Vulkan not available"); + return 1; + } + + VulkanWindow window; + window.showMaximized(); + + return app.exec(); + + } + \endcode + + \note In addition to expose, a well-behaving window implementation will + also have to take care of additional events like resize and + QPlatformSurfaceEvent in order to ensure proper management of the + swap chain. Additionally, some platforms may require releasing resources + when not being exposed anymore. + + \section1 Using C++ Bindings for Vulkan + + Combining Qt's Vulkan enablers with a C++ Vulkan wrapper, for example + \l{https://github.com/KhronosGroup/Vulkan-Hpp}{Vulkan-Hpp}, is possible as + well. The pre-requisite here is that the C++ layer must be able to adopt + native handles (VkInstance, VkSurfaceKHR) in its classes without taking + ownership (since the ownership stays with QVulkanInstance and QWindow). + Consider also the following: + + \list + + \li Some wrappers require exception support to be enabled. Qt does not use + exceptions. To enable exceptions for the application, add \c{CONFIG += exceptions} + to the \c{.pro} file. + + \li Some wrappers call Vulkan functions directly, assuming \c{vulkan.h} + provides prototypes and the application links to a Vulkan library exporting + all necessary symbols. Qt may not directly link to a Vulkan library. + Therefore, on some platforms it may be necessary to add + \c{LIBS += -lvulkan} or similar in the application's \c{.pro} file. + + \li The headers for the QVulkan classes may include \c{vulkan.h} with + \c{VK_NO_PROTOTYPES} enabled. This can cause issues in C++ wrapper headers + that rely on the prototypes. Hence in application code it may be + necessary to include \c{vulkan.hpp} or similar before any of the QVulkan + headers. + + \endlist + + \sa QVulkanFunctions, QSurface::SurfaceType +*/ + +/*! + \enum QVulkanInstance::Flag + \since 5.10 + + This enum describes the flags that can be passed to setFlags(). These control + the behavior of create(). + + \value NoDebugOutputRedirect Disables Vulkan debug output (\c{VK_EXT_debug_report}) redirection to qDebug. +*/ + +class QVulkanInstancePrivate +{ +public: + QVulkanInstancePrivate(QVulkanInstance *q) + : q_ptr(q), + vkInst(VK_NULL_HANDLE), + flags(0), + errorCode(VK_SUCCESS) + { } + ~QVulkanInstancePrivate() { reset(); } + + bool ensureVulkan(); + void reset(); + + QVulkanInstance *q_ptr; + QScopedPointer platformInst; + VkInstance vkInst; + QVulkanInstance::Flags flags; + QByteArrayList layers; + QByteArrayList extensions; + QVersionNumber apiVersion; + VkResult errorCode; + QScopedPointer funcs; + QHash deviceFuncs; +}; + +bool QVulkanInstancePrivate::ensureVulkan() +{ + if (!platformInst) { + platformInst.reset(QGuiApplicationPrivate::platformIntegration()->createPlatformVulkanInstance(q_ptr)); + if (!platformInst) { + qWarning("QVulkanInstance: Failed to initialize Vulkan"); + return false; + } + } + return true; +} + +void QVulkanInstancePrivate::reset() +{ + qDeleteAll(deviceFuncs); + deviceFuncs.clear(); + funcs.reset(); + platformInst.reset(); + vkInst = VK_NULL_HANDLE; + errorCode = VK_SUCCESS; +} + +/*! + Constructs a new instance. + + \note No Vulkan initialization is performed in the constructor. + */ +QVulkanInstance::QVulkanInstance() + : d_ptr(new QVulkanInstancePrivate(this)) +{ +} + +/*! + Destructor. + + \note current() will return \c nullptr once the instance is destroyed. + */ +QVulkanInstance::~QVulkanInstance() +{ + destroy(); +} + +/*! + \struct QVulkanLayer + \brief Represents information about a Vulkan layer. + */ + +/*! + \value QVulkanLayer::name + \brief The name of the layer. + */ + +/*! + \value QVulkanLayer::version + \brief The version of the layer. This is an integer, increasing with each backward + compatible change. + */ + +/*! + \value QVulkanLayer::specVersion + \brief The Vulkan version the layer was written against. + */ + +/*! + \value QVulkanLayer::description + \brief The description of the layer. + */ + +/*! + \struct QVulkanExtension + \brief Represents information about a Vulkan extension. + */ + +/*! + \value QVulkanExtension::name + \brief The name of the extension. + */ + +/*! + \value QVulkanExtension::version + \brief The version of the extension. This is an integer, increasing with each backward + compatible change. + */ + +/*! + \class QVulkanInfoVector + \brief A specialized QVector for QVulkanLayer and QVulkanExtension. + */ + +/*! + \fn bool QVulkanInfoVector::contains(const QByteArray &name) const + + \return true if the vector contains a layer or extension with the given \a name. + */ + +/*! + \fn bool QVulkanInfoVector::contains(const QByteArray &name, int minVersion) const + + \return true if the vector contains a layer or extension with the given + \a name and a version same as or newer than \a minVersion. + */ + +/*! + \return the list of supported instance-level layers. + + \note This function can be called before create(). + */ +QVulkanInfoVector QVulkanInstance::supportedLayers() +{ + return d_ptr->ensureVulkan() ? d_ptr->platformInst->supportedLayers() : QVulkanInfoVector(); +} + +/*! + \return the list of supported instance-level extensions. + + \note This function can be called before create(). + */ +QVulkanInfoVector QVulkanInstance::supportedExtensions() +{ + return d_ptr->ensureVulkan() ? d_ptr->platformInst->supportedExtensions() : QVulkanInfoVector(); +} + +/*! + Makes QVulkanInstance adopt an existing VkInstance handle instead of + creating a new one. + + \note \a existingVkInstance must have at least \c{VK_KHR_surface} and the + appropriate WSI-specific \c{VK_KHR_*_surface} extensions enabled. To ensure + debug output redirection is functional, \c{VK_EXT_debug_report} is needed as + well. + + \note This function can only be called before create() and has no effect if + called afterwards. + */ +void QVulkanInstance::setVkInstance(VkInstance existingVkInstance) +{ + if (isValid()) { + qWarning("QVulkanInstance already created; setVkInstance() has no effect"); + return; + } + + d_ptr->vkInst = existingVkInstance; +} + +/*! + Configures the behavior of create() based on the provided \a flags. + + \note This function can only be called before create() and has no effect if + called afterwards. + */ +void QVulkanInstance::setFlags(Flags flags) +{ + if (isValid()) { + qWarning("QVulkanInstance already created; setFlags() has no effect"); + return; + } + + d_ptr->flags = flags; +} + +/*! + Specifies the list of instance \a layers to enable. It is safe to specify + unsupported layers as well because these get ignored when not supported at + run time. + + \note This function can only be called before create() and has no effect if + called afterwards. + */ +void QVulkanInstance::setLayers(const QByteArrayList &layers) +{ + if (isValid()) { + qWarning("QVulkanInstance already created; setLayers() has no effect"); + return; + } + + d_ptr->layers = layers; +} + +/*! + Specifies the list of additional instance \a extensions to enable. It is + safe to specify unsupported extensions as well because these get ignored + when not supported at run time. The surface-related extensions required by + Qt will always be added automatically, no need to include them in this + list. + + \note This function can only be called before create() and has no effect if + called afterwards. + */ +void QVulkanInstance::setExtensions(const QByteArrayList &extensions) +{ + if (isValid()) { + qWarning("QVulkanInstance already created; setExtensions() has no effect"); + return; + } + + d_ptr->extensions = extensions; +} + +/*! + Specifies the Vulkan API against which the application expects to run. + + By default no \a vulkanVersion is specified, and so no version check is performed + during Vulkan instance creation. + + \note This function can only be called before create() and has no effect if + called afterwards. + */ +void QVulkanInstance::setApiVersion(const QVersionNumber &vulkanVersion) +{ + if (isValid()) { + qWarning("QVulkanInstance already created; setApiVersion() has no effect"); + return; + } + + d_ptr->apiVersion = vulkanVersion; +} + +/*! + Initializes the Vulkan library and creates a new or adopts and existing + Vulkan instance. + + \return true if successful, false on error or when Vulkan is not supported. + + When successful, the pointer to this QVulkanInstance is retrievable via the + static function current(). + + The Vulkan instance and library is available as long as this + QVulkanInstance exists, or until destroy() is called. + */ +bool QVulkanInstance::create() +{ + if (isValid()) + destroy(); + + if (!d_ptr->ensureVulkan()) + return false; + + d_ptr->platformInst->createOrAdoptInstance(); + + if (d_ptr->platformInst->isValid()) { + d_ptr->vkInst = d_ptr->platformInst->vkInstance(); + d_ptr->layers = d_ptr->platformInst->enabledLayers(); + d_ptr->extensions = d_ptr->platformInst->enabledExtensions(); + d_ptr->errorCode = VK_SUCCESS; + d_ptr->funcs.reset(new QVulkanFunctions(this)); + return true; + } + + qWarning("Failed to create platform Vulkan instance"); + if (d_ptr->platformInst) { + d_ptr->errorCode = d_ptr->platformInst->errorCode(); + d_ptr->platformInst.reset(); + } else { + d_ptr->errorCode = VK_NOT_READY; + } + return false; +} + +/*! + Destroys the underlying platform instance, thus destroying the VkInstance + (when owned). The QVulkanInstance object is still reusable by calling + create() again. + */ +void QVulkanInstance::destroy() +{ + d_ptr->reset(); +} + +/*! + \return true if create() was successful and the instance is valid. + */ +bool QVulkanInstance::isValid() const +{ + return d_ptr->platformInst && d_ptr->platformInst->isValid(); +} + +/*! + \return the Vulkan error code after an unsuccessful create(), \c VK_SUCCESS otherwise. + + The value is typically the return value from vkCreateInstance() (when + creating a new Vulkan instance instead of adopting an existing one), but + may also be \c VK_NOT_READY if the platform plugin does not support Vulkan. + */ +VkResult QVulkanInstance::errorCode() const +{ + return d_ptr->errorCode; +} + +/*! + \return the VkInstance handle this QVulkanInstance wraps, or \c null if + create() has not yet been successfully called and no existing instance has + been provided via setVkInstance(). + */ +VkInstance QVulkanInstance::vkInstance() const +{ + return d_ptr->vkInst; +} + +/*! + \return the requested flags. + */ +QVulkanInstance::Flags QVulkanInstance::flags() const +{ + return d_ptr->flags; +} + +/*! + \return the enabled instance layers, if create() was called and was successful. The + requested layers otherwise. + */ +QByteArrayList QVulkanInstance::layers() const +{ + return d_ptr->layers; +} + +/*! + \return the enabled instance extensions, if create() was called and was + successful. The requested extensions otherwise. + */ +QByteArrayList QVulkanInstance::extensions() const +{ + return d_ptr->extensions; +} + +/*! + \return the requested Vulkan API version against which the application + expects to run, or a null version number if setApiVersion() was not called + before create(). + */ +QVersionNumber QVulkanInstance::apiVersion() const +{ + return d_ptr->apiVersion; +} + +/*! + Resolves the Vulkan function with the given \a name. + + For core Vulkan commands use functions() and QVulkanFunctions instead. + + \note When resolving device-specific extensions, prefer using + QVulkanFunctions::vkGetDeviceProcAddr() as explained + \l{https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetDeviceProcAddr.html}{in + the Vulkan specification}. + */ +PFN_vkVoidFunction QVulkanInstance::getInstanceProcAddr(const char *name) +{ + // The return value is PFN_vkVoidFunction instead of QFunctionPointer or + // similar because on some platforms honoring VKAPI_PTR is important. + return d_ptr->platformInst->getInstanceProcAddr(name); +} + +/*! + \return the platform Vulkan instance corresponding to this QVulkanInstance. + + \internal + */ +QPlatformVulkanInstance *QVulkanInstance::handle() const +{ + return d_ptr->platformInst.data(); +} + +/*! + \return the corresponding QVulkanFunctions object that exposes the core + Vulkan command set, excluding device level functions, and is guaranteed to + be functional cross-platform. + + \note The returned object is owned and managed by the QVulkanInstance. Do + not destroy or alter it. + + \sa deviceFunctions() + */ +QVulkanFunctions *QVulkanInstance::functions() const +{ + return d_ptr->funcs.data(); +} + +/*! + \return the QVulkanDeviceFunctions object that exposes the device level + core Vulkan command set and is guaranteed to be functional cross-platform. + + \note The Vulkan functions in the returned object must only be called with + \a device or a child object (VkQueue, VkCommandBuffer) of \a device as + their first parameter. This is because these functions are resolved via + \l{https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkGetDeviceProcAddr.html}{vkGetDeviceProcAddr} + in order to avoid the potential overhead of internal dispatching. + + \note The returned object is owned and managed by the QVulkanInstance. Do + not destroy or alter it. + + \note The object is cached so calling this function with the same \a device + again is a cheap operation. However, when the device gets destroyed, it is up + to the application to notify the QVulkanInstance by calling + resetDeviceFunctions(). + + \sa functions(), resetDeviceFunctions() + */ +QVulkanDeviceFunctions *QVulkanInstance::deviceFunctions(VkDevice device) +{ + QVulkanDeviceFunctions *&f(d_ptr->deviceFuncs[device]); + if (!f) + f = new QVulkanDeviceFunctions(this, device); + return f; +} + +/*! + Invalidates and destroys the QVulkanDeviceFunctions object for the given + \a device. + + This function must be called when a VkDevice, for which deviceFunctions() + was called, gets destroyed while the application intends to continue + running, possibly creating a new logical Vulkan device later on. + + There is no need to call this before destroying the QVulkanInstance since + clean up is then performed automatically. + + \sa deviceFunctions() + */ +void QVulkanInstance::resetDeviceFunctions(VkDevice device) +{ + QVulkanDeviceFunctions *&f(d_ptr->deviceFuncs[device]); + delete f; + f = nullptr; +} + +/*! + Creates or retrieves the already existing \c{VkSurfaceKHR} handle for the + given \a window. + + \return the Vulkan surface handle or 0 when failed. + */ +VkSurfaceKHR QVulkanInstance::surfaceForWindow(QWindow *window) +{ + QPlatformNativeInterface *nativeInterface = qGuiApp->platformNativeInterface(); + // VkSurfaceKHR is non-dispatchable and maps to a pointer on x64 and a uint64 on x86. + // Therefore a pointer is returned from the platform plugin, not the value itself. + void *p = nativeInterface->nativeResourceForWindow(QByteArrayLiteral("vkSurface"), window); + return p ? *static_cast(p) : 0; +} + +/*! + \return true if the queue family with \a queueFamilyIndex within the + \a physicalDevice supports presenting to \a window. + + Call this function when examining the queues of a given Vulkan device, in + order to decide which queue can be used for performing presentation. + */ +bool QVulkanInstance::supportsPresent(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, QWindow *window) +{ + return d_ptr->platformInst->supportsPresent(physicalDevice, queueFamilyIndex, window); +} + +/*! + This function should be called by the application's renderer after queuing + a present operation for \a window. + + While on some platforms this will be a no-op, some may perform windowing + system dependent synchronization. For example, on X11 this will update + \c{_NET_WM_SYNC_REQUEST_COUNTER}. + */ +void QVulkanInstance::presentQueued(QWindow *window) +{ + d_ptr->platformInst->presentQueued(window); +} + +#ifndef QT_NO_DEBUG_STREAM +QDebug operator<<(QDebug dbg, const QVulkanLayer &layer) +{ + QDebugStateSaver saver(dbg); + dbg.nospace() << "QVulkanLayer(" << layer.name << " " << layer.version + << " " << layer.specVersion << " " << layer.description << ")"; + return dbg; +} + +QDebug operator<<(QDebug dbg, const QVulkanExtension &extension) +{ + QDebugStateSaver saver(dbg); + dbg.nospace() << "QVulkanExtension(" << extension.name << " " << extension.version << ")"; + return dbg; +} +#endif + +QT_END_NAMESPACE diff --git a/src/gui/vulkan/qvulkaninstance.h b/src/gui/vulkan/qvulkaninstance.h new file mode 100644 index 0000000000..b3f08cf0d8 --- /dev/null +++ b/src/gui/vulkan/qvulkaninstance.h @@ -0,0 +1,163 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QVULKANINSTANCE_H +#define QVULKANINSTANCE_H + +#include + +#if QT_CONFIG(vulkan) + +#ifndef VK_NO_PROTOTYPES +#define VK_NO_PROTOTYPES +#endif +#include + +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QVulkanInstancePrivate; +class QPlatformVulkanInstance; +class QVulkanFunctions; +class QVulkanDeviceFunctions; +class QWindow; + +struct Q_GUI_EXPORT QVulkanLayer +{ + QByteArray name; + uint32_t version; + QVersionNumber specVersion; + QByteArray description; + bool operator==(const QVulkanLayer &other) const { + return name == other.name && version == other.version && specVersion == other.specVersion; + } +}; + +struct Q_GUI_EXPORT QVulkanExtension +{ + QByteArray name; + uint32_t version; + bool operator==(const QVulkanExtension &other) const { + return name == other.name && version == other.version; + } +}; + +#ifndef QT_NO_DEBUG_STREAM +Q_GUI_EXPORT QDebug operator<<(QDebug, const QVulkanLayer &); +Q_GUI_EXPORT QDebug operator<<(QDebug, const QVulkanExtension &); +#endif + +template +class QVulkanInfoVector : public QVector +{ +public: + bool contains(const QByteArray &name) const { + return std::any_of(this->cbegin(), this->cend(), [&](const T &entry) { + return entry.name == name; }); + } + bool contains(const QByteArray &name, int minVersion) const { + return std::any_of(this->cbegin(), this->cend(), [&](const T &entry) { + return entry.name == name && entry.version >= minVersion; }); + } +}; + +class Q_GUI_EXPORT QVulkanInstance +{ +public: + QVulkanInstance(); + ~QVulkanInstance(); + + enum Flag { + NoDebugOutputRedirect = 0x01 + }; + Q_DECLARE_FLAGS(Flags, Flag) + + QVulkanInfoVector supportedLayers(); + QVulkanInfoVector supportedExtensions(); + + void setVkInstance(VkInstance existingVkInstance); + + void setFlags(Flags flags); + void setLayers(const QByteArrayList &layers); + void setExtensions(const QByteArrayList &extensions); + void setApiVersion(const QVersionNumber &vulkanVersion); + + bool create(); + void destroy(); + bool isValid() const; + VkResult errorCode() const; + + VkInstance vkInstance() const; + + Flags flags() const; + QByteArrayList layers() const; + QByteArrayList extensions() const; + QVersionNumber apiVersion() const; + + PFN_vkVoidFunction getInstanceProcAddr(const char *name); + + QPlatformVulkanInstance *handle() const; + + QVulkanFunctions *functions() const; + QVulkanDeviceFunctions *deviceFunctions(VkDevice device); + void resetDeviceFunctions(VkDevice device); + + static VkSurfaceKHR surfaceForWindow(QWindow *window); + + bool supportsPresent(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, QWindow *window); + + void presentQueued(QWindow *window); + +private: + QScopedPointer d_ptr; + Q_DISABLE_COPY(QVulkanInstance) +}; + +Q_DECLARE_OPERATORS_FOR_FLAGS(QVulkanInstance::Flags) + +QT_END_NAMESPACE + +#endif // QT_CONFIG(vulkan) + +#endif // QVULKANINSTANCE_H diff --git a/src/gui/vulkan/vk.xml b/src/gui/vulkan/vk.xml new file mode 100644 index 0000000000..779875b819 --- /dev/null +++ b/src/gui/vulkan/vk.xml @@ -0,0 +1,5269 @@ + + + +Copyright (c) 2015-2017 The Khronos Group Inc. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and/or associated documentation files (the +"Materials"), to deal in the Materials without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Materials, and to +permit persons to whom the Materials are furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Materials. + +THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + +------------------------------------------------------------------------ + +This file, vk.xml, is the Vulkan API Registry. It is a critically important +and normative part of the Vulkan Specification, including a canonical +machine-readable definition of the API, parameter and member validation +language incorporated into the Specification and reference pages, and other +material which is registered by Khronos, such as tags used by extension and +layer authors. The only authoritative version of vk.xml is the one +maintained in the master branch of the Khronos Vulkan GitHub project. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #include "vk_platform.h" + + #include "vulkan.h" + #include <X11/Xlib.h> + #include <X11/extensions/Xrandr.h> + #include <android/native_window.h> + #include <mir_toolkit/client_types.h> + #include <wayland-client.h> + #include <windows.h> + #include <xcb/xcb.h> + + + + + + + + + + + + + + + + + + + + #define VK_MAKE_VERSION(major, minor, patch) \ + (((major) << 22) | ((minor) << 12) | (patch)) + #define VK_VERSION_MAJOR(version) ((uint32_t)(version) >> 22) + #define VK_VERSION_MINOR(version) (((uint32_t)(version) >> 12) & 0x3ff) + #define VK_VERSION_PATCH(version) ((uint32_t)(version) & 0xfff) + + // DEPRECATED: This define has been removed. Specific version defines (e.g. VK_API_VERSION_1_0), or the VK_MAKE_VERSION macro, should be used instead. +//#define VK_API_VERSION VK_MAKE_VERSION(1, 0, 0) + // Vulkan 1.0 version number +#define VK_API_VERSION_1_0 VK_MAKE_VERSION(1, 0, 0) + // Version of this file +#define VK_HEADER_VERSION 39 + + +#define VK_DEFINE_HANDLE(object) typedef struct object##_T* object; + + +#if !defined(VK_DEFINE_NON_DISPATCHABLE_HANDLE) +#if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__) + #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef struct object##_T *object; +#else + #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef uint64_t object; +#endif +#endif + + + +#define VK_NULL_HANDLE 0 + + + typedef uint32_t VkSampleMask; + typedef uint32_t VkBool32; + typedef uint32_t VkFlags; + typedef uint64_t VkDeviceSize; + + + + + + + + + + + typedef VkFlags VkFramebufferCreateFlags; + typedef VkFlags VkQueryPoolCreateFlags; + typedef VkFlags VkRenderPassCreateFlags; + typedef VkFlags VkSamplerCreateFlags; + typedef VkFlags VkPipelineLayoutCreateFlags; + typedef VkFlags VkPipelineCacheCreateFlags; + typedef VkFlags VkPipelineDepthStencilStateCreateFlags; + typedef VkFlags VkPipelineDynamicStateCreateFlags; + typedef VkFlags VkPipelineColorBlendStateCreateFlags; + typedef VkFlags VkPipelineMultisampleStateCreateFlags; + typedef VkFlags VkPipelineRasterizationStateCreateFlags; + typedef VkFlags VkPipelineViewportStateCreateFlags; + typedef VkFlags VkPipelineTessellationStateCreateFlags; + typedef VkFlags VkPipelineInputAssemblyStateCreateFlags; + typedef VkFlags VkPipelineVertexInputStateCreateFlags; + typedef VkFlags VkPipelineShaderStageCreateFlags; + typedef VkFlags VkDescriptorSetLayoutCreateFlags; + typedef VkFlags VkBufferViewCreateFlags; + typedef VkFlags VkInstanceCreateFlags; + typedef VkFlags VkDeviceCreateFlags; + typedef VkFlags VkDeviceQueueCreateFlags; + typedef VkFlags VkQueueFlags; + typedef VkFlags VkMemoryPropertyFlags; + typedef VkFlags VkMemoryHeapFlags; + typedef VkFlags VkAccessFlags; + typedef VkFlags VkBufferUsageFlags; + typedef VkFlags VkBufferCreateFlags; + typedef VkFlags VkShaderStageFlags; + typedef VkFlags VkImageUsageFlags; + typedef VkFlags VkImageCreateFlags; + typedef VkFlags VkImageViewCreateFlags; + typedef VkFlags VkPipelineCreateFlags; + typedef VkFlags VkColorComponentFlags; + typedef VkFlags VkFenceCreateFlags; + typedef VkFlags VkSemaphoreCreateFlags; + typedef VkFlags VkFormatFeatureFlags; + typedef VkFlags VkQueryControlFlags; + typedef VkFlags VkQueryResultFlags; + typedef VkFlags VkShaderModuleCreateFlags; + typedef VkFlags VkEventCreateFlags; + typedef VkFlags VkCommandPoolCreateFlags; + typedef VkFlags VkCommandPoolResetFlags; + typedef VkFlags VkCommandBufferResetFlags; + typedef VkFlags VkCommandBufferUsageFlags; + typedef VkFlags VkQueryPipelineStatisticFlags; + typedef VkFlags VkMemoryMapFlags; + typedef VkFlags VkImageAspectFlags; + typedef VkFlags VkSparseMemoryBindFlags; + typedef VkFlags VkSparseImageFormatFlags; + typedef VkFlags VkSubpassDescriptionFlags; + typedef VkFlags VkPipelineStageFlags; + typedef VkFlags VkSampleCountFlags; + typedef VkFlags VkAttachmentDescriptionFlags; + typedef VkFlags VkStencilFaceFlags; + typedef VkFlags VkCullModeFlags; + typedef VkFlags VkDescriptorPoolCreateFlags; + typedef VkFlags VkDescriptorPoolResetFlags; + typedef VkFlags VkDependencyFlags; + + typedef VkFlags VkIndirectCommandsLayoutUsageFlagsNVX; + typedef VkFlags VkObjectEntryUsageFlagsNVX; + + + typedef VkFlags VkCompositeAlphaFlagsKHR; + typedef VkFlags VkDisplayPlaneAlphaFlagsKHR; + typedef VkFlags VkSurfaceTransformFlagsKHR; + typedef VkFlags VkSwapchainCreateFlagsKHR; + typedef VkFlags VkDisplayModeCreateFlagsKHR; + typedef VkFlags VkDisplaySurfaceCreateFlagsKHR; + typedef VkFlags VkAndroidSurfaceCreateFlagsKHR; + typedef VkFlags VkMirSurfaceCreateFlagsKHR; + typedef VkFlags VkViSurfaceCreateFlagsNN; + typedef VkFlags VkWaylandSurfaceCreateFlagsKHR; + typedef VkFlags VkWin32SurfaceCreateFlagsKHR; + typedef VkFlags VkXlibSurfaceCreateFlagsKHR; + typedef VkFlags VkXcbSurfaceCreateFlagsKHR; + + typedef VkFlags VkDebugReportFlagsEXT; + typedef VkFlags VkCommandPoolTrimFlagsKHR; + typedef VkFlags VkExternalMemoryHandleTypeFlagsNV; + typedef VkFlags VkExternalMemoryFeatureFlagsNV; + typedef VkFlags VkSurfaceCounterFlagsEXT; + + + VK_DEFINE_HANDLE(VkInstance) + VK_DEFINE_HANDLE(VkPhysicalDevice) + VK_DEFINE_HANDLE(VkDevice) + VK_DEFINE_HANDLE(VkQueue) + VK_DEFINE_HANDLE(VkCommandBuffer) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDeviceMemory) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCommandPool) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBuffer) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBufferView) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkImage) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkImageView) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkShaderModule) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipeline) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineLayout) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSampler) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSet) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSetLayout) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorPool) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFence) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSemaphore) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkEvent) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkQueryPool) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFramebuffer) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkRenderPass) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineCache) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkObjectTableNVX) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkIndirectCommandsLayoutNVX) + + + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDisplayKHR) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDisplayModeKHR) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSwapchainKHR) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugReportCallbackEXT) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + typedef void (VKAPI_PTR *PFN_vkInternalAllocationNotification)( + void* pUserData, + size_t size, + VkInternalAllocationType allocationType, + VkSystemAllocationScope allocationScope); + typedef void (VKAPI_PTR *PFN_vkInternalFreeNotification)( + void* pUserData, + size_t size, + VkInternalAllocationType allocationType, + VkSystemAllocationScope allocationScope); + typedef void* (VKAPI_PTR *PFN_vkReallocationFunction)( + void* pUserData, + void* pOriginal, + size_t size, + size_t alignment, + VkSystemAllocationScope allocationScope); + typedef void* (VKAPI_PTR *PFN_vkAllocationFunction)( + void* pUserData, + size_t size, + size_t alignment, + VkSystemAllocationScope allocationScope); + typedef void (VKAPI_PTR *PFN_vkFreeFunction)( + void* pUserData, + void* pMemory); + + + typedef void (VKAPI_PTR *PFN_vkVoidFunction)(void); + + + typedef VkBool32 (VKAPI_PTR *PFN_vkDebugReportCallbackEXT)( + VkDebugReportFlagsEXT flags, + VkDebugReportObjectTypeEXT objectType, + uint64_t object, + size_t location, + int32_t messageCode, + const char* pLayerPrefix, + const char* pMessage, + void* pUserData); + + + + int32_t x + int32_t y + + + int32_t x + int32_t y + int32_t z + + + uint32_t width + uint32_t height + + + uint32_t width + uint32_t height + uint32_t depth + + + float x + float y + float width + float height + float minDepth + float maxDepth + + + VkOffset2D offset + VkExtent2D extent + + + VkOffset3D offset + VkExtent3D extent + + + VkRect2D rect + uint32_t baseArrayLayer + uint32_t layerCount + + + VkComponentSwizzle r + VkComponentSwizzle g + VkComponentSwizzle b + VkComponentSwizzle a + + + uint32_t apiVersion + uint32_t driverVersion + uint32_t vendorID + uint32_t deviceID + VkPhysicalDeviceType deviceType + char deviceName[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE] + uint8_t pipelineCacheUUID[VK_UUID_SIZE] + VkPhysicalDeviceLimits limits + VkPhysicalDeviceSparseProperties sparseProperties + + + char extensionName[VK_MAX_EXTENSION_NAME_SIZE] + uint32_t specVersion + + + char layerName[VK_MAX_EXTENSION_NAME_SIZE] + uint32_t specVersion + uint32_t implementationVersion + char description[VK_MAX_DESCRIPTION_SIZE] + + + VkStructureType sType + const void* pNext + const char* pApplicationName + uint32_t applicationVersion + const char* pEngineName + uint32_t engineVersion + uint32_t apiVersion + + + void* pUserData + PFN_vkAllocationFunction pfnAllocation + PFN_vkReallocationFunction pfnReallocation + PFN_vkFreeFunction pfnFree + PFN_vkInternalAllocationNotification pfnInternalAllocation + PFN_vkInternalFreeNotification pfnInternalFree + + + VkStructureType sType + const void* pNext + VkDeviceQueueCreateFlags flags + uint32_t queueFamilyIndex + uint32_t queueCount + const float* pQueuePriorities + + + VkStructureType sType + const void* pNext + VkDeviceCreateFlags flags + uint32_t queueCreateInfoCount + const VkDeviceQueueCreateInfo* pQueueCreateInfos + uint32_t enabledLayerCount + const char* const* ppEnabledLayerNames + uint32_t enabledExtensionCount + const char* const* ppEnabledExtensionNames + const VkPhysicalDeviceFeatures* pEnabledFeatures + + + VkStructureType sType + const void* pNext + VkInstanceCreateFlags flags + const VkApplicationInfo* pApplicationInfo + uint32_t enabledLayerCount + const char* const* ppEnabledLayerNames + uint32_t enabledExtensionCount + const char* const* ppEnabledExtensionNames + + + VkQueueFlags queueFlags + uint32_t queueCount + uint32_t timestampValidBits + VkExtent3D minImageTransferGranularity + + + uint32_t memoryTypeCount + VkMemoryType memoryTypes[VK_MAX_MEMORY_TYPES] + uint32_t memoryHeapCount + VkMemoryHeap memoryHeaps[VK_MAX_MEMORY_HEAPS] + + + VkStructureType sType + const void* pNext + VkDeviceSize allocationSize + uint32_t memoryTypeIndex + + + VkDeviceSize size + VkDeviceSize alignment + uint32_t memoryTypeBits + + + VkImageAspectFlags aspectMask + VkExtent3D imageGranularity + VkSparseImageFormatFlags flags + + + VkSparseImageFormatProperties formatProperties + uint32_t imageMipTailFirstLod + VkDeviceSize imageMipTailSize + VkDeviceSize imageMipTailOffset + VkDeviceSize imageMipTailStride + + + VkMemoryPropertyFlags propertyFlags + uint32_t heapIndex + + + VkDeviceSize size + VkMemoryHeapFlags flags + + + VkStructureType sType + const void* pNext + VkDeviceMemory memory + VkDeviceSize offset + VkDeviceSize size + + + VkFormatFeatureFlags linearTilingFeatures + VkFormatFeatureFlags optimalTilingFeatures + VkFormatFeatureFlags bufferFeatures + + + VkExtent3D maxExtent + uint32_t maxMipLevels + uint32_t maxArrayLayers + VkSampleCountFlags sampleCounts + VkDeviceSize maxResourceSize + + + VkBuffer buffer + VkDeviceSize offset + VkDeviceSize range + + + VkSampler sampler + VkImageView imageView + VkImageLayout imageLayout + + + VkStructureType sType + const void* pNext + VkDescriptorSet dstSet + uint32_t dstBinding + uint32_t dstArrayElement + uint32_t descriptorCount + VkDescriptorType descriptorType + const VkDescriptorImageInfo* pImageInfo + const VkDescriptorBufferInfo* pBufferInfo + const VkBufferView* pTexelBufferView + + + VkStructureType sType + const void* pNext + VkDescriptorSet srcSet + uint32_t srcBinding + uint32_t srcArrayElement + VkDescriptorSet dstSet + uint32_t dstBinding + uint32_t dstArrayElement + uint32_t descriptorCount + + + VkStructureType sType + const void* pNext + VkBufferCreateFlags flags + VkDeviceSize size + VkBufferUsageFlags usage + VkSharingMode sharingMode + uint32_t queueFamilyIndexCount + const uint32_t* pQueueFamilyIndices + + + VkStructureType sType + const void* pNext + VkBufferViewCreateFlagsflags + VkBuffer buffer + VkFormat format + VkDeviceSize offset + VkDeviceSize range + + + VkImageAspectFlags aspectMask + uint32_t mipLevel + uint32_t arrayLayer + + + VkImageAspectFlags aspectMask + uint32_t mipLevel + uint32_t baseArrayLayer + uint32_t layerCount + + + VkImageAspectFlags aspectMask + uint32_t baseMipLevel + uint32_t levelCount + uint32_t baseArrayLayer + uint32_t layerCount + + + VkStructureType sType + const void* pNext + VkAccessFlags srcAccessMask + VkAccessFlags dstAccessMask + + + VkStructureType sType + const void* pNext + VkAccessFlags srcAccessMask + VkAccessFlags dstAccessMask + uint32_t srcQueueFamilyIndex + uint32_t dstQueueFamilyIndex + VkBuffer buffer + VkDeviceSize offset + VkDeviceSize size + + + VkStructureType sType + const void* pNext + VkAccessFlags srcAccessMask + VkAccessFlags dstAccessMask + VkImageLayout oldLayout + VkImageLayout newLayout + uint32_t srcQueueFamilyIndex + uint32_t dstQueueFamilyIndex + VkImage image + VkImageSubresourceRange subresourceRange + + + VkStructureType sType + const void* pNext + VkImageCreateFlags flags + VkImageType imageType + VkFormat format + VkExtent3D extent + uint32_t mipLevels + uint32_t arrayLayers + VkSampleCountFlagBits samples + VkImageTiling tiling + VkImageUsageFlags usage + VkSharingMode sharingMode + uint32_t queueFamilyIndexCount + const uint32_t* pQueueFamilyIndices + VkImageLayout initialLayout + + + VkDeviceSize offset + VkDeviceSize size + VkDeviceSize rowPitch + VkDeviceSize arrayPitch + VkDeviceSize depthPitch + + + VkStructureType sType + const void* pNext + VkImageViewCreateFlags flags + VkImage image + VkImageViewType viewType + VkFormat format + VkComponentMapping components + VkImageSubresourceRange subresourceRange + + + VkDeviceSize srcOffset + VkDeviceSize dstOffset + VkDeviceSize size + + + VkDeviceSize resourceOffset + VkDeviceSize size + VkDeviceMemory memory + VkDeviceSize memoryOffset + VkSparseMemoryBindFlagsflags + + + VkImageSubresource subresource + VkOffset3D offset + VkExtent3D extent + VkDeviceMemory memory + VkDeviceSize memoryOffset + VkSparseMemoryBindFlagsflags + + + VkBuffer buffer + uint32_t bindCount + const VkSparseMemoryBind* pBinds + + + VkImage image + uint32_t bindCount + const VkSparseMemoryBind* pBinds + + + VkImage image + uint32_t bindCount + const VkSparseImageMemoryBind* pBinds + + + VkStructureType sType + const void* pNext + uint32_t waitSemaphoreCount + const VkSemaphore* pWaitSemaphores + uint32_t bufferBindCount + const VkSparseBufferMemoryBindInfo* pBufferBinds + uint32_t imageOpaqueBindCount + const VkSparseImageOpaqueMemoryBindInfo* pImageOpaqueBinds + uint32_t imageBindCount + const VkSparseImageMemoryBindInfo* pImageBinds + uint32_t signalSemaphoreCount + const VkSemaphore* pSignalSemaphores + + + VkImageSubresourceLayers srcSubresource + VkOffset3D srcOffset + VkImageSubresourceLayers dstSubresource + VkOffset3D dstOffset + VkExtent3D extent + + + VkImageSubresourceLayers srcSubresource + VkOffset3D srcOffsets[2] + VkImageSubresourceLayers dstSubresource + VkOffset3D dstOffsets[2] + + + VkDeviceSize bufferOffset + uint32_t bufferRowLength + uint32_t bufferImageHeight + VkImageSubresourceLayers imageSubresource + VkOffset3D imageOffset + VkExtent3D imageExtent + + + VkImageSubresourceLayers srcSubresource + VkOffset3D srcOffset + VkImageSubresourceLayers dstSubresource + VkOffset3D dstOffset + VkExtent3D extent + + + VkStructureType sType + const void* pNext + VkShaderModuleCreateFlags flags + size_t codeSize + const uint32_t* pCode + + + uint32_t binding + VkDescriptorType descriptorType + uint32_t descriptorCount + VkShaderStageFlags stageFlags + const VkSampler* pImmutableSamplers + + + VkStructureType sType + const void* pNext + VkDescriptorSetLayoutCreateFlags flags + uint32_t bindingCount + const VkDescriptorSetLayoutBinding* pBindings + + + VkDescriptorType type + uint32_t descriptorCount + + + VkStructureType sType + const void* pNext + VkDescriptorPoolCreateFlags flags + uint32_t maxSets + uint32_t poolSizeCount + const VkDescriptorPoolSize* pPoolSizes + + + VkStructureType sType + const void* pNext + VkDescriptorPool descriptorPool + uint32_t descriptorSetCount + const VkDescriptorSetLayout* pSetLayouts + + + uint32_t constantID + uint32_t offset + size_t size + + + uint32_t mapEntryCount + const VkSpecializationMapEntry* pMapEntries + size_t dataSize + const void* pData + + + VkStructureType sType + const void* pNext + VkPipelineShaderStageCreateFlags flags + VkShaderStageFlagBits stage + VkShaderModule module + const char* pName + const VkSpecializationInfo* pSpecializationInfo + + + VkStructureType sType + const void* pNext + VkPipelineCreateFlags flags + VkPipelineShaderStageCreateInfo stage + VkPipelineLayout layout + VkPipeline basePipelineHandle + int32_t basePipelineIndex + + + uint32_t binding + uint32_t stride + VkVertexInputRate inputRate + + + uint32_t location + uint32_t binding + VkFormat format + uint32_t offset + + + VkStructureType sType + const void* pNext + VkPipelineVertexInputStateCreateFlags flags + uint32_t vertexBindingDescriptionCount + const VkVertexInputBindingDescription* pVertexBindingDescriptions + uint32_t vertexAttributeDescriptionCount + const VkVertexInputAttributeDescription* pVertexAttributeDescriptions + + + VkStructureType sType + const void* pNext + VkPipelineInputAssemblyStateCreateFlags flags + VkPrimitiveTopology topology + VkBool32 primitiveRestartEnable + + + VkStructureType sType + const void* pNext + VkPipelineTessellationStateCreateFlags flags + uint32_t patchControlPoints + + + VkStructureType sType + const void* pNext + VkPipelineViewportStateCreateFlags flags + uint32_t viewportCount + const VkViewport* pViewports + uint32_t scissorCount + const VkRect2D* pScissors + + + VkStructureType sType + const void* pNext + VkPipelineRasterizationStateCreateFlags flags + VkBool32 depthClampEnable + VkBool32 rasterizerDiscardEnable + VkPolygonMode polygonMode + VkCullModeFlags cullMode + VkFrontFace frontFace + VkBool32 depthBiasEnable + float depthBiasConstantFactor + float depthBiasClamp + float depthBiasSlopeFactor + float lineWidth + + + VkStructureType sType + const void* pNext + VkPipelineMultisampleStateCreateFlags flags + VkSampleCountFlagBits rasterizationSamples + VkBool32 sampleShadingEnable + float minSampleShading + const VkSampleMask* pSampleMask + VkBool32 alphaToCoverageEnable + VkBool32 alphaToOneEnable + + + VkBool32 blendEnable + VkBlendFactor srcColorBlendFactor + VkBlendFactor dstColorBlendFactor + VkBlendOp colorBlendOp + VkBlendFactor srcAlphaBlendFactor + VkBlendFactor dstAlphaBlendFactor + VkBlendOp alphaBlendOp + VkColorComponentFlags colorWriteMask + + + VkStructureType sType + const void* pNext + VkPipelineColorBlendStateCreateFlags flags + VkBool32 logicOpEnable + VkLogicOp logicOp + uint32_t attachmentCount + const VkPipelineColorBlendAttachmentState* pAttachments + float blendConstants[4] + + + VkStructureType sType + const void* pNext + VkPipelineDynamicStateCreateFlags flags + uint32_t dynamicStateCount + const VkDynamicState* pDynamicStates + + + VkStencilOp failOp + VkStencilOp passOp + VkStencilOp depthFailOp + VkCompareOp compareOp + uint32_t compareMask + uint32_t writeMask + uint32_t reference + + + VkStructureType sType + const void* pNext + VkPipelineDepthStencilStateCreateFlags flags + VkBool32 depthTestEnable + VkBool32 depthWriteEnable + VkCompareOp depthCompareOp + VkBool32 depthBoundsTestEnable + VkBool32 stencilTestEnable + VkStencilOpState front + VkStencilOpState back + float minDepthBounds + float maxDepthBounds + + + VkStructureType sType + const void* pNext + VkPipelineCreateFlags flags + uint32_t stageCount + const VkPipelineShaderStageCreateInfo* pStages + const VkPipelineVertexInputStateCreateInfo* pVertexInputState + const VkPipelineInputAssemblyStateCreateInfo* pInputAssemblyState + const VkPipelineTessellationStateCreateInfo* pTessellationState + const VkPipelineViewportStateCreateInfo* pViewportState + const VkPipelineRasterizationStateCreateInfo* pRasterizationState + const VkPipelineMultisampleStateCreateInfo* pMultisampleState + const VkPipelineDepthStencilStateCreateInfo* pDepthStencilState + const VkPipelineColorBlendStateCreateInfo* pColorBlendState + const VkPipelineDynamicStateCreateInfo* pDynamicState + VkPipelineLayout layout + VkRenderPass renderPass + uint32_t subpass + VkPipeline basePipelineHandle + int32_t basePipelineIndex + + + VkStructureType sType + const void* pNext + VkPipelineCacheCreateFlags flags + size_t initialDataSize + const void* pInitialData + + + VkShaderStageFlags stageFlags + uint32_t offset + uint32_t size + + + VkStructureType sType + const void* pNext + VkPipelineLayoutCreateFlags flags + uint32_t setLayoutCount + const VkDescriptorSetLayout* pSetLayouts + uint32_t pushConstantRangeCount + const VkPushConstantRange* pPushConstantRanges + + + VkStructureType sType + const void* pNext + VkSamplerCreateFlags flags + VkFilter magFilter + VkFilter minFilter + VkSamplerMipmapMode mipmapMode + VkSamplerAddressMode addressModeU + VkSamplerAddressMode addressModeV + VkSamplerAddressMode addressModeW + float mipLodBias + VkBool32 anisotropyEnable + float maxAnisotropy + VkBool32 compareEnable + VkCompareOp compareOp + float minLod + float maxLod + VkBorderColor borderColor + VkBool32 unnormalizedCoordinates + + + VkStructureType sType + const void* pNext + VkCommandPoolCreateFlags flags + uint32_t queueFamilyIndex + + + VkStructureType sType + const void* pNext + VkCommandPool commandPool + VkCommandBufferLevel level + uint32_t commandBufferCount + + + VkStructureType sType + const void* pNext + VkRenderPass renderPass + uint32_t subpass + VkFramebuffer framebuffer + VkBool32 occlusionQueryEnable + VkQueryControlFlags queryFlags + VkQueryPipelineStatisticFlags pipelineStatistics + + + VkStructureType sType + const void* pNext + VkCommandBufferUsageFlags flags + const VkCommandBufferInheritanceInfo* pInheritanceInfo + + + VkStructureType sType + const void* pNext + VkRenderPass renderPass + VkFramebuffer framebuffer + VkRect2D renderArea + uint32_t clearValueCount + const VkClearValue* pClearValues + + + float float32[4] + int32_t int32[4] + uint32_t uint32[4] + + + float depth + uint32_t stencil + + + VkClearColorValue color + VkClearDepthStencilValue depthStencil + + + VkImageAspectFlags aspectMask + uint32_t colorAttachment + VkClearValue clearValue + + + VkAttachmentDescriptionFlags flags + VkFormat format + VkSampleCountFlagBits samples + VkAttachmentLoadOp loadOp + VkAttachmentStoreOp storeOp + VkAttachmentLoadOp stencilLoadOp + VkAttachmentStoreOp stencilStoreOp + VkImageLayout initialLayout + VkImageLayout finalLayout + + + uint32_t attachment + VkImageLayout layout + + + VkSubpassDescriptionFlags flags + VkPipelineBindPoint pipelineBindPoint + uint32_t inputAttachmentCount + const VkAttachmentReference* pInputAttachments + uint32_t colorAttachmentCount + const VkAttachmentReference* pColorAttachments + const VkAttachmentReference* pResolveAttachments + const VkAttachmentReference* pDepthStencilAttachment + uint32_t preserveAttachmentCount + const uint32_t* pPreserveAttachments + + + uint32_t srcSubpass + uint32_t dstSubpass + VkPipelineStageFlags srcStageMask + VkPipelineStageFlags dstStageMask + VkAccessFlags srcAccessMask + VkAccessFlags dstAccessMask + VkDependencyFlags dependencyFlags + + + VkStructureType sType + const void* pNext + VkRenderPassCreateFlags flags + uint32_t attachmentCount + const VkAttachmentDescription* pAttachments + uint32_t subpassCount + const VkSubpassDescription* pSubpasses + uint32_t dependencyCount + const VkSubpassDependency* pDependencies + + + VkStructureType sType + const void* pNext + VkEventCreateFlags flags + + + VkStructureType sType + const void* pNext + VkFenceCreateFlags flags + + + VkBool32 robustBufferAccess + VkBool32 fullDrawIndexUint32 + VkBool32 imageCubeArray + VkBool32 independentBlend + VkBool32 geometryShader + VkBool32 tessellationShader + VkBool32 sampleRateShading + VkBool32 dualSrcBlend + VkBool32 logicOp + VkBool32 multiDrawIndirect + VkBool32 drawIndirectFirstInstance + VkBool32 depthClamp + VkBool32 depthBiasClamp + VkBool32 fillModeNonSolid + VkBool32 depthBounds + VkBool32 wideLines + VkBool32 largePoints + VkBool32 alphaToOne + VkBool32 multiViewport + VkBool32 samplerAnisotropy + VkBool32 textureCompressionETC2 + VkBool32 textureCompressionASTC_LDR + VkBool32 textureCompressionBC + VkBool32 occlusionQueryPrecise + VkBool32 pipelineStatisticsQuery + VkBool32 vertexPipelineStoresAndAtomics + VkBool32 fragmentStoresAndAtomics + VkBool32 shaderTessellationAndGeometryPointSize + VkBool32 shaderImageGatherExtended + VkBool32 shaderStorageImageExtendedFormats + VkBool32 shaderStorageImageMultisample + VkBool32 shaderStorageImageReadWithoutFormat + VkBool32 shaderStorageImageWriteWithoutFormat + VkBool32 shaderUniformBufferArrayDynamicIndexing + VkBool32 shaderSampledImageArrayDynamicIndexing + VkBool32 shaderStorageBufferArrayDynamicIndexing + VkBool32 shaderStorageImageArrayDynamicIndexing + VkBool32 shaderClipDistance + VkBool32 shaderCullDistance + VkBool32 shaderFloat64 + VkBool32 shaderInt64 + VkBool32 shaderInt16 + VkBool32 shaderResourceResidency + VkBool32 shaderResourceMinLod + VkBool32 sparseBinding + VkBool32 sparseResidencyBuffer + VkBool32 sparseResidencyImage2D + VkBool32 sparseResidencyImage3D + VkBool32 sparseResidency2Samples + VkBool32 sparseResidency4Samples + VkBool32 sparseResidency8Samples + VkBool32 sparseResidency16Samples + VkBool32 sparseResidencyAliased + VkBool32 variableMultisampleRate + VkBool32 inheritedQueries + + + VkBool32 residencyStandard2DBlockShape + VkBool32 residencyStandard2DMultisampleBlockShape + VkBool32 residencyStandard3DBlockShape + VkBool32 residencyAlignedMipSize + VkBool32 residencyNonResidentStrict + + + + uint32_t maxImageDimension1D + uint32_t maxImageDimension2D + uint32_t maxImageDimension3D + uint32_t maxImageDimensionCube + uint32_t maxImageArrayLayers + uint32_t maxTexelBufferElements + uint32_t maxUniformBufferRange + uint32_t maxStorageBufferRange + uint32_t maxPushConstantsSize + + uint32_t maxMemoryAllocationCount + uint32_t maxSamplerAllocationCount + VkDeviceSize bufferImageGranularity + VkDeviceSize sparseAddressSpaceSize + + uint32_t maxBoundDescriptorSets + uint32_t maxPerStageDescriptorSamplers + uint32_t maxPerStageDescriptorUniformBuffers + uint32_t maxPerStageDescriptorStorageBuffers + uint32_t maxPerStageDescriptorSampledImages + uint32_t maxPerStageDescriptorStorageImages + uint32_t maxPerStageDescriptorInputAttachments + uint32_t maxPerStageResources + uint32_t maxDescriptorSetSamplers + uint32_t maxDescriptorSetUniformBuffers + uint32_t maxDescriptorSetUniformBuffersDynamic + uint32_t maxDescriptorSetStorageBuffers + uint32_t maxDescriptorSetStorageBuffersDynamic + uint32_t maxDescriptorSetSampledImages + uint32_t maxDescriptorSetStorageImages + uint32_t maxDescriptorSetInputAttachments + + uint32_t maxVertexInputAttributes + uint32_t maxVertexInputBindings + uint32_t maxVertexInputAttributeOffset + uint32_t maxVertexInputBindingStride + uint32_t maxVertexOutputComponents + + uint32_t maxTessellationGenerationLevel + uint32_t maxTessellationPatchSize + uint32_t maxTessellationControlPerVertexInputComponents + uint32_t maxTessellationControlPerVertexOutputComponents + uint32_t maxTessellationControlPerPatchOutputComponents + uint32_t maxTessellationControlTotalOutputComponents + + uint32_t maxTessellationEvaluationInputComponents + uint32_t maxTessellationEvaluationOutputComponents + + uint32_t maxGeometryShaderInvocations + uint32_t maxGeometryInputComponents + uint32_t maxGeometryOutputComponents + uint32_t maxGeometryOutputVertices + uint32_t maxGeometryTotalOutputComponents + + uint32_t maxFragmentInputComponents + uint32_t maxFragmentOutputAttachments + uint32_t maxFragmentDualSrcAttachments + uint32_t maxFragmentCombinedOutputResources + + uint32_t maxComputeSharedMemorySize + uint32_t maxComputeWorkGroupCount[3] + uint32_t maxComputeWorkGroupInvocations + uint32_t maxComputeWorkGroupSize[3] + uint32_t subPixelPrecisionBits + uint32_t subTexelPrecisionBits + uint32_t mipmapPrecisionBits + uint32_t maxDrawIndexedIndexValue + uint32_t maxDrawIndirectCount + float maxSamplerLodBias + float maxSamplerAnisotropy + uint32_t maxViewports + uint32_t maxViewportDimensions[2] + float viewportBoundsRange[2] + uint32_t viewportSubPixelBits + size_t minMemoryMapAlignment + VkDeviceSize minTexelBufferOffsetAlignment + VkDeviceSize minUniformBufferOffsetAlignment + VkDeviceSize minStorageBufferOffsetAlignment + int32_t minTexelOffset + uint32_t maxTexelOffset + int32_t minTexelGatherOffset + uint32_t maxTexelGatherOffset + float minInterpolationOffset + float maxInterpolationOffset + uint32_t subPixelInterpolationOffsetBits + uint32_t maxFramebufferWidth + uint32_t maxFramebufferHeight + uint32_t maxFramebufferLayers + VkSampleCountFlags framebufferColorSampleCounts + VkSampleCountFlags framebufferDepthSampleCounts + VkSampleCountFlags framebufferStencilSampleCounts + VkSampleCountFlags framebufferNoAttachmentsSampleCounts + uint32_t maxColorAttachments + VkSampleCountFlags sampledImageColorSampleCounts + VkSampleCountFlags sampledImageIntegerSampleCounts + VkSampleCountFlags sampledImageDepthSampleCounts + VkSampleCountFlags sampledImageStencilSampleCounts + VkSampleCountFlags storageImageSampleCounts + uint32_t maxSampleMaskWords + VkBool32 timestampComputeAndGraphics + float timestampPeriod + uint32_t maxClipDistances + uint32_t maxCullDistances + uint32_t maxCombinedClipAndCullDistances + uint32_t discreteQueuePriorities + float pointSizeRange[2] + float lineWidthRange[2] + float pointSizeGranularity + float lineWidthGranularity + VkBool32 strictLines + VkBool32 standardSampleLocations + VkDeviceSize optimalBufferCopyOffsetAlignment + VkDeviceSize optimalBufferCopyRowPitchAlignment + VkDeviceSize nonCoherentAtomSize + + + VkStructureType sType + const void* pNext + VkSemaphoreCreateFlags flags + + + VkStructureType sType + const void* pNext + VkQueryPoolCreateFlags flags + VkQueryType queryType + uint32_t queryCount + VkQueryPipelineStatisticFlags pipelineStatistics + + + VkStructureType sType + const void* pNext + VkFramebufferCreateFlags flags + VkRenderPass renderPass + uint32_t attachmentCount + const VkImageView* pAttachments + uint32_t width + uint32_t height + uint32_t layers + + + uint32_t vertexCount + uint32_t instanceCount + uint32_t firstVertex + uint32_t firstInstance + + + uint32_t indexCount + uint32_t instanceCount + uint32_t firstIndex + int32_t vertexOffset + uint32_t firstInstance + + + uint32_t x + uint32_t y + uint32_t z + + + VkStructureType sType + const void* pNext + uint32_t waitSemaphoreCount + const VkSemaphore* pWaitSemaphores + const VkPipelineStageFlags* pWaitDstStageMask + uint32_t commandBufferCount + const VkCommandBuffer* pCommandBuffers + uint32_t signalSemaphoreCount + const VkSemaphore* pSignalSemaphores + + + + VkDisplayKHR display + const char* displayName + VkExtent2D physicalDimensions + VkExtent2D physicalResolution + VkSurfaceTransformFlagsKHR supportedTransforms + VkBool32 planeReorderPossible + VkBool32 persistentContent + + + VkDisplayKHR currentDisplay + uint32_t currentStackIndex + + + VkExtent2D visibleRegion + uint32_t refreshRate + + + VkDisplayModeKHR displayMode + VkDisplayModeParametersKHR parameters + + + VkStructureType sType + const void* pNext + VkDisplayModeCreateFlagsKHR flags + VkDisplayModeParametersKHR parameters + + + VkDisplayPlaneAlphaFlagsKHR supportedAlpha + VkOffset2D minSrcPosition + VkOffset2D maxSrcPosition + VkExtent2D minSrcExtent + VkExtent2D maxSrcExtent + VkOffset2D minDstPosition + VkOffset2D maxDstPosition + VkExtent2D minDstExtent + VkExtent2D maxDstExtent + + + VkStructureType sType + const void* pNext + VkDisplaySurfaceCreateFlagsKHR flags + VkDisplayModeKHR displayMode + uint32_t planeIndex + uint32_t planeStackIndex + VkSurfaceTransformFlagBitsKHR transform + float globalAlpha + VkDisplayPlaneAlphaFlagBitsKHR alphaMode + VkExtent2D imageExtent + + + VkStructureType sType + const void* pNext + VkRect2D srcRect + VkRect2D dstRect + VkBool32 persistent + + + uint32_t minImageCount + uint32_t maxImageCount + VkExtent2D currentExtent + VkExtent2D minImageExtent + VkExtent2D maxImageExtent + uint32_t maxImageArrayLayers + VkSurfaceTransformFlagsKHR supportedTransforms + VkSurfaceTransformFlagBitsKHR currentTransform + VkCompositeAlphaFlagsKHR supportedCompositeAlpha + VkImageUsageFlags supportedUsageFlags + + + VkStructureType sType + const void* pNext + VkAndroidSurfaceCreateFlagsKHR flags + ANativeWindow* window + + + VkStructureType sType + const void* pNext + VkMirSurfaceCreateFlagsKHR flags + MirConnection* connection + MirSurface* mirSurface + + + VkStructureType sType + const void* pNext + VkViSurfaceCreateFlagsNN flags + void* window + + + VkStructureType sType + const void* pNext + VkWaylandSurfaceCreateFlagsKHR flags + struct wl_display* display + struct wl_surface* surface + + + VkStructureType sType + const void* pNext + VkWin32SurfaceCreateFlagsKHR flags + HINSTANCE hinstance + HWND hwnd + + + VkStructureType sType + const void* pNext + VkXlibSurfaceCreateFlagsKHR flags + Display* dpy + Window window + + + VkStructureType sType + const void* pNext + VkXcbSurfaceCreateFlagsKHR flags + xcb_connection_t* connection + xcb_window_t window + + + VkFormat format + VkColorSpaceKHR colorSpace + + + VkStructureType sType + const void* pNext + VkSwapchainCreateFlagsKHR flags + VkSurfaceKHR surface + uint32_t minImageCount + VkFormat imageFormat + VkColorSpaceKHR imageColorSpace + VkExtent2D imageExtent + uint32_t imageArrayLayers + VkImageUsageFlags imageUsage + VkSharingMode imageSharingMode + uint32_t queueFamilyIndexCount + const uint32_t* pQueueFamilyIndices + VkSurfaceTransformFlagBitsKHR preTransform + VkCompositeAlphaFlagBitsKHR compositeAlpha + VkPresentModeKHR presentMode + VkBool32 clipped + VkSwapchainKHR oldSwapchain + + + VkStructureType sType + const void* pNext + uint32_t waitSemaphoreCount + const VkSemaphore* pWaitSemaphores + uint32_t swapchainCount + const VkSwapchainKHR* pSwapchains + const uint32_t* pImageIndices + VkResult* pResults + + + VkStructureType sType + const void* pNext + VkDebugReportFlagsEXT flags + PFN_vkDebugReportCallbackEXT pfnCallback + void* pUserData + + + VkStructureType sType + const void* pNext + uint32_t disabledValidationCheckCount + VkValidationCheckEXT* pDisabledValidationChecks + + + VkStructureType sType + const void* pNext + VkRasterizationOrderAMD rasterizationOrder + + + VkStructureType sType + const void* pNext + VkDebugReportObjectTypeEXT objectType + uint64_t object + const char* pObjectName + + + VkStructureType sType + const void* pNext + VkDebugReportObjectTypeEXT objectType + uint64_t object + uint64_t tagName + size_t tagSize + const void* pTag + + + VkStructureType sType + const void* pNext + const char* pMarkerName + float color[4] + + + VkStructureType sType + const void* pNext + VkBool32 dedicatedAllocation + + + VkStructureType sType + const void* pNext + VkBool32 dedicatedAllocation + + + VkStructureType sType + const void* pNext + VkImage image + VkBuffer buffer + + + VkImageFormatProperties imageFormatProperties + VkExternalMemoryFeatureFlagsNV externalMemoryFeatures + VkExternalMemoryHandleTypeFlagsNV exportFromImportedHandleTypes + VkExternalMemoryHandleTypeFlagsNV compatibleHandleTypes + + + VkStructureType sType + const void* pNext + VkExternalMemoryHandleTypeFlagsNV handleTypes + + + VkStructureType sType + const void* pNext + VkExternalMemoryHandleTypeFlagsNV handleTypes + + + VkStructureType sType + const void* pNext + VkExternalMemoryHandleTypeFlagsNV handleType + HANDLE handle + + + VkStructureType sType + const void* pNext + const SECURITY_ATTRIBUTES* pAttributes + DWORD dwAccess + + + VkStructureType sType + const void* pNext + uint32_t acquireCount + const VkDeviceMemory* pAcquireSyncs + const uint64_t* pAcquireKeys + const uint32_t* pAcquireTimeoutMilliseconds + uint32_t releaseCount + const VkDeviceMemory* pReleaseSyncs + const uint64_t* pReleaseKeys + + + + VkStructureType sType + const void* pNext + VkBool32 computeBindingPointSupport + + + VkStructureType sType + const void* pNext + uint32_t maxIndirectCommandsLayoutTokenCount + uint32_t maxObjectEntryCounts + uint32_t minSequenceCountBufferOffsetAlignment + uint32_t minSequenceIndexBufferOffsetAlignment + uint32_t minCommandsTokenBufferOffsetAlignment + + + VkIndirectCommandsTokenTypeNVX tokenType + VkBuffer buffer + VkDeviceSize offset + + + VkIndirectCommandsTokenTypeNVX tokenType + uint32_t bindingUnit + uint32_t dynamicCount + uint32_t divisor + + + VkStructureType sType + const void* pNext + VkPipelineBindPoint pipelineBindPoint + VkIndirectCommandsLayoutUsageFlagsNVX flags + uint32_t tokenCount + const VkIndirectCommandsLayoutTokenNVX* pTokens + + + VkStructureType sType + const void* pNext + VkObjectTableNVX objectTable + VkIndirectCommandsLayoutNVX indirectCommandsLayout + uint32_t indirectCommandsTokenCount + const VkIndirectCommandsTokenNVX* pIndirectCommandsTokens + uint32_t maxSequencesCount + VkCommandBuffer targetCommandBuffer + VkBuffer sequencesCountBuffer + VkDeviceSize sequencesCountOffset + VkBuffer sequencesIndexBuffer + VkDeviceSize sequencesIndexOffset + + + VkStructureType sType + const void* pNext + VkObjectTableNVX objectTable + VkIndirectCommandsLayoutNVX indirectCommandsLayout + uint32_t maxSequencesCount + + + VkStructureType sType + const void* pNext + uint32_t objectCount + const VkObjectEntryTypeNVX* pObjectEntryTypes + const uint32_t* pObjectEntryCounts + const VkObjectEntryUsageFlagsNVX* pObjectEntryUsageFlags + + uint32_t maxUniformBuffersPerDescriptor + uint32_t maxStorageBuffersPerDescriptor + uint32_t maxStorageImagesPerDescriptor + uint32_t maxSampledImagesPerDescriptor + uint32_t maxPipelineLayouts + + + VkObjectEntryTypeNVX type + VkObjectEntryUsageFlagsNVX flags + + + VkObjectEntryTypeNVX type + VkObjectEntryUsageFlagsNVX flags + VkPipeline pipeline + + + VkObjectEntryTypeNVX type + VkObjectEntryUsageFlagsNVX flags + VkPipelineLayout pipelineLayout + VkDescriptorSet descriptorSet + + + VkObjectEntryTypeNVX type + VkObjectEntryUsageFlagsNVX flags + VkBuffer buffer + + + VkObjectEntryTypeNVX type + VkObjectEntryUsageFlagsNVX flags + VkBuffer buffer + VkIndexType indexType + + + VkObjectEntryTypeNVX type + VkObjectEntryUsageFlagsNVX flags + VkPipelineLayout pipelineLayout + VkShaderStageFlags stageFlags + + + VkStructureType sType + void* pNext + VkPhysicalDeviceFeatures features + + + VkStructureType sType + void* pNext + VkPhysicalDeviceProperties properties + + + VkStructureType sType + void* pNext + VkFormatProperties formatProperties + + + VkStructureType sType + void* pNext + VkImageFormatProperties imageFormatProperties + + + VkStructureType sType + const void* pNext + VkFormat format + VkImageType type + VkImageTiling tiling + VkImageUsageFlags usage + VkImageCreateFlags flags + + + VkStructureType sType + void* pNext + VkQueueFamilyProperties queueFamilyProperties + + + VkStructureType sType + void* pNext + VkPhysicalDeviceMemoryProperties memoryProperties + + + VkStructureType sType + void* pNext + VkSparseImageFormatProperties properties + + + VkStructureType sType + const void* pNext + VkFormat format + VkImageType type + VkSampleCountFlagBits samples + VkImageUsageFlags usage + VkImageTiling tiling + + + VkStructureType sType + void* pNext + uint32_t minImageCount + uint32_t maxImageCount + VkExtent2D currentExtent + VkExtent2D minImageExtent + VkExtent2D maxImageExtent + uint32_t maxImageArrayLayers + VkSurfaceTransformFlagsKHR supportedTransforms + VkSurfaceTransformFlagBitsKHR currentTransform + VkCompositeAlphaFlagsKHR supportedCompositeAlpha + VkImageUsageFlags supportedUsageFlags + VkSurfaceCounterFlagsEXT supportedSurfaceCounters + + + VkStructureType sType + const void* pNext + VkDisplayPowerStateEXT powerState + + + VkStructureType sType + const void* pNext + VkDeviceEventTypeEXT deviceEvent + + + VkStructureType sType + const void* pNext + VkDisplayEventTypeEXT displayEvent + + + VkStructureType sType + const void* pNext + VkSurfaceCounterFlagsEXT surfaceCounters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + VkResult vkCreateInstance + const VkInstanceCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkInstance* pInstance + + + void vkDestroyInstance + VkInstance instance + const VkAllocationCallbacks* pAllocator + + + VkResult vkEnumeratePhysicalDevices + VkInstance instance + uint32_t* pPhysicalDeviceCount + VkPhysicalDevice* pPhysicalDevices + + + PFN_vkVoidFunction vkGetDeviceProcAddr + VkDevice device + const char* pName + + + PFN_vkVoidFunction vkGetInstanceProcAddr + VkInstance instance + const char* pName + + + void vkGetPhysicalDeviceProperties + VkPhysicalDevice physicalDevice + VkPhysicalDeviceProperties* pProperties + + + void vkGetPhysicalDeviceQueueFamilyProperties + VkPhysicalDevice physicalDevice + uint32_t* pQueueFamilyPropertyCount + VkQueueFamilyProperties* pQueueFamilyProperties + + + void vkGetPhysicalDeviceMemoryProperties + VkPhysicalDevice physicalDevice + VkPhysicalDeviceMemoryProperties* pMemoryProperties + + + void vkGetPhysicalDeviceFeatures + VkPhysicalDevice physicalDevice + VkPhysicalDeviceFeatures* pFeatures + + + void vkGetPhysicalDeviceFormatProperties + VkPhysicalDevice physicalDevice + VkFormat format + VkFormatProperties* pFormatProperties + + + VkResult vkGetPhysicalDeviceImageFormatProperties + VkPhysicalDevice physicalDevice + VkFormat format + VkImageType type + VkImageTiling tiling + VkImageUsageFlags usage + VkImageCreateFlags flags + VkImageFormatProperties* pImageFormatProperties + + + VkResult vkCreateDevice + VkPhysicalDevice physicalDevice + const VkDeviceCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkDevice* pDevice + + + void vkDestroyDevice + VkDevice device + const VkAllocationCallbacks* pAllocator + + + VkResult vkEnumerateInstanceLayerProperties + uint32_t* pPropertyCount + VkLayerProperties* pProperties + + + VkResult vkEnumerateInstanceExtensionProperties + const char* pLayerName + uint32_t* pPropertyCount + VkExtensionProperties* pProperties + + + VkResult vkEnumerateDeviceLayerProperties + VkPhysicalDevice physicalDevice + uint32_t* pPropertyCount + VkLayerProperties* pProperties + + + VkResult vkEnumerateDeviceExtensionProperties + VkPhysicalDevice physicalDevice + const char* pLayerName + uint32_t* pPropertyCount + VkExtensionProperties* pProperties + + + void vkGetDeviceQueue + VkDevice device + uint32_t queueFamilyIndex + uint32_t queueIndex + VkQueue* pQueue + + + VkResult vkQueueSubmit + VkQueue queue + uint32_t submitCount + const VkSubmitInfo* pSubmits + VkFence fence + + + VkResult vkQueueWaitIdle + VkQueue queue + + + VkResult vkDeviceWaitIdle + VkDevice device + + all sname:VkQueue objects created from pname:device + + + + VkResult vkAllocateMemory + VkDevice device + const VkMemoryAllocateInfo* pAllocateInfo + const VkAllocationCallbacks* pAllocator + VkDeviceMemory* pMemory + + + void vkFreeMemory + VkDevice device + VkDeviceMemory memory + const VkAllocationCallbacks* pAllocator + + + VkResult vkMapMemory + VkDevice device + VkDeviceMemory memory + VkDeviceSize offset + VkDeviceSize size + VkMemoryMapFlags flags + void** ppData + + + void vkUnmapMemory + VkDevice device + VkDeviceMemory memory + + + VkResult vkFlushMappedMemoryRanges + VkDevice device + uint32_t memoryRangeCount + const VkMappedMemoryRange* pMemoryRanges + + + VkResult vkInvalidateMappedMemoryRanges + VkDevice device + uint32_t memoryRangeCount + const VkMappedMemoryRange* pMemoryRanges + + + void vkGetDeviceMemoryCommitment + VkDevice device + VkDeviceMemory memory + VkDeviceSize* pCommittedMemoryInBytes + + + void vkGetBufferMemoryRequirements + VkDevice device + VkBuffer buffer + VkMemoryRequirements* pMemoryRequirements + + + VkResult vkBindBufferMemory + VkDevice device + VkBuffer buffer + VkDeviceMemory memory + VkDeviceSize memoryOffset + + + void vkGetImageMemoryRequirements + VkDevice device + VkImage image + VkMemoryRequirements* pMemoryRequirements + + + VkResult vkBindImageMemory + VkDevice device + VkImage image + VkDeviceMemory memory + VkDeviceSize memoryOffset + + + void vkGetImageSparseMemoryRequirements + VkDevice device + VkImage image + uint32_t* pSparseMemoryRequirementCount + VkSparseImageMemoryRequirements* pSparseMemoryRequirements + + + void vkGetPhysicalDeviceSparseImageFormatProperties + VkPhysicalDevice physicalDevice + VkFormat format + VkImageType type + VkSampleCountFlagBits samples + VkImageUsageFlags usage + VkImageTiling tiling + uint32_t* pPropertyCount + VkSparseImageFormatProperties* pProperties + + + VkResult vkQueueBindSparse + VkQueue queue + uint32_t bindInfoCount + const VkBindSparseInfo* pBindInfo + VkFence fence + + + VkResult vkCreateFence + VkDevice device + const VkFenceCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkFence* pFence + + + void vkDestroyFence + VkDevice device + VkFence fence + const VkAllocationCallbacks* pAllocator + + + VkResult vkResetFences + VkDevice device + uint32_t fenceCount + const VkFence* pFences + + + VkResult vkGetFenceStatus + VkDevice device + VkFence fence + + + VkResult vkWaitForFences + VkDevice device + uint32_t fenceCount + const VkFence* pFences + VkBool32 waitAll + uint64_t timeout + + + VkResult vkCreateSemaphore + VkDevice device + const VkSemaphoreCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkSemaphore* pSemaphore + + + void vkDestroySemaphore + VkDevice device + VkSemaphore semaphore + const VkAllocationCallbacks* pAllocator + + + VkResult vkCreateEvent + VkDevice device + const VkEventCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkEvent* pEvent + + + void vkDestroyEvent + VkDevice device + VkEvent event + const VkAllocationCallbacks* pAllocator + + + VkResult vkGetEventStatus + VkDevice device + VkEvent event + + + VkResult vkSetEvent + VkDevice device + VkEvent event + + + VkResult vkResetEvent + VkDevice device + VkEvent event + + + VkResult vkCreateQueryPool + VkDevice device + const VkQueryPoolCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkQueryPool* pQueryPool + + + void vkDestroyQueryPool + VkDevice device + VkQueryPool queryPool + const VkAllocationCallbacks* pAllocator + + + VkResult vkGetQueryPoolResults + VkDevice device + VkQueryPool queryPool + uint32_t firstQuery + uint32_t queryCount + size_t dataSize + void* pData + VkDeviceSize stride + VkQueryResultFlags flags + + + VkResult vkCreateBuffer + VkDevice device + const VkBufferCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkBuffer* pBuffer + + + void vkDestroyBuffer + VkDevice device + VkBuffer buffer + const VkAllocationCallbacks* pAllocator + + + VkResult vkCreateBufferView + VkDevice device + const VkBufferViewCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkBufferView* pView + + + void vkDestroyBufferView + VkDevice device + VkBufferView bufferView + const VkAllocationCallbacks* pAllocator + + + VkResult vkCreateImage + VkDevice device + const VkImageCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkImage* pImage + + + void vkDestroyImage + VkDevice device + VkImage image + const VkAllocationCallbacks* pAllocator + + + void vkGetImageSubresourceLayout + VkDevice device + VkImage image + const VkImageSubresource* pSubresource + VkSubresourceLayout* pLayout + + + VkResult vkCreateImageView + VkDevice device + const VkImageViewCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkImageView* pView + + + void vkDestroyImageView + VkDevice device + VkImageView imageView + const VkAllocationCallbacks* pAllocator + + + VkResult vkCreateShaderModule + VkDevice device + const VkShaderModuleCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkShaderModule* pShaderModule + + + void vkDestroyShaderModule + VkDevice device + VkShaderModule shaderModule + const VkAllocationCallbacks* pAllocator + + + VkResult vkCreatePipelineCache + VkDevice device + const VkPipelineCacheCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkPipelineCache* pPipelineCache + + + void vkDestroyPipelineCache + VkDevice device + VkPipelineCache pipelineCache + const VkAllocationCallbacks* pAllocator + + + VkResult vkGetPipelineCacheData + VkDevice device + VkPipelineCache pipelineCache + size_t* pDataSize + void* pData + + + VkResult vkMergePipelineCaches + VkDevice device + VkPipelineCache dstCache + uint32_t srcCacheCount + const VkPipelineCache* pSrcCaches + + + VkResult vkCreateGraphicsPipelines + VkDevice device + VkPipelineCache pipelineCache + uint32_t createInfoCount + const VkGraphicsPipelineCreateInfo* pCreateInfos + const VkAllocationCallbacks* pAllocator + VkPipeline* pPipelines + + + VkResult vkCreateComputePipelines + VkDevice device + VkPipelineCache pipelineCache + uint32_t createInfoCount + const VkComputePipelineCreateInfo* pCreateInfos + const VkAllocationCallbacks* pAllocator + VkPipeline* pPipelines + + + void vkDestroyPipeline + VkDevice device + VkPipeline pipeline + const VkAllocationCallbacks* pAllocator + + + VkResult vkCreatePipelineLayout + VkDevice device + const VkPipelineLayoutCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkPipelineLayout* pPipelineLayout + + + void vkDestroyPipelineLayout + VkDevice device + VkPipelineLayout pipelineLayout + const VkAllocationCallbacks* pAllocator + + + VkResult vkCreateSampler + VkDevice device + const VkSamplerCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkSampler* pSampler + + + void vkDestroySampler + VkDevice device + VkSampler sampler + const VkAllocationCallbacks* pAllocator + + + VkResult vkCreateDescriptorSetLayout + VkDevice device + const VkDescriptorSetLayoutCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkDescriptorSetLayout* pSetLayout + + + void vkDestroyDescriptorSetLayout + VkDevice device + VkDescriptorSetLayout descriptorSetLayout + const VkAllocationCallbacks* pAllocator + + + VkResult vkCreateDescriptorPool + VkDevice device + const VkDescriptorPoolCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkDescriptorPool* pDescriptorPool + + + void vkDestroyDescriptorPool + VkDevice device + VkDescriptorPool descriptorPool + const VkAllocationCallbacks* pAllocator + + + VkResult vkResetDescriptorPool + VkDevice device + VkDescriptorPool descriptorPool + VkDescriptorPoolResetFlags flags + + any sname:VkDescriptorSet objects allocated from pname:descriptorPool + + + + VkResult vkAllocateDescriptorSets + VkDevice device + const VkDescriptorSetAllocateInfo* pAllocateInfo + VkDescriptorSet* pDescriptorSets + + + VkResult vkFreeDescriptorSets + VkDevice device + VkDescriptorPool descriptorPool + uint32_t descriptorSetCount + const VkDescriptorSet* pDescriptorSets + + + void vkUpdateDescriptorSets + VkDevice device + uint32_t descriptorWriteCount + const VkWriteDescriptorSet* pDescriptorWrites + uint32_t descriptorCopyCount + const VkCopyDescriptorSet* pDescriptorCopies + + + VkResult vkCreateFramebuffer + VkDevice device + const VkFramebufferCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkFramebuffer* pFramebuffer + + + void vkDestroyFramebuffer + VkDevice device + VkFramebuffer framebuffer + const VkAllocationCallbacks* pAllocator + + + VkResult vkCreateRenderPass + VkDevice device + const VkRenderPassCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkRenderPass* pRenderPass + + + void vkDestroyRenderPass + VkDevice device + VkRenderPass renderPass + const VkAllocationCallbacks* pAllocator + + + void vkGetRenderAreaGranularity + VkDevice device + VkRenderPass renderPass + VkExtent2D* pGranularity + + + VkResult vkCreateCommandPool + VkDevice device + const VkCommandPoolCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkCommandPool* pCommandPool + + + void vkDestroyCommandPool + VkDevice device + VkCommandPool commandPool + const VkAllocationCallbacks* pAllocator + + + VkResult vkResetCommandPool + VkDevice device + VkCommandPool commandPool + VkCommandPoolResetFlags flags + + + VkResult vkAllocateCommandBuffers + VkDevice device + const VkCommandBufferAllocateInfo* pAllocateInfo + VkCommandBuffer* pCommandBuffers + + + void vkFreeCommandBuffers + VkDevice device + VkCommandPool commandPool + uint32_t commandBufferCount + const VkCommandBuffer* pCommandBuffers + + + VkResult vkBeginCommandBuffer + VkCommandBuffer commandBuffer + const VkCommandBufferBeginInfo* pBeginInfo + + the sname:VkCommandPool that pname:commandBuffer was allocated from + + + + VkResult vkEndCommandBuffer + VkCommandBuffer commandBuffer + + the sname:VkCommandPool that pname:commandBuffer was allocated from + + + + VkResult vkResetCommandBuffer + VkCommandBuffer commandBuffer + VkCommandBufferResetFlags flags + + + void vkCmdBindPipeline + VkCommandBuffer commandBuffer + VkPipelineBindPoint pipelineBindPoint + VkPipeline pipeline + + + void vkCmdSetViewport + VkCommandBuffer commandBuffer + uint32_t firstViewport + uint32_t viewportCount + const VkViewport* pViewports + + + void vkCmdSetScissor + VkCommandBuffer commandBuffer + uint32_t firstScissor + uint32_t scissorCount + const VkRect2D* pScissors + + + void vkCmdSetLineWidth + VkCommandBuffer commandBuffer + float lineWidth + + + void vkCmdSetDepthBias + VkCommandBuffer commandBuffer + float depthBiasConstantFactor + float depthBiasClamp + float depthBiasSlopeFactor + + + void vkCmdSetBlendConstants + VkCommandBuffer commandBuffer + const float blendConstants[4] + + + void vkCmdSetDepthBounds + VkCommandBuffer commandBuffer + float minDepthBounds + float maxDepthBounds + + + void vkCmdSetStencilCompareMask + VkCommandBuffer commandBuffer + VkStencilFaceFlags faceMask + uint32_t compareMask + + + void vkCmdSetStencilWriteMask + VkCommandBuffer commandBuffer + VkStencilFaceFlags faceMask + uint32_t writeMask + + + void vkCmdSetStencilReference + VkCommandBuffer commandBuffer + VkStencilFaceFlags faceMask + uint32_t reference + + + void vkCmdBindDescriptorSets + VkCommandBuffer commandBuffer + VkPipelineBindPoint pipelineBindPoint + VkPipelineLayout layout + uint32_t firstSet + uint32_t descriptorSetCount + const VkDescriptorSet* pDescriptorSets + uint32_t dynamicOffsetCount + const uint32_t* pDynamicOffsets + + + void vkCmdBindIndexBuffer + VkCommandBuffer commandBuffer + VkBuffer buffer + VkDeviceSize offset + VkIndexType indexType + + + void vkCmdBindVertexBuffers + VkCommandBuffer commandBuffer + uint32_t firstBinding + uint32_t bindingCount + const VkBuffer* pBuffers + const VkDeviceSize* pOffsets + + + void vkCmdDraw + VkCommandBuffer commandBuffer + uint32_t vertexCount + uint32_t instanceCount + uint32_t firstVertex + uint32_t firstInstance + + + void vkCmdDrawIndexed + VkCommandBuffer commandBuffer + uint32_t indexCount + uint32_t instanceCount + uint32_t firstIndex + int32_t vertexOffset + uint32_t firstInstance + + + void vkCmdDrawIndirect + VkCommandBuffer commandBuffer + VkBuffer buffer + VkDeviceSize offset + uint32_t drawCount + uint32_t stride + + + void vkCmdDrawIndexedIndirect + VkCommandBuffer commandBuffer + VkBuffer buffer + VkDeviceSize offset + uint32_t drawCount + uint32_t stride + + + void vkCmdDispatch + VkCommandBuffer commandBuffer + uint32_t x + uint32_t y + uint32_t z + + + void vkCmdDispatchIndirect + VkCommandBuffer commandBuffer + VkBuffer buffer + VkDeviceSize offset + + + void vkCmdCopyBuffer + VkCommandBuffer commandBuffer + VkBuffer srcBuffer + VkBuffer dstBuffer + uint32_t regionCount + const VkBufferCopy* pRegions + + + void vkCmdCopyImage + VkCommandBuffer commandBuffer + VkImage srcImage + VkImageLayout srcImageLayout + VkImage dstImage + VkImageLayout dstImageLayout + uint32_t regionCount + const VkImageCopy* pRegions + + + void vkCmdBlitImage + VkCommandBuffer commandBuffer + VkImage srcImage + VkImageLayout srcImageLayout + VkImage dstImage + VkImageLayout dstImageLayout + uint32_t regionCount + const VkImageBlit* pRegions + VkFilter filter + + + void vkCmdCopyBufferToImage + VkCommandBuffer commandBuffer + VkBuffer srcBuffer + VkImage dstImage + VkImageLayout dstImageLayout + uint32_t regionCount + const VkBufferImageCopy* pRegions + + + void vkCmdCopyImageToBuffer + VkCommandBuffer commandBuffer + VkImage srcImage + VkImageLayout srcImageLayout + VkBuffer dstBuffer + uint32_t regionCount + const VkBufferImageCopy* pRegions + + + void vkCmdUpdateBuffer + VkCommandBuffer commandBuffer + VkBuffer dstBuffer + VkDeviceSize dstOffset + VkDeviceSize dataSize + const void* pData + + + void vkCmdFillBuffer + VkCommandBuffer commandBuffer + VkBuffer dstBuffer + VkDeviceSize dstOffset + VkDeviceSize size + uint32_t data + + + void vkCmdClearColorImage + VkCommandBuffer commandBuffer + VkImage image + VkImageLayout imageLayout + const VkClearColorValue* pColor + uint32_t rangeCount + const VkImageSubresourceRange* pRanges + + + void vkCmdClearDepthStencilImage + VkCommandBuffer commandBuffer + VkImage image + VkImageLayout imageLayout + const VkClearDepthStencilValue* pDepthStencil + uint32_t rangeCount + const VkImageSubresourceRange* pRanges + + + void vkCmdClearAttachments + VkCommandBuffer commandBuffer + uint32_t attachmentCount + const VkClearAttachment* pAttachments + uint32_t rectCount + const VkClearRect* pRects + + + void vkCmdResolveImage + VkCommandBuffer commandBuffer + VkImage srcImage + VkImageLayout srcImageLayout + VkImage dstImage + VkImageLayout dstImageLayout + uint32_t regionCount + const VkImageResolve* pRegions + + + void vkCmdSetEvent + VkCommandBuffer commandBuffer + VkEvent event + VkPipelineStageFlags stageMask + + + void vkCmdResetEvent + VkCommandBuffer commandBuffer + VkEvent event + VkPipelineStageFlags stageMask + + + void vkCmdWaitEvents + VkCommandBuffer commandBuffer + uint32_t eventCount + const VkEvent* pEvents + VkPipelineStageFlags srcStageMask + VkPipelineStageFlags dstStageMask + uint32_t memoryBarrierCount + const VkMemoryBarrier* pMemoryBarriers + uint32_t bufferMemoryBarrierCount + const VkBufferMemoryBarrier* pBufferMemoryBarriers + uint32_t imageMemoryBarrierCount + const VkImageMemoryBarrier* pImageMemoryBarriers + + + void vkCmdPipelineBarrier + VkCommandBuffer commandBuffer + VkPipelineStageFlags srcStageMask + VkPipelineStageFlags dstStageMask + VkDependencyFlags dependencyFlags + uint32_t memoryBarrierCount + const VkMemoryBarrier* pMemoryBarriers + uint32_t bufferMemoryBarrierCount + const VkBufferMemoryBarrier* pBufferMemoryBarriers + uint32_t imageMemoryBarrierCount + const VkImageMemoryBarrier* pImageMemoryBarriers + + + void vkCmdBeginQuery + VkCommandBuffer commandBuffer + VkQueryPool queryPool + uint32_t query + VkQueryControlFlags flags + + + void vkCmdEndQuery + VkCommandBuffer commandBuffer + VkQueryPool queryPool + uint32_t query + + + void vkCmdResetQueryPool + VkCommandBuffer commandBuffer + VkQueryPool queryPool + uint32_t firstQuery + uint32_t queryCount + + + void vkCmdWriteTimestamp + VkCommandBuffer commandBuffer + VkPipelineStageFlagBits pipelineStage + VkQueryPool queryPool + uint32_t query + + + void vkCmdCopyQueryPoolResults + VkCommandBuffer commandBuffer + VkQueryPool queryPool + uint32_t firstQuery + uint32_t queryCount + VkBuffer dstBuffer + VkDeviceSize dstOffset + VkDeviceSize stride + VkQueryResultFlags flags + + + void vkCmdPushConstants + VkCommandBuffer commandBuffer + VkPipelineLayout layout + VkShaderStageFlags stageFlags + uint32_t offset + uint32_t size + const void* pValues + + + void vkCmdBeginRenderPass + VkCommandBuffer commandBuffer + const VkRenderPassBeginInfo* pRenderPassBegin + VkSubpassContents contents + + + void vkCmdNextSubpass + VkCommandBuffer commandBuffer + VkSubpassContents contents + + + void vkCmdEndRenderPass + VkCommandBuffer commandBuffer + + + void vkCmdExecuteCommands + VkCommandBuffer commandBuffer + uint32_t commandBufferCount + const VkCommandBuffer* pCommandBuffers + + + VkResult vkCreateAndroidSurfaceKHR + VkInstance instance + const VkAndroidSurfaceCreateInfoKHR* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkSurfaceKHR* pSurface + + + VkResult vkGetPhysicalDeviceDisplayPropertiesKHR + VkPhysicalDevice physicalDevice + uint32_t* pPropertyCount + VkDisplayPropertiesKHR* pProperties + + + VkResult vkGetPhysicalDeviceDisplayPlanePropertiesKHR + VkPhysicalDevice physicalDevice + uint32_t* pPropertyCount + VkDisplayPlanePropertiesKHR* pProperties + + + VkResult vkGetDisplayPlaneSupportedDisplaysKHR + VkPhysicalDevice physicalDevice + uint32_t planeIndex + uint32_t* pDisplayCount + VkDisplayKHR* pDisplays + + + VkResult vkGetDisplayModePropertiesKHR + VkPhysicalDevice physicalDevice + VkDisplayKHR display + uint32_t* pPropertyCount + VkDisplayModePropertiesKHR* pProperties + + + VkResult vkCreateDisplayModeKHR + VkPhysicalDevice physicalDevice + VkDisplayKHR display + const VkDisplayModeCreateInfoKHR* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkDisplayModeKHR* pMode + + + VkResult vkGetDisplayPlaneCapabilitiesKHR + VkPhysicalDevice physicalDevice + VkDisplayModeKHR mode + uint32_t planeIndex + VkDisplayPlaneCapabilitiesKHR* pCapabilities + + + VkResult vkCreateDisplayPlaneSurfaceKHR + VkInstance instance + const VkDisplaySurfaceCreateInfoKHR* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkSurfaceKHR* pSurface + + + VkResult vkCreateSharedSwapchainsKHR + VkDevice device + uint32_t swapchainCount + const VkSwapchainCreateInfoKHR* pCreateInfos + const VkAllocationCallbacks* pAllocator + VkSwapchainKHR* pSwapchains + + + VkResult vkCreateMirSurfaceKHR + VkInstance instance + const VkMirSurfaceCreateInfoKHR* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkSurfaceKHR* pSurface + + + VkBool32 vkGetPhysicalDeviceMirPresentationSupportKHR + VkPhysicalDevice physicalDevice + uint32_t queueFamilyIndex + MirConnection* connection + + + void vkDestroySurfaceKHR + VkInstance instance + VkSurfaceKHR surface + const VkAllocationCallbacks* pAllocator + + + VkResult vkGetPhysicalDeviceSurfaceSupportKHR + VkPhysicalDevice physicalDevice + uint32_t queueFamilyIndex + VkSurfaceKHR surface + VkBool32* pSupported + + + VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR + VkPhysicalDevice physicalDevice + VkSurfaceKHR surface + VkSurfaceCapabilitiesKHR* pSurfaceCapabilities + + + VkResult vkGetPhysicalDeviceSurfaceFormatsKHR + VkPhysicalDevice physicalDevice + VkSurfaceKHR surface + uint32_t* pSurfaceFormatCount + VkSurfaceFormatKHR* pSurfaceFormats + + + VkResult vkGetPhysicalDeviceSurfacePresentModesKHR + VkPhysicalDevice physicalDevice + VkSurfaceKHR surface + uint32_t* pPresentModeCount + VkPresentModeKHR* pPresentModes + + + VkResult vkCreateSwapchainKHR + VkDevice device + const VkSwapchainCreateInfoKHR* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkSwapchainKHR* pSwapchain + + + void vkDestroySwapchainKHR + VkDevice device + VkSwapchainKHR swapchain + const VkAllocationCallbacks* pAllocator + + + VkResult vkGetSwapchainImagesKHR + VkDevice device + VkSwapchainKHR swapchain + uint32_t* pSwapchainImageCount + VkImage* pSwapchainImages + + + VkResult vkAcquireNextImageKHR + VkDevice device + VkSwapchainKHR swapchain + uint64_t timeout + VkSemaphore semaphore + VkFence fence + uint32_t* pImageIndex + + + VkResult vkQueuePresentKHR + VkQueue queue + const VkPresentInfoKHR* pPresentInfo + + + VkResult vkCreateViSurfaceNN + VkInstance instance + const VkViSurfaceCreateInfoNN* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkSurfaceKHR* pSurface + + + VkResult vkCreateWaylandSurfaceKHR + VkInstance instance + const VkWaylandSurfaceCreateInfoKHR* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkSurfaceKHR* pSurface + + + VkBool32 vkGetPhysicalDeviceWaylandPresentationSupportKHR + VkPhysicalDevice physicalDevice + uint32_t queueFamilyIndex + struct wl_display* display + + + VkResult vkCreateWin32SurfaceKHR + VkInstance instance + const VkWin32SurfaceCreateInfoKHR* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkSurfaceKHR* pSurface + + + VkBool32 vkGetPhysicalDeviceWin32PresentationSupportKHR + VkPhysicalDevice physicalDevice + uint32_t queueFamilyIndex + + + VkResult vkCreateXlibSurfaceKHR + VkInstance instance + const VkXlibSurfaceCreateInfoKHR* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkSurfaceKHR* pSurface + + + VkBool32 vkGetPhysicalDeviceXlibPresentationSupportKHR + VkPhysicalDevice physicalDevice + uint32_t queueFamilyIndex + Display* dpy + VisualID visualID + + + VkResult vkCreateXcbSurfaceKHR + VkInstance instance + const VkXcbSurfaceCreateInfoKHR* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkSurfaceKHR* pSurface + + + VkBool32 vkGetPhysicalDeviceXcbPresentationSupportKHR + VkPhysicalDevice physicalDevice + uint32_t queueFamilyIndex + xcb_connection_t* connection + xcb_visualid_t visual_id + + + VkResult vkCreateDebugReportCallbackEXT + VkInstance instance + const VkDebugReportCallbackCreateInfoEXT* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkDebugReportCallbackEXT* pCallback + + + void vkDestroyDebugReportCallbackEXT + VkInstance instance + VkDebugReportCallbackEXT callback + const VkAllocationCallbacks* pAllocator + + + void vkDebugReportMessageEXT + VkInstance instance + VkDebugReportFlagsEXT flags + VkDebugReportObjectTypeEXT objectType + uint64_t object + size_t location + int32_t messageCode + const char* pLayerPrefix + const char* pMessage + + + VkResult vkDebugMarkerSetObjectNameEXT + VkDevice device + VkDebugMarkerObjectNameInfoEXT* pNameInfo + + + VkResult vkDebugMarkerSetObjectTagEXT + VkDevice device + VkDebugMarkerObjectTagInfoEXT* pTagInfo + + + void vkCmdDebugMarkerBeginEXT + VkCommandBuffer commandBuffer + VkDebugMarkerMarkerInfoEXT* pMarkerInfo + + + void vkCmdDebugMarkerEndEXT + VkCommandBuffer commandBuffer + + + void vkCmdDebugMarkerInsertEXT + VkCommandBuffer commandBuffer + VkDebugMarkerMarkerInfoEXT* pMarkerInfo + + + VkResult vkGetPhysicalDeviceExternalImageFormatPropertiesNV + VkPhysicalDevice physicalDevice + VkFormat format + VkImageType type + VkImageTiling tiling + VkImageUsageFlags usage + VkImageCreateFlags flags + VkExternalMemoryHandleTypeFlagsNV externalHandleType + VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties + + + VkResult vkGetMemoryWin32HandleNV + VkDevice device + VkDeviceMemory memory + VkExternalMemoryHandleTypeFlagsNV handleType + HANDLE* pHandle + + + void vkCmdDrawIndirectCountAMD + VkCommandBuffer commandBuffer + VkBuffer buffer + VkDeviceSize offset + VkBuffer countBuffer + VkDeviceSize countBufferOffset + uint32_t maxDrawCount + uint32_t stride + + + void vkCmdDrawIndexedIndirectCountAMD + VkCommandBuffer commandBuffer + VkBuffer buffer + VkDeviceSize offset + VkBuffer countBuffer + VkDeviceSize countBufferOffset + uint32_t maxDrawCount + uint32_t stride + + + void vkCmdProcessCommandsNVX + VkCommandBuffer commandBuffer + const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo + + + void vkCmdReserveSpaceForCommandsNVX + VkCommandBuffer commandBuffer + const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo + + + VkResult vkCreateIndirectCommandsLayoutNVX + VkDevice device + const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout + + + void vkDestroyIndirectCommandsLayoutNVX + VkDevice device + VkIndirectCommandsLayoutNVX indirectCommandsLayout + const VkAllocationCallbacks* pAllocator + + + VkResult vkCreateObjectTableNVX + VkDevice device + const VkObjectTableCreateInfoNVX* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkObjectTableNVX* pObjectTable + + + void vkDestroyObjectTableNVX + VkDevice device + VkObjectTableNVX objectTable + const VkAllocationCallbacks* pAllocator + + + VkResult vkRegisterObjectsNVX + VkDevice device + VkObjectTableNVX objectTable + uint32_t objectCount + const VkObjectTableEntryNVX* const* ppObjectTableEntries + const uint32_t* pObjectIndices + + + VkResult vkUnregisterObjectsNVX + VkDevice device + VkObjectTableNVX objectTable + uint32_t objectCount + const VkObjectEntryTypeNVX* pObjectEntryTypes + const uint32_t* pObjectIndices + + + void vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX + VkPhysicalDevice physicalDevice + VkDeviceGeneratedCommandsFeaturesNVX* pFeatures + VkDeviceGeneratedCommandsLimitsNVX* pLimits + + + void vkGetPhysicalDeviceFeatures2KHR + VkPhysicalDevice physicalDevice + VkPhysicalDeviceFeatures2KHR* pFeatures + + + void vkGetPhysicalDeviceProperties2KHR + VkPhysicalDevice physicalDevice + VkPhysicalDeviceProperties2KHR* pProperties + + + void vkGetPhysicalDeviceFormatProperties2KHR + VkPhysicalDevice physicalDevice + VkFormat format + VkFormatProperties2KHR* pFormatProperties + + + VkResult vkGetPhysicalDeviceImageFormatProperties2KHR + VkPhysicalDevice physicalDevice + const VkPhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo + VkImageFormatProperties2KHR* pImageFormatProperties + + + void vkGetPhysicalDeviceQueueFamilyProperties2KHR + VkPhysicalDevice physicalDevice + uint32_t* pQueueFamilyPropertyCount + VkQueueFamilyProperties2KHR* pQueueFamilyProperties + + + void vkGetPhysicalDeviceMemoryProperties2KHR + VkPhysicalDevice physicalDevice + VkPhysicalDeviceMemoryProperties2KHR* pMemoryProperties + + + void vkGetPhysicalDeviceSparseImageFormatProperties2KHR + VkPhysicalDevice physicalDevice + const VkPhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo + uint32_t* pPropertyCount + VkSparseImageFormatProperties2KHR* pProperties + + + void vkTrimCommandPoolKHR + VkDevice device + VkCommandPool commandPool + VkCommandPoolTrimFlagsKHR flags + + + VkResult vkReleaseDisplayEXT + VkPhysicalDevice physicalDevice + VkDisplayKHR display + + + VkResult vkAcquireXlibDisplayEXT + VkPhysicalDevice physicalDevice + Display* dpy + VkDisplayKHR display + + + VkResult vkGetRandROutputDisplayEXT + VkPhysicalDevice physicalDevice + Display* dpy + RROutput rrOutput + VkDisplayKHR* pDisplay + + + VkResult vkDisplayPowerControlEXT + VkDevice device + VkDisplayKHR display + const VkDisplayPowerInfoEXT* pDisplayPowerInfo + + + VkResult vkRegisterDeviceEventEXT + VkDevice device + const VkDeviceEventInfoEXT* pDeviceEventInfo + const VkAllocationCallbacks* pAllocator + VkFence* pFence + + + VkResult vkRegisterDisplayEventEXT + VkDevice device + VkDisplayKHR display + const VkDisplayEventInfoEXT* pDisplayEventInfo + const VkAllocationCallbacks* pAllocator + VkFence* pFence + + + VkResult vkGetSwapchainCounterEXT + VkDevice device + VkSwapchainKHR swapchain + VkSurfaceCounterFlagBitsEXT counter + uint64_t* pCounterValue + + + VkResult vkGetPhysicalDeviceSurfaceCapabilities2EXT + VkPhysicalDevice physicalDevice + VkSurfaceKHR surface + VkSurfaceCapabilities2EXT* pSurfaceCapabilities + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/gui/vulkan/vulkan.pri b/src/gui/vulkan/vulkan.pri new file mode 100644 index 0000000000..25635a84c4 --- /dev/null +++ b/src/gui/vulkan/vulkan.pri @@ -0,0 +1,47 @@ +qtConfig(vulkan) { + HEADERS += \ + vulkan/qvulkaninstance.h \ + vulkan/qplatformvulkaninstance.h + + SOURCES += \ + vulkan/qvulkaninstance.cpp \ + vulkan/qplatformvulkaninstance.cpp \ + vulkan/qvulkanfunctions.cpp + + # Applications must inherit the Vulkan header include path. + QMAKE_USE += vulkan/nolink +} + +# Generate qvulkanfunctions.h, qvulkanfunctions_p.h, qvulkanfunctions_p.cpp +QMAKE_QVKGEN_INPUT = vulkan/vk.xml +QMAKE_QVKGEN_LICENSE_HEADER = $$QT_SOURCE_TREE/header.LGPL +qtPrepareTool(QMAKE_QVKGEN, qvkgen) + +qvkgen_h.commands = $$QMAKE_QVKGEN ${QMAKE_FILE_IN} $$shell_quote($$QMAKE_QVKGEN_LICENSE_HEADER) ${QMAKE_FILE_OUT_PATH}/${QMAKE_FILE_OUT_BASE} +qvkgen_h.output = vulkan/qvulkanfunctions.h +qvkgen_h.input = QMAKE_QVKGEN_INPUT +qtConfig(vulkan): \ + qvkgen_h.variable_out = HEADERS +else: \ + qvkgen_h.CONFIG += target_predeps no_link +QMAKE_EXTRA_COMPILERS += qvkgen_h + +qvkgen_ph.commands = $$escape_expand(\\n) +qvkgen_ph.output = vulkan/qvulkanfunctions_p.h +qvkgen_ph.input = QMAKE_QVKGEN_INPUT +qvkgen_ph.depends += vulkan/qvulkanfunctions.h +qtConfig(vulkan): \ + qvkgen_ph.variable_out = HEADERS +else: \ + qvkgen_ph.CONFIG += target_predeps no_link +QMAKE_EXTRA_COMPILERS += qvkgen_ph + +qvkgen_pimpl.commands = $$escape_expand(\\n) +qvkgen_pimpl.output = vulkan/qvulkanfunctions_p.cpp +qvkgen_pimpl.input = QMAKE_QVKGEN_INPUT +qvkgen_pimpl.depends += vulkan/qvulkanfunctions_p.h +qtConfig(vulkan): \ + qvkgen_pimpl.variable_out = SOURCES +else: \ + qvkgen_pimpl.CONFIG += target_predeps no_link +QMAKE_EXTRA_COMPILERS += qvkgen_pimpl -- cgit v1.2.3