diff options
Diffstat (limited to 'src/gui/vulkan')
-rw-r--r-- | src/gui/vulkan/KHRONOS_LICENSE.txt | 20 | ||||
-rw-r--r-- | src/gui/vulkan/qplatformvulkaninstance.cpp | 88 | ||||
-rw-r--r-- | src/gui/vulkan/qplatformvulkaninstance.h | 91 | ||||
-rw-r--r-- | src/gui/vulkan/qt_attribution.json | 17 | ||||
-rw-r--r-- | src/gui/vulkan/qvulkanfunctions.cpp | 177 | ||||
-rw-r--r-- | src/gui/vulkan/qvulkaninstance.cpp | 894 | ||||
-rw-r--r-- | src/gui/vulkan/qvulkaninstance.h | 198 | ||||
-rw-r--r-- | src/gui/vulkan/qvulkanwindow.cpp | 2719 | ||||
-rw-r--r-- | src/gui/vulkan/qvulkanwindow.h | 161 | ||||
-rw-r--r-- | src/gui/vulkan/qvulkanwindow_p.h | 188 | ||||
-rw-r--r-- | src/gui/vulkan/vk.xml | 5269 | ||||
-rw-r--r-- | src/gui/vulkan/vulkan.pri | 52 |
12 files changed, 9874 insertions, 0 deletions
diff --git a/src/gui/vulkan/KHRONOS_LICENSE.txt b/src/gui/vulkan/KHRONOS_LICENSE.txt new file mode 100644 index 0000000000..7f6672d50e --- /dev/null +++ b/src/gui/vulkan/KHRONOS_LICENSE.txt @@ -0,0 +1,20 @@ +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. 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..9470e2d0b4 --- /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 <QtGui/qtguiglobal.h> + +#if QT_CONFIG(vulkan) || defined(Q_CLANG_QDOC) + +#include <qvulkaninstance.h> + +QT_BEGIN_NAMESPACE + +class QPlatformVulkanInstancePrivate; + +class Q_GUI_EXPORT QPlatformVulkanInstance +{ + Q_DECLARE_PRIVATE(QPlatformVulkanInstance) + +public: + QPlatformVulkanInstance(); + virtual ~QPlatformVulkanInstance(); + + virtual QVulkanInfoVector<QVulkanLayer> supportedLayers() const = 0; + virtual QVulkanInfoVector<QVulkanExtension> 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<QPlatformVulkanInstancePrivate> d_ptr; + Q_DISABLE_COPY(QPlatformVulkanInstance) +}; + +QT_END_NAMESPACE + +#endif // QT_CONFIG(vulkan) + +#endif // QPLATFORMVULKANINSTANCE_H diff --git a/src/gui/vulkan/qt_attribution.json b/src/gui/vulkan/qt_attribution.json new file mode 100644 index 0000000000..3c09e9f498 --- /dev/null +++ b/src/gui/vulkan/qt_attribution.json @@ -0,0 +1,17 @@ +[ + { + "Id": "vulkan-xml-spec", + "Name": "Vulkan API Registry", + "QDocModule": "qtgui", + "Description": "Vulkan XML API Registry.", + "QtUsage": "Used to dynamically generate the sources for the QVulkan(Device)Functions classes.", + "Path": "vk.xml", + + "Homepage": "https://www.khronos.org/", + "Version": "1.0.39", + "License": "MIT License", + "LicenseId": "MIT", + "LicenseFile": "KHRONOS_LICENSE.txt", + "Copyright": "Copyright (c) 2015-2017 The Khronos Group Inc." + } +] diff --git a/src/gui/vulkan/qvulkanfunctions.cpp b/src/gui/vulkan/qvulkanfunctions.cpp new file mode 100644 index 0000000000..c5f9616d20 --- /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 <private/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..8f364328d6 --- /dev/null +++ b/src/gui/vulkan/qvulkaninstance.cpp @@ -0,0 +1,894 @@ +/**************************************************************************** +** +** 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 <private/qvulkanfunctions_p.h> +#include <qpa/qplatformvulkaninstance.h> +#include <qpa/qplatformintegration.h> +#include <qpa/qplatformnativeinterface.h> +#include <QtGui/private/qguiapplication_p.h> + +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() \e before invoking create(). + + To enable additional layers and extensions, provide the list via + setLayers() and setExtensions() \e 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 and QVulkanDeviceFunctions objects accessible via + functions() and deviceFunctions(). + + \note QVulkanFunctions and QVulkanDeviceFunctions are generated from the + Vulkan API XML specifications when building the Qt libraries. Therefore no + documentation is provided for them. They contain the Vulkan 1.0 functions + with the same signatures as described in the + \l{https://www.khronos.org/registry/vulkan/specs/1.0/html/}{Vulkan API + documentation}. + + \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<QPlatformVulkanInstance> platformInst; + VkInstance vkInst; + QVulkanInstance::Flags flags; + QByteArrayList layers; + QByteArrayList extensions; + QVersionNumber apiVersion; + VkResult errorCode; + QScopedPointer<QVulkanFunctions> funcs; + QHash<VkDevice, QVulkanDeviceFunctions *> 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(); +} + +/*! + \class QVulkanLayer + \brief Represents information about a Vulkan layer. + */ + +/*! + \variable QVulkanLayer::name + \brief The name of the layer. + */ + +/*! + \variable QVulkanLayer::version + \brief The version of the layer. This is an integer, increasing with each backward + compatible change. + */ + +/*! + \variable QVulkanLayer::specVersion + \brief The Vulkan version the layer was written against. + */ + +/*! + \variable QVulkanLayer::description + \brief The description of the layer. + */ + +/*! + \fn bool operator==(const QVulkanLayer &lhs, const QVulkanLayer &rhs) + \since 5.10 + \relates QVulkanLayer + + Returns \c true if Vulkan layers \a lhs and \a rhs have + the same name, version, and spec version. +*/ + +/*! + \fn bool operator!=(const QVulkanLayer &lhs, const QVulkanLayer &rhs) + \since 5.10 + \relates QVulkanLayer + + Returns \c true if Vulkan layers \a lhs and \a rhs have + different name, version, or spec version. +*/ + +/*! + \fn uint qHash(const QVulkanLayer &key, uint seed) + \since 5.10 + \relates QVulkanLayer + + Returns the hash value for the \a key, using \a seed to seed the + calculation. +*/ + +/*! + \class QVulkanExtension + \brief Represents information about a Vulkan extension. + */ + +/*! + \variable QVulkanExtension::name + \brief The name of the extension. + */ + +/*! + \variable QVulkanExtension::version + \brief The version of the extension. This is an integer, increasing with each backward + compatible change. + */ + +/*! + \fn bool operator==(const QVulkanExtension &lhs, const QVulkanExtension &rhs) + \since 5.10 + \relates QVulkanExtension + + Returns \c true if Vulkan extensions \a lhs and \a rhs are have the + same name and version. +*/ + +/*! + \fn bool operator!=(const QVulkanExtension &lhs, const QVulkanExtension &rhs) + \since 5.10 + \relates QVulkanExtension + + Returns \c true if Vulkan extensions \a lhs and \a rhs are have different + name or version. +*/ + +/*! + \fn uint qHash(const QVulkanExtension &key, uint seed) + \since 5.10 + \relates QVulkanExtension + + Returns the hash value for the \a key, using \a seed to seed the + calculation. +*/ + +/*! + \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<QVulkanLayer> QVulkanInstance::supportedLayers() +{ + return d_ptr->ensureVulkan() ? d_ptr->platformInst->supportedLayers() : QVulkanInfoVector<QVulkanLayer>(); +} + +/*! + \return the list of supported instance-level extensions. + + \note This function can be called before create(). + */ +QVulkanInfoVector<QVulkanExtension> QVulkanInstance::supportedExtensions() +{ + return d_ptr->ensureVulkan() ? d_ptr->platformInst->supportedExtensions() : QVulkanInfoVector<QVulkanExtension>(); +} + +/*! + 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 prefer using the function wrappers retrievable from + functions() and deviceFunctions() instead. + */ +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<VkSurfaceKHR *>(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..ada297be43 --- /dev/null +++ b/src/gui/vulkan/qvulkaninstance.h @@ -0,0 +1,198 @@ +/**************************************************************************** +** +** 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 <QtGui/qtguiglobal.h> + +#if QT_CONFIG(vulkan) || defined(Q_CLANG_QDOC) + +#ifndef VK_NO_PROTOTYPES +#define VK_NO_PROTOTYPES +#endif +#ifndef Q_CLANG_QDOC +#include <vulkan/vulkan.h> +#else +typedef void* PFN_vkVoidFunction; +typedef unsigned long VkSurfaceKHR; +typedef unsigned long VkImage; +typedef unsigned long VkImageView; +#endif + +#include <QtCore/qhashfunctions.h> +#include <QtCore/qscopedpointer.h> +#include <QtCore/qvector.h> +#include <QtCore/qbytearraylist.h> +#include <QtCore/qversionnumber.h> +#include <QtCore/qdebug.h> + +QT_BEGIN_NAMESPACE + +class QVulkanInstancePrivate; +class QPlatformVulkanInstance; +class QVulkanFunctions; +class QVulkanDeviceFunctions; +class QWindow; + +struct QVulkanLayer +{ + QByteArray name; + uint32_t version; + QVersionNumber specVersion; + QByteArray description; +}; +Q_DECLARE_TYPEINFO(QVulkanLayer, Q_MOVABLE_TYPE); + +inline bool operator==(const QVulkanLayer &lhs, const QVulkanLayer &rhs) Q_DECL_NOTHROW +{ + return lhs.name == rhs.name && lhs.version == rhs.version && lhs.specVersion == rhs.specVersion; +} +inline bool operator!=(const QVulkanLayer &lhs, const QVulkanLayer &rhs) Q_DECL_NOTHROW +{ return !(lhs == rhs); } + +inline uint qHash(const QVulkanLayer &key, uint seed = 0) Q_DECL_NOTHROW +{ + QtPrivate::QHashCombine hash; + seed = hash(seed, key.name); + seed = hash(seed, key.version); + seed = hash(seed, key.specVersion); + return seed; +} + +struct QVulkanExtension +{ + QByteArray name; + uint32_t version; +}; +Q_DECLARE_TYPEINFO(QVulkanExtension, Q_MOVABLE_TYPE); + +inline bool operator==(const QVulkanExtension &lhs, const QVulkanExtension &rhs) Q_DECL_NOTHROW +{ + return lhs.name == rhs.name && lhs.version == rhs.version; +} +inline bool operator!=(const QVulkanExtension &lhs, const QVulkanExtension &rhs) Q_DECL_NOTHROW +{ return !(lhs == rhs); } + +inline uint qHash(const QVulkanExtension &key, uint seed = 0) Q_DECL_NOTHROW +{ + QtPrivate::QHashCombine hash; + seed = hash(seed, key.name); + seed = hash(seed, key.version); + return seed; +} + +#ifndef QT_NO_DEBUG_STREAM +Q_GUI_EXPORT QDebug operator<<(QDebug, const QVulkanLayer &); +Q_GUI_EXPORT QDebug operator<<(QDebug, const QVulkanExtension &); +#endif + +template<typename T> +class QVulkanInfoVector : public QVector<T> +{ +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<QVulkanLayer> supportedLayers(); + QVulkanInfoVector<QVulkanExtension> 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<QVulkanInstancePrivate> 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/qvulkanwindow.cpp b/src/gui/vulkan/qvulkanwindow.cpp new file mode 100644 index 0000000000..53cee67e2f --- /dev/null +++ b/src/gui/vulkan/qvulkanwindow.cpp @@ -0,0 +1,2719 @@ +/**************************************************************************** +** +** 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 "qvulkanwindow_p.h" +#include "qvulkanfunctions.h" +#include <QLoggingCategory> +#include <QTimer> +#include <QThread> +#include <QCoreApplication> +#include <qevent.h> + +QT_BEGIN_NAMESPACE + +Q_LOGGING_CATEGORY(lcVk, "qt.vulkan") + +/*! + \class QVulkanWindow + \inmodule QtGui + \since 5.10 + \brief The QVulkanWindow class is a convenience subclass of QWindow to perform Vulkan rendering. + + QVulkanWindow is a Vulkan-capable QWindow that manages a Vulkan device, a + graphics queue, a command pool and buffer, a depth-stencil image and a + double-buffered FIFO swapchain, while taking care of correct behavior when it + comes to events like resize, special situations like not having a device + queue supporting both graphics and presentation, device lost scenarios, and + additional functionality like reading the rendered content back. Conceptually + it is the counterpart of QOpenGLWindow in the Vulkan world. + + \note QVulkanWindow does not always eliminate the need to implement a fully + custom QWindow subclass as it will not necessarily be sufficient in advanced + use cases. + + QVulkanWindow can be embedded into QWidget-based user interfaces via + QWidget::createWindowContainer(). This approach has a number of limitations, + however. Make sure to study the + \l{QWidget::createWindowContainer()}{documentation} first. + + A typical application using QVulkanWindow may look like the following: + + \code + class VulkanRenderer : public QVulkanWindowRenderer + { + public: + VulkanRenderer(QVulkanWindow *w) : m_window(w) { } + + void initResources() override + { + m_devFuncs = m_window->vulkanInstance()->deviceFunctions(m_window->device()); + ... + } + void initSwapChainResources() override { ... } + void releaseSwapChainResources() override { ... } + void releaseResources() override { ... } + + void startNextFrame() override + { + VkCommandBuffer cmdBuf = m_window->currentCommandBuffer(); + ... + m_devFuncs->vkCmdBeginRenderPass(...); + ... + m_window->frameReady(); + } + + private: + QVulkanWindow *m_window; + QVulkanDeviceFunctions *m_devFuncs; + }; + + class VulkanWindow : public QVulkanWindow + { + public: + QVulkanWindowRenderer *createRenderer() override { + return new VulkanRenderer(this); + } + }; + + int main(int argc, char *argv[]) + { + QGuiApplication app(argc, argv); + + QVulkanInstance inst; + // enable the standard validation layers, when available + inst.setLayers(QByteArrayList() << "VK_LAYER_LUNARG_standard_validation"); + if (!inst.create()) + qFatal("Failed to create Vulkan instance: %d", inst.errorCode()); + + VulkanWindow w; + w.setVulkanInstance(&inst); + w.showMaximized(); + + return app.exec(); + } + \endcode + + As it can be seen in the example, the main patterns in QVulkanWindow usage are: + + \list + + \li The QVulkanInstance is associated via QWindow::setVulkanInstance(). It is + then retrievable via QWindow::vulkanInstance() from everywhere, on any + thread. + + \li Similarly to QVulkanInstance, device extensions can be queried via + supportedDeviceExtensions() before the actual initialization. Requesting an + extension to be enabled is done via setDeviceExtensions(). Such calls must be + made before the window becomes visible, that is, before calling show() or + similar functions. Unsupported extension requests are gracefully ignored. + + \li The renderer is implemented in a QVulkanWindowRenderer subclass, an + instance of which is created in the createRenderer() factory function. + + \li The core Vulkan commands are exposed via the QVulkanFunctions object, + retrievable by calling QVulkanInstance::functions(). Device level functions + are available after creating a VkDevice by calling + QVulkanInstance::deviceFunctions(). + + \li The building of the draw calls for the next frame happens in + QVulkanWindowRenderer::startNextFrame(). The implementation is expected to + add commands to the command buffer returned from currentCommandBuffer(). + Returning from the function does not indicate that the commands are ready for + submission. Rather, an explicit call to frameReady() is required. This allows + asynchronous generation of commands, possibly on multiple threads. Simple + implementations will simply call frameReady() at the end of their + QVulkanWindowRenderer::startNextFrame(). + + \li The basic Vulkan resources (physical device, graphics queue, a command + pool, the window's main command buffer, image formats, etc.) are exposed on + the QVulkanWindow via lightweight getter functions. Some of these are for + convenience only, and applications are always free to query, create and + manage additional resources directly via the Vulkan API. + + \li The renderer lives in the gui/main thread, like the window itself. This + thread is then throttled to the presentation rate, similarly to how OpenGL + with a swap interval of 1 would behave. However, the renderer implementation + is free to utilize multiple threads in any way it sees fit. The accessors + like vulkanInstance(), currentCommandBuffer(), etc. can be called from any + thread. The submission of the main command buffer, the queueing of present, + and the building of the next frame do not start until frameReady() is + invoked on the gui/main thread. + + \li When the window is made visible, the content is updated automatically. + Further updates can be requested by calling QWindow::requestUpdate(). To + render continuously, call requestUpdate() after frameReady(). + + \endlist + + For troubleshooting, enable the logging category \c{qt.vulkan}. Critical + errors are printed via qWarning() automatically. + + \section1 Coordinate system differences between OpenGL and Vulkan + + There are two notable differences to be aware of: First, with Vulkan Y points + down the screen in clip space, while OpenGL uses an upwards pointing Y axis. + Second, the standard OpenGL projection matrix assume a near and far plane + values of -1 and 1, while Vulkan prefers 0 and 1. + + In order to help applications migrate from OpenGL-based code without having + to flip Y coordinates in the vertex data, and to allow using QMatrix4x4 + functions like QMatrix4x4::perspective() while keeping the Vulkan viewport's + minDepth and maxDepth set to 0 and 1, QVulkanWindow provides a correction + matrix retrievable by calling clipCorrectionMatrix(). + + \section1 Multisampling + + While disabled by default, multisample antialiasing is fully supported by + QVulkanWindow. Additional color buffers and resolving into the swapchain's + non-multisample buffers are all managed automatically. + + To query the supported sample counts, call supportedSampleCounts(). When the + returned set contains 4, 8, ..., passing one of those values to setSampleCount() + requests multisample rendering. + + \note unlike QSurfaceFormat::setSamples(), the list of supported sample + counts are exposed to the applications in advance and there is no automatic + falling back to lower sample counts in setSampleCount(). If the requested value + is not supported, a warning is shown and a no multisampling will be used. + + \section1 Reading images back + + When supportsGrab() returns true, QVulkanWindow can perform readbacks from + the color buffer into a QImage. grab() is a slow and inefficient operation, + so frequent usage should be avoided. It is nonetheless valuable since it + allows applications to take screenshots, or tools and tests to process and + verify the output of the GPU rendering. + + \section1 sRGB support + + While many applications will be fine with the default behavior of + QVulkanWindow when it comes to swapchain image formats, + setPreferredColorFormats() allows requesting a pre-defined format. This is + useful most notably when working in the sRGB color space. Passing a format + like \c{VK_FORMAT_B8G8R8A8_SRGB} results in choosing an sRGB format, when + available. + + \section1 Validation layers + + During application development it can be extremely valuable to have the + Vulkan validation layers enabled. As shown in the example code above, calling + QVulkanInstance::setLayers() on the QVulkanInstance before + QVulkanInstance::create() enables validation, assuming the Vulkan driver + stack in the system contains the necessary layers. + + \note Be aware of platform-specific differences. On desktop platforms + installing the \l{https://www.lunarg.com/vulkan-sdk/}{Vulkan SDK} is + typically sufficient. However, Android for example requires deploying + additional shared libraries together with the application, and also mandates + a different list of validation layer names. See + \l{https://developer.android.com/ndk/guides/graphics/validation-layer.html}{the + Android Vulkan development pages} for more information. + + \note QVulkanWindow does not expose device layers since this functionality + has been deprecated since version 1.0.13 of the Vulkan API. + + \sa QVulkanInstance, QWindow + */ + +/*! + \class QVulkanWindowRenderer + \inmodule QtGui + \since 5.10 + + \brief The QVulkanWindowRenderer class is used to implement the + application-specific rendering logic for a QVulkanWindow. + + Applications typically subclass both QVulkanWindow and QVulkanWindowRenderer. + The former allows handling events, for example, input, while the latter allows + implementing the Vulkan resource management and command buffer building that + make up the application's rendering. + + In addition to event handling, the QVulkanWindow subclass is responsible for + providing an implementation for QVulkanWindow::createRenderer() as well. This + is where the window and renderer get connected. A typical implementation will + simply create a new instance of a subclass of QVulkanWindowRenderer. + */ + +/*! + Constructs a new QVulkanWindow with the given \a parent. + + The surface type is set to QSurface::VulkanSurface. + */ +QVulkanWindow::QVulkanWindow(QWindow *parent) + : QWindow(*(new QVulkanWindowPrivate), parent) +{ + setSurfaceType(QSurface::VulkanSurface); +} + +/*! + Destructor. +*/ +QVulkanWindow::~QVulkanWindow() +{ +} + +QVulkanWindowPrivate::~QVulkanWindowPrivate() +{ + // graphics resource cleanup is already done at this point due to + // QPlatformSurfaceEvent::SurfaceAboutToBeDestroyed + + delete renderer; +} + +/*! + \enum QVulkanWindow::Flag + + This enum describes the flags that can be passed to setFlags(). + + \value PersistentResources Ensures no graphics resources are released when + the window becomes unexposed. The default behavior is to release + everything, and reinitialize later when becoming visible again. + */ + +/*! + Configures the behavior based on the provided \a flags. + + \note This function must be called before the window is made visible or at + latest in QVulkanWindowRenderer::preInitResources(), and has no effect if + called afterwards. + */ +void QVulkanWindow::setFlags(Flags flags) +{ + Q_D(QVulkanWindow); + if (d->status != QVulkanWindowPrivate::StatusUninitialized) { + qWarning("QVulkanWindow: Attempted to set flags when already initialized"); + return; + } + d->flags = flags; +} + +/*! + Return the requested flags. + */ +QVulkanWindow::Flags QVulkanWindow::flags() const +{ + Q_D(const QVulkanWindow); + return d->flags; +} + +/*! + Returns the list of properties for the supported physical devices in the system. + + \note This function can be called before making the window visible. + */ +QVector<VkPhysicalDeviceProperties> QVulkanWindow::availablePhysicalDevices() +{ + Q_D(QVulkanWindow); + if (!d->physDevs.isEmpty() && !d->physDevProps.isEmpty()) + return d->physDevProps; + + QVulkanInstance *inst = vulkanInstance(); + if (!inst) { + qWarning("QVulkanWindow: Attempted to call availablePhysicalDevices() without a QVulkanInstance"); + return d->physDevProps; + } + + QVulkanFunctions *f = inst->functions(); + uint32_t count = 1; + VkResult err = f->vkEnumeratePhysicalDevices(inst->vkInstance(), &count, nullptr); + if (err != VK_SUCCESS) { + qWarning("QVulkanWindow: Failed to get physical device count: %d", err); + return d->physDevProps; + } + + qCDebug(lcVk, "%d physical devices", count); + if (!count) + return d->physDevProps; + + QVector<VkPhysicalDevice> devs(count); + err = f->vkEnumeratePhysicalDevices(inst->vkInstance(), &count, devs.data()); + if (err != VK_SUCCESS) { + qWarning("QVulkanWindow: Failed to enumerate physical devices: %d", err); + return d->physDevProps; + } + + d->physDevs = devs; + d->physDevProps.resize(count); + for (uint32_t i = 0; i < count; ++i) { + VkPhysicalDeviceProperties *p = &d->physDevProps[i]; + f->vkGetPhysicalDeviceProperties(d->physDevs.at(i), p); + qCDebug(lcVk, "Physical device [%d]: name '%s' version %d.%d.%d", i, p->deviceName, + VK_VERSION_MAJOR(p->driverVersion), VK_VERSION_MINOR(p->driverVersion), + VK_VERSION_PATCH(p->driverVersion)); + } + + return d->physDevProps; +} + +/*! + Requests the usage of the physical device with index \a idx. The index + corresponds to the list returned from availablePhysicalDevices(). + + By default the first physical device is used. + + \note This function must be called before the window is made visible or at + latest in QVulkanWindowRenderer::preInitResources(), and has no effect if + called afterwards. + */ +void QVulkanWindow::setPhysicalDeviceIndex(int idx) +{ + Q_D(QVulkanWindow); + if (d->status != QVulkanWindowPrivate::StatusUninitialized) { + qWarning("QVulkanWindow: Attempted to set physical device when already initialized"); + return; + } + const int count = availablePhysicalDevices().count(); + if (idx < 0 || idx >= count) { + qWarning("QVulkanWindow: Invalid physical device index %d (total physical devices: %d)", idx, count); + return; + } + d->physDevIndex = idx; +} + +/*! + Returns the list of the extensions that are supported by logical devices + created from the physical device selected by setPhysicalDeviceIndex(). + + \note This function can be called before making the window visible. + */ +QVulkanInfoVector<QVulkanExtension> QVulkanWindow::supportedDeviceExtensions() +{ + Q_D(QVulkanWindow); + + availablePhysicalDevices(); + + if (d->physDevs.isEmpty()) { + qWarning("QVulkanWindow: No physical devices found"); + return QVulkanInfoVector<QVulkanExtension>(); + } + + VkPhysicalDevice physDev = d->physDevs.at(d->physDevIndex); + if (d->supportedDevExtensions.contains(physDev)) + return d->supportedDevExtensions.value(physDev); + + QVulkanFunctions *f = vulkanInstance()->functions(); + uint32_t count = 0; + VkResult err = f->vkEnumerateDeviceExtensionProperties(physDev, nullptr, &count, nullptr); + if (err == VK_SUCCESS) { + QVector<VkExtensionProperties> extProps(count); + err = f->vkEnumerateDeviceExtensionProperties(physDev, nullptr, &count, extProps.data()); + if (err == VK_SUCCESS) { + QVulkanInfoVector<QVulkanExtension> exts; + for (const VkExtensionProperties &prop : extProps) { + QVulkanExtension ext; + ext.name = prop.extensionName; + ext.version = prop.specVersion; + exts.append(ext); + } + d->supportedDevExtensions.insert(physDev, exts); + qDebug(lcVk) << "Supported device extensions:" << exts; + return exts; + } + } + + qWarning("QVulkanWindow: Failed to query device extension count: %d", err); + return QVulkanInfoVector<QVulkanExtension>(); +} + +/*! + Sets the list of device \a extensions to be enabled. + + Unsupported extensions are ignored. + + The swapchain extension will always be added automatically, no need to + include it in this list. + + \note This function must be called before the window is made visible or at + latest in QVulkanWindowRenderer::preInitResources(), and has no effect if + called afterwards. + */ +void QVulkanWindow::setDeviceExtensions(const QByteArrayList &extensions) +{ + Q_D(QVulkanWindow); + if (d->status != QVulkanWindowPrivate::StatusUninitialized) { + qWarning("QVulkanWindow: Attempted to set device extensions when already initialized"); + return; + } + d->requestedDevExtensions = extensions; +} + +/*! + Sets the preferred \a formats of the swapchain. + + By default no application-preferred format is set. In this case the + surface's preferred format will be used or, in absence of that, + \c{VK_FORMAT_B8G8R8A8_UNORM}. + + The list in \a formats is ordered. If the first format is not supported, + the second will be considered, and so on. When no formats in the list are + supported, the behavior is the same as in the default case. + + To query the actual format after initialization, call colorFormat(). + + \note This function must be called before the window is made visible or at + latest in QVulkanWindowRenderer::preInitResources(), and has no effect if + called afterwards. + + \note Reimplementing QVulkanWindowRenderer::preInitResources() allows + dynamically examining the list of supported formats, should that be + desired. There the surface is retrievable via + QVulkanInstace::surfaceForWindow(), while this function can still safely be + called to affect the later stages of initialization. + + \sa colorFormat() + */ +void QVulkanWindow::setPreferredColorFormats(const QVector<VkFormat> &formats) +{ + Q_D(QVulkanWindow); + if (d->status != QVulkanWindowPrivate::StatusUninitialized) { + qWarning("QVulkanWindow: Attempted to set preferred color format when already initialized"); + return; + } + d->requestedColorFormats = formats; +} + +static struct { + VkSampleCountFlagBits mask; + int count; +} qvk_sampleCounts[] = { + { VK_SAMPLE_COUNT_1_BIT, 1 }, + { VK_SAMPLE_COUNT_2_BIT, 2 }, + { VK_SAMPLE_COUNT_4_BIT, 4 }, + { VK_SAMPLE_COUNT_8_BIT, 8 }, + { VK_SAMPLE_COUNT_16_BIT, 16 }, + { VK_SAMPLE_COUNT_32_BIT, 32 }, + { VK_SAMPLE_COUNT_64_BIT, 64 } +}; + +/*! + Returns the set of supported sample counts when using the physical device + selected by setPhysicalDeviceIndex(). + + By default QVulkanWindow uses a sample count of 1. By calling setSampleCount() + with a different value (2, 4, 8, ...) from the set returned by this + function, multisample anti-aliasing can be requested. + + \note This function can be called before making the window visible. + + \sa setSampleCount() + */ +QSet<int> QVulkanWindow::supportedSampleCounts() +{ + Q_D(const QVulkanWindow); + QSet<int> result; + + availablePhysicalDevices(); + + if (d->physDevs.isEmpty()) { + qWarning("QVulkanWindow: No physical devices found"); + return result; + } + + const VkPhysicalDeviceLimits *limits = &d->physDevProps[d->physDevIndex].limits; + VkSampleCountFlags color = limits->framebufferColorSampleCounts; + VkSampleCountFlags depth = limits->framebufferDepthSampleCounts; + VkSampleCountFlags stencil = limits->framebufferStencilSampleCounts; + + for (size_t i = 0; i < sizeof(qvk_sampleCounts) / sizeof(qvk_sampleCounts[0]); ++i) { + if ((color & qvk_sampleCounts[i].mask) + && (depth & qvk_sampleCounts[i].mask) + && (stencil & qvk_sampleCounts[i].mask)) + { + result.insert(qvk_sampleCounts[i].count); + } + } + + return result; +} + +/*! + Requests multisample antialiasing with the given \a sampleCount. The valid + values are 1, 2, 4, 8, ... up until the maximum value supported by the + physical device. + + When the sample count is greater than 1, QVulkanWindow will create a + multisample color buffer instead of simply targeting the swapchain's + images. The rendering in the multisample buffer will get resolved into the + non-multisample buffers at the end of each frame. + + To examine the list of supported sample counts, call supportedSampleCounts(). + + When setting up the rendering pipeline, call sampleCountFlagBits() to query the + active sample count as a \c VkSampleCountFlagBits value. + + \note This function must be called before the window is made visible or at + latest in QVulkanWindowRenderer::preInitResources(), and has no effect if + called afterwards. + + \sa supportedSampleCounts(), sampleCountFlagBits() + */ +void QVulkanWindow::setSampleCount(int sampleCount) +{ + Q_D(QVulkanWindow); + if (d->status != QVulkanWindowPrivate::StatusUninitialized) { + qWarning("QVulkanWindow: Attempted to set sample count when already initialized"); + return; + } + + // Stay compatible with QSurfaceFormat and friends where samples == 0 means the same as 1. + sampleCount = qBound(1, sampleCount, 64); + + if (!supportedSampleCounts().contains(sampleCount)) { + qWarning("QVulkanWindow: Attempted to set unsupported sample count %d", sampleCount); + return; + } + + for (size_t i = 0; i < sizeof(qvk_sampleCounts) / sizeof(qvk_sampleCounts[0]); ++i) { + if (qvk_sampleCounts[i].count == sampleCount) { + d->sampleCount = qvk_sampleCounts[i].mask; + return; + } + } + + Q_UNREACHABLE(); +} + +void QVulkanWindowPrivate::init() +{ + Q_Q(QVulkanWindow); + Q_ASSERT(status == StatusUninitialized); + + qCDebug(lcVk, "QVulkanWindow init"); + + inst = q->vulkanInstance(); + if (!inst) { + qWarning("QVulkanWindow: Attempted to initialize without a QVulkanInstance"); + // This is a simple user error, recheck on the next expose instead of + // going into the permanent failure state. + status = StatusFailRetry; + return; + } + + if (!renderer) + renderer = q->createRenderer(); + + surface = QVulkanInstance::surfaceForWindow(q); + if (surface == VK_NULL_HANDLE) { + qWarning("QVulkanWindow: Failed to retrieve Vulkan surface for window"); + status = StatusFailRetry; + return; + } + + q->availablePhysicalDevices(); + + if (physDevs.isEmpty()) { + qWarning("QVulkanWindow: No physical devices found"); + status = StatusFail; + return; + } + + if (physDevIndex < 0 || physDevIndex >= physDevs.count()) { + qWarning("QVulkanWindow: Invalid physical device index; defaulting to 0"); + physDevIndex = 0; + } + qCDebug(lcVk, "Using physical device [%d]", physDevIndex); + + // Give a last chance to do decisions based on the physical device and the surface. + if (renderer) + renderer->preInitResources(); + + VkPhysicalDevice physDev = physDevs.at(physDevIndex); + QVulkanFunctions *f = inst->functions(); + + uint32_t queueCount = 0; + f->vkGetPhysicalDeviceQueueFamilyProperties(physDev, &queueCount, nullptr); + QVector<VkQueueFamilyProperties> queueFamilyProps(queueCount); + f->vkGetPhysicalDeviceQueueFamilyProperties(physDev, &queueCount, queueFamilyProps.data()); + gfxQueueFamilyIdx = uint32_t(-1); + presQueueFamilyIdx = uint32_t(-1); + for (int i = 0; i < queueFamilyProps.count(); ++i) { + const bool supportsPresent = inst->supportsPresent(physDev, i, q); + qCDebug(lcVk, "queue family %d: flags=0x%x count=%d supportsPresent=%d", i, + queueFamilyProps[i].queueFlags, queueFamilyProps[i].queueCount, supportsPresent); + if (gfxQueueFamilyIdx == uint32_t(-1) + && (queueFamilyProps[i].queueFlags & VK_QUEUE_GRAPHICS_BIT) + && supportsPresent) + gfxQueueFamilyIdx = i; + } + if (gfxQueueFamilyIdx != uint32_t(-1)) { + presQueueFamilyIdx = gfxQueueFamilyIdx; + } else { + qCDebug(lcVk, "No queue with graphics+present; trying separate queues"); + for (int i = 0; i < queueFamilyProps.count(); ++i) { + if (gfxQueueFamilyIdx == uint32_t(-1) && (queueFamilyProps[i].queueFlags & VK_QUEUE_GRAPHICS_BIT)) + gfxQueueFamilyIdx = i; + if (presQueueFamilyIdx == uint32_t(-1) && inst->supportsPresent(physDev, i, q)) + presQueueFamilyIdx = i; + } + } + if (gfxQueueFamilyIdx == uint32_t(-1)) { + qWarning("QVulkanWindow: No graphics queue family found"); + status = StatusFail; + return; + } + if (presQueueFamilyIdx == uint32_t(-1)) { + qWarning("QVulkanWindow: No present queue family found"); + status = StatusFail; + return; + } +#ifdef QT_DEBUG + // allow testing the separate present queue case in debug builds on AMD cards + if (qEnvironmentVariableIsSet("QT_VK_PRESENT_QUEUE_INDEX")) + presQueueFamilyIdx = qEnvironmentVariableIntValue("QT_VK_PRESENT_QUEUE_INDEX"); +#endif + qCDebug(lcVk, "Using queue families: graphics = %u present = %u", gfxQueueFamilyIdx, presQueueFamilyIdx); + + VkDeviceQueueCreateInfo queueInfo[2]; + const float prio[] = { 0 }; + memset(queueInfo, 0, sizeof(queueInfo)); + queueInfo[0].sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO; + queueInfo[0].queueFamilyIndex = gfxQueueFamilyIdx; + queueInfo[0].queueCount = 1; + queueInfo[0].pQueuePriorities = prio; + if (gfxQueueFamilyIdx != presQueueFamilyIdx) { + queueInfo[1].sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO; + queueInfo[1].queueFamilyIndex = presQueueFamilyIdx; + queueInfo[1].queueCount = 1; + queueInfo[1].pQueuePriorities = prio; + } + + // Filter out unsupported extensions in order to keep symmetry + // with how QVulkanInstance behaves. Add the swapchain extension. + QVector<const char *> devExts; + QVulkanInfoVector<QVulkanExtension> supportedExtensions = q->supportedDeviceExtensions(); + QByteArrayList reqExts = requestedDevExtensions; + reqExts.append("VK_KHR_swapchain"); + for (const QByteArray &ext : reqExts) { + if (supportedExtensions.contains(ext)) + devExts.append(ext.constData()); + } + qCDebug(lcVk) << "Enabling device extensions:" << devExts; + + VkDeviceCreateInfo devInfo; + memset(&devInfo, 0, sizeof(devInfo)); + devInfo.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO; + devInfo.queueCreateInfoCount = gfxQueueFamilyIdx == presQueueFamilyIdx ? 1 : 2; + devInfo.pQueueCreateInfos = queueInfo; + devInfo.enabledExtensionCount = devExts.count(); + devInfo.ppEnabledExtensionNames = devExts.constData(); + + // Device layers are not supported by QVulkanWindow since that's an already deprecated + // API. However, have a workaround for systems with older API and layers (f.ex. L4T + // 24.2 for the Jetson TX1 provides API 1.0.13 and crashes when the validation layer + // is enabled for the instance but not the device). + uint32_t apiVersion = physDevProps[physDevIndex].apiVersion; + if (VK_VERSION_MAJOR(apiVersion) == 1 + && VK_VERSION_MINOR(apiVersion) == 0 + && VK_VERSION_PATCH(apiVersion) <= 13) + { + // Make standard validation work at least. + const QByteArray stdValName = QByteArrayLiteral("VK_LAYER_LUNARG_standard_validation"); + const char *stdValNamePtr = stdValName.constData(); + if (inst->layers().contains(stdValName)) { + uint32_t count = 0; + VkResult err = f->vkEnumerateDeviceLayerProperties(physDev, &count, nullptr); + if (err == VK_SUCCESS) { + QVector<VkLayerProperties> layerProps(count); + err = f->vkEnumerateDeviceLayerProperties(physDev, &count, layerProps.data()); + if (err == VK_SUCCESS) { + for (const VkLayerProperties &prop : layerProps) { + if (!strncmp(prop.layerName, stdValNamePtr, stdValName.count())) { + devInfo.enabledLayerCount = 1; + devInfo.ppEnabledLayerNames = &stdValNamePtr; + break; + } + } + } + } + } + } + + VkResult err = f->vkCreateDevice(physDev, &devInfo, nullptr, &dev); + if (err == VK_ERROR_DEVICE_LOST) { + qWarning("QVulkanWindow: Physical device lost"); + if (renderer) + renderer->physicalDeviceLost(); + // clear the caches so the list of physical devices is re-queried + physDevs.clear(); + physDevProps.clear(); + status = StatusUninitialized; + qCDebug(lcVk, "Attempting to restart in 2 seconds"); + QTimer::singleShot(2000, q, [this]() { ensureStarted(); }); + return; + } + if (err != VK_SUCCESS) { + qWarning("QVulkanWindow: Failed to create device: %d", err); + status = StatusFail; + return; + } + + devFuncs = inst->deviceFunctions(dev); + Q_ASSERT(devFuncs); + + devFuncs->vkGetDeviceQueue(dev, gfxQueueFamilyIdx, 0, &gfxQueue); + if (gfxQueueFamilyIdx == presQueueFamilyIdx) + presQueue = gfxQueue; + else + devFuncs->vkGetDeviceQueue(dev, presQueueFamilyIdx, 0, &presQueue); + + VkCommandPoolCreateInfo poolInfo; + memset(&poolInfo, 0, sizeof(poolInfo)); + poolInfo.sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO; + poolInfo.queueFamilyIndex = gfxQueueFamilyIdx; + err = devFuncs->vkCreateCommandPool(dev, &poolInfo, nullptr, &cmdPool); + if (err != VK_SUCCESS) { + qWarning("QVulkanWindow: Failed to create command pool: %d", err); + status = StatusFail; + return; + } + if (gfxQueueFamilyIdx != presQueueFamilyIdx) { + poolInfo.queueFamilyIndex = presQueueFamilyIdx; + err = devFuncs->vkCreateCommandPool(dev, &poolInfo, nullptr, &presCmdPool); + if (err != VK_SUCCESS) { + qWarning("QVulkanWindow: Failed to create command pool for present queue: %d", err); + status = StatusFail; + return; + } + } + + hostVisibleMemIndex = 0; + VkPhysicalDeviceMemoryProperties physDevMemProps; + bool hostVisibleMemIndexSet = false; + f->vkGetPhysicalDeviceMemoryProperties(physDev, &physDevMemProps); + for (uint32_t i = 0; i < physDevMemProps.memoryTypeCount; ++i) { + const VkMemoryType *memType = physDevMemProps.memoryTypes; + qCDebug(lcVk, "memtype %d: flags=0x%x", i, memType[i].propertyFlags); + // Find a host visible, host coherent memtype. If there is one that is + // cached as well (in addition to being coherent), prefer that. + const int hostVisibleAndCoherent = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT; + if ((memType[i].propertyFlags & hostVisibleAndCoherent) == hostVisibleAndCoherent) { + if (!hostVisibleMemIndexSet + || (memType[i].propertyFlags & VK_MEMORY_PROPERTY_HOST_CACHED_BIT)) { + hostVisibleMemIndexSet = true; + hostVisibleMemIndex = i; + } + } + } + qCDebug(lcVk, "Picked memtype %d for host visible memory", hostVisibleMemIndex); + deviceLocalMemIndex = 0; + for (uint32_t i = 0; i < physDevMemProps.memoryTypeCount; ++i) { + const VkMemoryType *memType = physDevMemProps.memoryTypes; + // Just pick the first device local memtype. + if (memType[i].propertyFlags & VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT) { + deviceLocalMemIndex = i; + break; + } + } + qCDebug(lcVk, "Picked memtype %d for device local memory", deviceLocalMemIndex); + + if (!vkGetPhysicalDeviceSurfaceCapabilitiesKHR || !vkGetPhysicalDeviceSurfaceFormatsKHR) { + vkGetPhysicalDeviceSurfaceCapabilitiesKHR = reinterpret_cast<PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR>( + inst->getInstanceProcAddr("vkGetPhysicalDeviceSurfaceCapabilitiesKHR")); + vkGetPhysicalDeviceSurfaceFormatsKHR = reinterpret_cast<PFN_vkGetPhysicalDeviceSurfaceFormatsKHR>( + inst->getInstanceProcAddr("vkGetPhysicalDeviceSurfaceFormatsKHR")); + if (!vkGetPhysicalDeviceSurfaceCapabilitiesKHR || !vkGetPhysicalDeviceSurfaceFormatsKHR) { + qWarning("QVulkanWindow: Physical device surface queries not available"); + status = StatusFail; + return; + } + } + + // Figure out the color format here. Must not wait until recreateSwapChain() + // because the renderpass should be available already from initResources (so + // that apps do not have to defer pipeline creation to + // initSwapChainResources), but the renderpass needs the final color format. + + uint32_t formatCount = 0; + vkGetPhysicalDeviceSurfaceFormatsKHR(physDev, surface, &formatCount, nullptr); + QVector<VkSurfaceFormatKHR> formats(formatCount); + if (formatCount) + vkGetPhysicalDeviceSurfaceFormatsKHR(physDev, surface, &formatCount, formats.data()); + + colorFormat = VK_FORMAT_B8G8R8A8_UNORM; // our documented default if all else fails + colorSpace = VkColorSpaceKHR(0); // this is in fact VK_COLOR_SPACE_SRGB_NONLINEAR_KHR + + // Pick the preferred format, if there is one. + if (!formats.isEmpty() && formats[0].format != VK_FORMAT_UNDEFINED) { + colorFormat = formats[0].format; + colorSpace = formats[0].colorSpace; + } + + // Try to honor the user request. + if (!formats.isEmpty() && !requestedColorFormats.isEmpty()) { + for (VkFormat reqFmt : qAsConst(requestedColorFormats)) { + auto r = std::find_if(formats.cbegin(), formats.cend(), + [reqFmt](const VkSurfaceFormatKHR &sfmt) { return sfmt.format == reqFmt; }); + if (r != formats.cend()) { + colorFormat = r->format; + colorSpace = r->colorSpace; + break; + } + } + } + + const VkFormat dsFormatCandidates[] = { + VK_FORMAT_D24_UNORM_S8_UINT, + VK_FORMAT_D32_SFLOAT_S8_UINT, + VK_FORMAT_D16_UNORM_S8_UINT + }; + const int dsFormatCandidateCount = sizeof(dsFormatCandidates) / sizeof(VkFormat); + int dsFormatIdx = 0; + while (dsFormatIdx < dsFormatCandidateCount) { + dsFormat = dsFormatCandidates[dsFormatIdx]; + VkFormatProperties fmtProp; + f->vkGetPhysicalDeviceFormatProperties(physDev, dsFormat, &fmtProp); + if (fmtProp.optimalTilingFeatures & VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT) + break; + ++dsFormatIdx; + } + if (dsFormatIdx == dsFormatCandidateCount) + qWarning("QVulkanWindow: Failed to find an optimal depth-stencil format"); + + qCDebug(lcVk, "Color format: %d Depth-stencil format: %d", colorFormat, dsFormat); + + if (!createDefaultRenderPass()) + return; + + if (renderer) + renderer->initResources(); + + status = StatusDeviceReady; +} + +void QVulkanWindowPrivate::reset() +{ + if (!dev) // do not rely on 'status', a half done init must be cleaned properly too + return; + + qCDebug(lcVk, "QVulkanWindow reset"); + + devFuncs->vkDeviceWaitIdle(dev); + + if (renderer) { + renderer->releaseResources(); + devFuncs->vkDeviceWaitIdle(dev); + } + + if (defaultRenderPass) { + devFuncs->vkDestroyRenderPass(dev, defaultRenderPass, nullptr); + defaultRenderPass = VK_NULL_HANDLE; + } + + if (cmdPool) { + devFuncs->vkDestroyCommandPool(dev, cmdPool, nullptr); + cmdPool = VK_NULL_HANDLE; + } + + if (presCmdPool) { + devFuncs->vkDestroyCommandPool(dev, presCmdPool, nullptr); + presCmdPool = VK_NULL_HANDLE; + } + + if (frameGrabImage) { + devFuncs->vkDestroyImage(dev, frameGrabImage, nullptr); + frameGrabImage = VK_NULL_HANDLE; + } + + if (frameGrabImageMem) { + devFuncs->vkFreeMemory(dev, frameGrabImageMem, nullptr); + frameGrabImageMem = VK_NULL_HANDLE; + } + + if (dev) { + devFuncs->vkDestroyDevice(dev, nullptr); + inst->resetDeviceFunctions(dev); + dev = VK_NULL_HANDLE; + vkCreateSwapchainKHR = nullptr; // re-resolve swapchain funcs later on since some come via the device + } + + surface = VK_NULL_HANDLE; + + status = StatusUninitialized; +} + +bool QVulkanWindowPrivate::createDefaultRenderPass() +{ + VkAttachmentDescription attDesc[3]; + memset(attDesc, 0, sizeof(attDesc)); + + const bool msaa = sampleCount > VK_SAMPLE_COUNT_1_BIT; + + // This is either the non-msaa render target or the resolve target. + attDesc[0].format = colorFormat; + attDesc[0].samples = VK_SAMPLE_COUNT_1_BIT; + attDesc[0].loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR; // ignored when msaa + attDesc[0].storeOp = VK_ATTACHMENT_STORE_OP_STORE; + attDesc[0].stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE; + attDesc[0].stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE; + attDesc[0].initialLayout = VK_IMAGE_LAYOUT_UNDEFINED; + attDesc[0].finalLayout = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR; + + attDesc[1].format = dsFormat; + attDesc[1].samples = sampleCount; + attDesc[1].loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR; + attDesc[1].storeOp = VK_ATTACHMENT_STORE_OP_DONT_CARE; + attDesc[1].stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE; + attDesc[1].stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE; + attDesc[1].initialLayout = VK_IMAGE_LAYOUT_UNDEFINED; + attDesc[1].finalLayout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL; + + if (msaa) { + // msaa render target + attDesc[2].format = colorFormat; + attDesc[2].samples = sampleCount; + attDesc[2].loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR; + attDesc[2].storeOp = VK_ATTACHMENT_STORE_OP_DONT_CARE; + attDesc[2].stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE; + attDesc[2].stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE; + attDesc[2].initialLayout = VK_IMAGE_LAYOUT_UNDEFINED; + attDesc[2].finalLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL; + } + + VkAttachmentReference colorRef = { 0, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL }; + VkAttachmentReference resolveRef = { 0, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL }; + VkAttachmentReference dsRef = { 1, VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL }; + + VkSubpassDescription subPassDesc; + memset(&subPassDesc, 0, sizeof(subPassDesc)); + subPassDesc.pipelineBindPoint = VK_PIPELINE_BIND_POINT_GRAPHICS; + subPassDesc.colorAttachmentCount = 1; + subPassDesc.pColorAttachments = &colorRef; + subPassDesc.pDepthStencilAttachment = &dsRef; + + VkRenderPassCreateInfo rpInfo; + memset(&rpInfo, 0, sizeof(rpInfo)); + rpInfo.sType = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO; + rpInfo.attachmentCount = 2; + rpInfo.pAttachments = attDesc; + rpInfo.subpassCount = 1; + rpInfo.pSubpasses = &subPassDesc; + + if (msaa) { + colorRef.attachment = 2; + subPassDesc.pResolveAttachments = &resolveRef; + rpInfo.attachmentCount = 3; + } + + VkResult err = devFuncs->vkCreateRenderPass(dev, &rpInfo, nullptr, &defaultRenderPass); + if (err != VK_SUCCESS) { + qWarning("QVulkanWindow: Failed to create renderpass: %d", err); + return false; + } + + return true; +} + +void QVulkanWindowPrivate::recreateSwapChain() +{ + Q_Q(QVulkanWindow); + Q_ASSERT(status >= StatusDeviceReady); + + swapChainImageSize = q->size() * q->devicePixelRatio(); // note: may change below due to surfaceCaps + + if (swapChainImageSize.isEmpty()) // handle null window size gracefully + return; + + QVulkanInstance *inst = q->vulkanInstance(); + QVulkanFunctions *f = inst->functions(); + devFuncs->vkDeviceWaitIdle(dev); + + if (!vkCreateSwapchainKHR) { + vkCreateSwapchainKHR = reinterpret_cast<PFN_vkCreateSwapchainKHR>(f->vkGetDeviceProcAddr(dev, "vkCreateSwapchainKHR")); + vkDestroySwapchainKHR = reinterpret_cast<PFN_vkDestroySwapchainKHR>(f->vkGetDeviceProcAddr(dev, "vkDestroySwapchainKHR")); + vkGetSwapchainImagesKHR = reinterpret_cast<PFN_vkGetSwapchainImagesKHR>(f->vkGetDeviceProcAddr(dev, "vkGetSwapchainImagesKHR")); + vkAcquireNextImageKHR = reinterpret_cast<PFN_vkAcquireNextImageKHR>(f->vkGetDeviceProcAddr(dev, "vkAcquireNextImageKHR")); + vkQueuePresentKHR = reinterpret_cast<PFN_vkQueuePresentKHR>(f->vkGetDeviceProcAddr(dev, "vkQueuePresentKHR")); + } + + VkPhysicalDevice physDev = physDevs.at(physDevIndex); + VkSurfaceCapabilitiesKHR surfaceCaps; + vkGetPhysicalDeviceSurfaceCapabilitiesKHR(physDev, surface, &surfaceCaps); + uint32_t reqBufferCount = swapChainBufferCount; + if (surfaceCaps.maxImageCount) + reqBufferCount = qBound(surfaceCaps.minImageCount, reqBufferCount, surfaceCaps.maxImageCount); + + VkExtent2D bufferSize = surfaceCaps.currentExtent; + if (bufferSize.width == uint32_t(-1)) { + Q_ASSERT(bufferSize.height == uint32_t(-1)); + bufferSize.width = swapChainImageSize.width(); + bufferSize.height = swapChainImageSize.height(); + } else { + swapChainImageSize = QSize(bufferSize.width, bufferSize.height); + } + + VkSurfaceTransformFlagBitsKHR preTransform = + (surfaceCaps.supportedTransforms & VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR) + ? VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR + : surfaceCaps.currentTransform; + + VkCompositeAlphaFlagBitsKHR compositeAlpha = + (surfaceCaps.supportedCompositeAlpha & VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR) + ? VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR + : VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR; + + if (q->requestedFormat().hasAlpha()) { + if (surfaceCaps.supportedCompositeAlpha & VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR) + compositeAlpha = VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR; + else if (surfaceCaps.supportedCompositeAlpha & VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR) + compositeAlpha = VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR; + } + + VkImageUsageFlags usage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT; + swapChainSupportsReadBack = (surfaceCaps.supportedUsageFlags & VK_IMAGE_USAGE_TRANSFER_SRC_BIT); + if (swapChainSupportsReadBack) + usage |= VK_IMAGE_USAGE_TRANSFER_SRC_BIT; + + VkSwapchainKHR oldSwapChain = swapChain; + VkSwapchainCreateInfoKHR swapChainInfo; + memset(&swapChainInfo, 0, sizeof(swapChainInfo)); + swapChainInfo.sType = VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR; + swapChainInfo.surface = surface; + swapChainInfo.minImageCount = reqBufferCount; + swapChainInfo.imageFormat = colorFormat; + swapChainInfo.imageColorSpace = colorSpace; + swapChainInfo.imageExtent = bufferSize; + swapChainInfo.imageArrayLayers = 1; + swapChainInfo.imageUsage = usage; + swapChainInfo.imageSharingMode = VK_SHARING_MODE_EXCLUSIVE; + swapChainInfo.preTransform = preTransform; + swapChainInfo.compositeAlpha = compositeAlpha; + swapChainInfo.presentMode = presentMode; + swapChainInfo.clipped = true; + swapChainInfo.oldSwapchain = oldSwapChain; + + qCDebug(lcVk, "Creating new swap chain of %d buffers, size %dx%d", reqBufferCount, bufferSize.width, bufferSize.height); + + VkSwapchainKHR newSwapChain; + VkResult err = vkCreateSwapchainKHR(dev, &swapChainInfo, nullptr, &newSwapChain); + if (err != VK_SUCCESS) { + qWarning("QVulkanWindow: Failed to create swap chain: %d", err); + return; + } + + if (oldSwapChain) + releaseSwapChain(); + + swapChain = newSwapChain; + + uint32_t actualSwapChainBufferCount = 0; + err = vkGetSwapchainImagesKHR(dev, swapChain, &actualSwapChainBufferCount, nullptr); + if (err != VK_SUCCESS || actualSwapChainBufferCount < 2) { + qWarning("QVulkanWindow: Failed to get swapchain images: %d (count=%d)", err, actualSwapChainBufferCount); + return; + } + + qCDebug(lcVk, "Actual swap chain buffer count: %d (supportsReadback=%d)", + actualSwapChainBufferCount, swapChainSupportsReadBack); + if (actualSwapChainBufferCount > MAX_SWAPCHAIN_BUFFER_COUNT) { + qWarning("QVulkanWindow: Too many swapchain buffers (%d)", actualSwapChainBufferCount); + return; + } + swapChainBufferCount = actualSwapChainBufferCount; + + VkImage swapChainImages[MAX_SWAPCHAIN_BUFFER_COUNT]; + err = vkGetSwapchainImagesKHR(dev, swapChain, &actualSwapChainBufferCount, swapChainImages); + if (err != VK_SUCCESS) { + qWarning("QVulkanWindow: Failed to get swapchain images: %d", err); + return; + } + + if (!createTransientImage(dsFormat, + VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, + VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT, + &dsImage, + &dsMem, + &dsView, + 1)) + { + return; + } + + const bool msaa = sampleCount > VK_SAMPLE_COUNT_1_BIT; + VkImage msaaImages[MAX_SWAPCHAIN_BUFFER_COUNT]; + VkImageView msaaViews[MAX_SWAPCHAIN_BUFFER_COUNT]; + + if (msaa) { + if (!createTransientImage(colorFormat, + VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, + VK_IMAGE_ASPECT_COLOR_BIT, + msaaImages, + &msaaImageMem, + msaaViews, + swapChainBufferCount)) + { + return; + } + } + + VkFenceCreateInfo fenceInfo = { VK_STRUCTURE_TYPE_FENCE_CREATE_INFO, nullptr, VK_FENCE_CREATE_SIGNALED_BIT }; + + for (int i = 0; i < swapChainBufferCount; ++i) { + ImageResources &image(imageRes[i]); + image.image = swapChainImages[i]; + + if (msaa) { + image.msaaImage = msaaImages[i]; + image.msaaImageView = msaaViews[i]; + } + + VkImageViewCreateInfo imgViewInfo; + memset(&imgViewInfo, 0, sizeof(imgViewInfo)); + imgViewInfo.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO; + imgViewInfo.image = swapChainImages[i]; + imgViewInfo.viewType = VK_IMAGE_VIEW_TYPE_2D; + imgViewInfo.format = colorFormat; + imgViewInfo.components.r = VK_COMPONENT_SWIZZLE_R; + imgViewInfo.components.g = VK_COMPONENT_SWIZZLE_G; + imgViewInfo.components.b = VK_COMPONENT_SWIZZLE_B; + imgViewInfo.components.a = VK_COMPONENT_SWIZZLE_A; + imgViewInfo.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; + imgViewInfo.subresourceRange.levelCount = imgViewInfo.subresourceRange.layerCount = 1; + err = devFuncs->vkCreateImageView(dev, &imgViewInfo, nullptr, &image.imageView); + if (err != VK_SUCCESS) { + qWarning("QVulkanWindow: Failed to create swapchain image view %d: %d", i, err); + return; + } + + err = devFuncs->vkCreateFence(dev, &fenceInfo, nullptr, &image.cmdFence); + if (err != VK_SUCCESS) { + qWarning("QVulkanWindow: Failed to create command buffer fence: %d", err); + return; + } + image.cmdFenceWaitable = true; // fence was created in signaled state + + VkImageView views[3] = { image.imageView, + dsView, + msaa ? image.msaaImageView : VK_NULL_HANDLE }; + VkFramebufferCreateInfo fbInfo; + memset(&fbInfo, 0, sizeof(fbInfo)); + fbInfo.sType = VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO; + fbInfo.renderPass = defaultRenderPass; + fbInfo.attachmentCount = msaa ? 3 : 2; + fbInfo.pAttachments = views; + fbInfo.width = swapChainImageSize.width(); + fbInfo.height = swapChainImageSize.height(); + fbInfo.layers = 1; + VkResult err = devFuncs->vkCreateFramebuffer(dev, &fbInfo, nullptr, &image.fb); + if (err != VK_SUCCESS) { + qWarning("QVulkanWindow: Failed to create framebuffer: %d", err); + return; + } + + if (gfxQueueFamilyIdx != presQueueFamilyIdx) { + // pre-build the static image-acquire-on-present-queue command buffer + VkCommandBufferAllocateInfo cmdBufInfo = { + VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO, nullptr, presCmdPool, VK_COMMAND_BUFFER_LEVEL_PRIMARY, 1 }; + err = devFuncs->vkAllocateCommandBuffers(dev, &cmdBufInfo, &image.presTransCmdBuf); + if (err != VK_SUCCESS) { + qWarning("QVulkanWindow: Failed to allocate acquire-on-present-queue command buffer: %d", err); + return; + } + VkCommandBufferBeginInfo cmdBufBeginInfo = { + VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO, nullptr, + VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT, nullptr }; + err = devFuncs->vkBeginCommandBuffer(image.presTransCmdBuf, &cmdBufBeginInfo); + if (err != VK_SUCCESS) { + qWarning("QVulkanWindow: Failed to begin acquire-on-present-queue command buffer: %d", err); + return; + } + VkImageMemoryBarrier presTrans; + memset(&presTrans, 0, sizeof(presTrans)); + presTrans.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER; + presTrans.dstAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT; + presTrans.oldLayout = presTrans.newLayout = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR; + presTrans.srcQueueFamilyIndex = gfxQueueFamilyIdx; + presTrans.dstQueueFamilyIndex = presQueueFamilyIdx; + presTrans.image = image.image; + presTrans.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; + presTrans.subresourceRange.levelCount = presTrans.subresourceRange.layerCount = 1; + devFuncs->vkCmdPipelineBarrier(image.presTransCmdBuf, + VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, + VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, + 0, 0, nullptr, 0, nullptr, + 1, &presTrans); + err = devFuncs->vkEndCommandBuffer(image.presTransCmdBuf); + if (err != VK_SUCCESS) { + qWarning("QVulkanWindow: Failed to end acquire-on-present-queue command buffer: %d", err); + return; + } + } + } + + currentImage = 0; + + VkSemaphoreCreateInfo semInfo = { VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO, nullptr, 0 }; + for (int i = 0; i < frameLag; ++i) { + FrameResources &frame(frameRes[i]); + + frame.imageAcquired = false; + frame.imageSemWaitable = false; + + devFuncs->vkCreateFence(dev, &fenceInfo, nullptr, &frame.fence); + frame.fenceWaitable = true; // fence was created in signaled state + + devFuncs->vkCreateSemaphore(dev, &semInfo, nullptr, &frame.imageSem); + devFuncs->vkCreateSemaphore(dev, &semInfo, nullptr, &frame.drawSem); + if (gfxQueueFamilyIdx != presQueueFamilyIdx) + devFuncs->vkCreateSemaphore(dev, &semInfo, nullptr, &frame.presTransSem); + } + + currentFrame = 0; + + if (renderer) + renderer->initSwapChainResources(); + + status = StatusReady; +} + +uint32_t QVulkanWindowPrivate::chooseTransientImageMemType(VkImage img, uint32_t startIndex) +{ + VkPhysicalDeviceMemoryProperties physDevMemProps; + inst->functions()->vkGetPhysicalDeviceMemoryProperties(physDevs[physDevIndex], &physDevMemProps); + + VkMemoryRequirements memReq; + devFuncs->vkGetImageMemoryRequirements(dev, img, &memReq); + uint32_t memTypeIndex = uint32_t(-1); + + if (memReq.memoryTypeBits) { + // Find a device local + lazily allocated, or at least device local memtype. + const VkMemoryType *memType = physDevMemProps.memoryTypes; + bool foundDevLocal = false; + for (uint32_t i = startIndex; i < physDevMemProps.memoryTypeCount; ++i) { + if (memReq.memoryTypeBits & (1 << i)) { + if (memType[i].propertyFlags & VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT) { + if (!foundDevLocal) { + foundDevLocal = true; + memTypeIndex = i; + } + if (memType[i].propertyFlags & VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT) { + memTypeIndex = i; + break; + } + } + } + } + } + + return memTypeIndex; +} + +static inline VkDeviceSize aligned(VkDeviceSize v, VkDeviceSize byteAlign) +{ + return (v + byteAlign - 1) & ~(byteAlign - 1); +} + +bool QVulkanWindowPrivate::createTransientImage(VkFormat format, + VkImageUsageFlags usage, + VkImageAspectFlags aspectMask, + VkImage *images, + VkDeviceMemory *mem, + VkImageView *views, + int count) +{ + VkMemoryRequirements memReq; + VkResult err; + + for (int i = 0; i < count; ++i) { + VkImageCreateInfo imgInfo; + memset(&imgInfo, 0, sizeof(imgInfo)); + imgInfo.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO; + imgInfo.imageType = VK_IMAGE_TYPE_2D; + imgInfo.format = format; + imgInfo.extent.width = swapChainImageSize.width(); + imgInfo.extent.height = swapChainImageSize.height(); + imgInfo.extent.depth = 1; + imgInfo.mipLevels = imgInfo.arrayLayers = 1; + imgInfo.samples = sampleCount; + imgInfo.tiling = VK_IMAGE_TILING_OPTIMAL; + imgInfo.usage = usage | VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT; + + err = devFuncs->vkCreateImage(dev, &imgInfo, nullptr, images + i); + if (err != VK_SUCCESS) { + qWarning("QVulkanWindow: Failed to create image: %d", err); + return false; + } + + // Assume the reqs are the same since the images are same in every way. + // Still, call GetImageMemReq for every image, in order to prevent the + // validation layer from complaining. + devFuncs->vkGetImageMemoryRequirements(dev, images[i], &memReq); + } + + VkMemoryAllocateInfo memInfo; + memset(&memInfo, 0, sizeof(memInfo)); + memInfo.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO; + memInfo.allocationSize = aligned(memReq.size, memReq.alignment) * count; + + uint32_t startIndex = 0; + do { + memInfo.memoryTypeIndex = chooseTransientImageMemType(images[0], startIndex); + if (memInfo.memoryTypeIndex == uint32_t(-1)) { + qWarning("QVulkanWindow: No suitable memory type found"); + return false; + } + startIndex = memInfo.memoryTypeIndex + 1; + qCDebug(lcVk, "Allocating %u bytes for transient image (memtype %u)", + uint32_t(memInfo.allocationSize), memInfo.memoryTypeIndex); + err = devFuncs->vkAllocateMemory(dev, &memInfo, nullptr, mem); + if (err != VK_SUCCESS && err != VK_ERROR_OUT_OF_DEVICE_MEMORY) { + qWarning("QVulkanWindow: Failed to allocate image memory: %d", err); + return false; + } + } while (err != VK_SUCCESS); + + VkDeviceSize ofs = 0; + for (int i = 0; i < count; ++i) { + err = devFuncs->vkBindImageMemory(dev, images[i], *mem, ofs); + if (err != VK_SUCCESS) { + qWarning("QVulkanWindow: Failed to bind image memory: %d", err); + return false; + } + ofs += aligned(memReq.size, memReq.alignment); + + VkImageViewCreateInfo imgViewInfo; + memset(&imgViewInfo, 0, sizeof(imgViewInfo)); + imgViewInfo.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO; + imgViewInfo.image = images[i]; + imgViewInfo.viewType = VK_IMAGE_VIEW_TYPE_2D; + imgViewInfo.format = format; + imgViewInfo.components.r = VK_COMPONENT_SWIZZLE_R; + imgViewInfo.components.g = VK_COMPONENT_SWIZZLE_G; + imgViewInfo.components.b = VK_COMPONENT_SWIZZLE_B; + imgViewInfo.components.a = VK_COMPONENT_SWIZZLE_A; + imgViewInfo.subresourceRange.aspectMask = aspectMask; + imgViewInfo.subresourceRange.levelCount = imgViewInfo.subresourceRange.layerCount = 1; + + err = devFuncs->vkCreateImageView(dev, &imgViewInfo, nullptr, views + i); + if (err != VK_SUCCESS) { + qWarning("QVulkanWindow: Failed to create image view: %d", err); + return false; + } + } + + return true; +} + +void QVulkanWindowPrivate::releaseSwapChain() +{ + if (!dev || !swapChain) // do not rely on 'status', a half done init must be cleaned properly too + return; + + qCDebug(lcVk, "Releasing swapchain"); + + devFuncs->vkDeviceWaitIdle(dev); + + if (renderer) { + renderer->releaseSwapChainResources(); + devFuncs->vkDeviceWaitIdle(dev); + } + + for (int i = 0; i < frameLag; ++i) { + FrameResources &frame(frameRes[i]); + if (frame.fence) { + if (frame.fenceWaitable) + devFuncs->vkWaitForFences(dev, 1, &frame.fence, VK_TRUE, UINT64_MAX); + devFuncs->vkDestroyFence(dev, frame.fence, nullptr); + frame.fence = VK_NULL_HANDLE; + frame.fenceWaitable = false; + } + if (frame.imageSem) { + devFuncs->vkDestroySemaphore(dev, frame.imageSem, nullptr); + frame.imageSem = VK_NULL_HANDLE; + } + if (frame.drawSem) { + devFuncs->vkDestroySemaphore(dev, frame.drawSem, nullptr); + frame.drawSem = VK_NULL_HANDLE; + } + if (frame.presTransSem) { + devFuncs->vkDestroySemaphore(dev, frame.presTransSem, nullptr); + frame.presTransSem = VK_NULL_HANDLE; + } + } + + for (int i = 0; i < swapChainBufferCount; ++i) { + ImageResources &image(imageRes[i]); + if (image.cmdFence) { + if (image.cmdFenceWaitable) + devFuncs->vkWaitForFences(dev, 1, &image.cmdFence, VK_TRUE, UINT64_MAX); + devFuncs->vkDestroyFence(dev, image.cmdFence, nullptr); + image.cmdFence = VK_NULL_HANDLE; + image.cmdFenceWaitable = false; + } + if (image.fb) { + devFuncs->vkDestroyFramebuffer(dev, image.fb, nullptr); + image.fb = VK_NULL_HANDLE; + } + if (image.imageView) { + devFuncs->vkDestroyImageView(dev, image.imageView, nullptr); + image.imageView = VK_NULL_HANDLE; + } + if (image.cmdBuf) { + devFuncs->vkFreeCommandBuffers(dev, cmdPool, 1, &image.cmdBuf); + image.cmdBuf = VK_NULL_HANDLE; + } + if (image.presTransCmdBuf) { + devFuncs->vkFreeCommandBuffers(dev, presCmdPool, 1, &image.presTransCmdBuf); + image.presTransCmdBuf = VK_NULL_HANDLE; + } + if (image.msaaImageView) { + devFuncs->vkDestroyImageView(dev, image.msaaImageView, nullptr); + image.msaaImageView = VK_NULL_HANDLE; + } + if (image.msaaImage) { + devFuncs->vkDestroyImage(dev, image.msaaImage, nullptr); + image.msaaImage = VK_NULL_HANDLE; + } + } + + if (msaaImageMem) { + devFuncs->vkFreeMemory(dev, msaaImageMem, nullptr); + msaaImageMem = VK_NULL_HANDLE; + } + + if (dsView) { + devFuncs->vkDestroyImageView(dev, dsView, nullptr); + dsView = VK_NULL_HANDLE; + } + if (dsImage) { + devFuncs->vkDestroyImage(dev, dsImage, nullptr); + dsImage = VK_NULL_HANDLE; + } + if (dsMem) { + devFuncs->vkFreeMemory(dev, dsMem, nullptr); + dsMem = VK_NULL_HANDLE; + } + + if (swapChain) { + vkDestroySwapchainKHR(dev, swapChain, nullptr); + swapChain = VK_NULL_HANDLE; + } + + if (status == StatusReady) + status = StatusDeviceReady; +} + +/*! + \internal + */ +void QVulkanWindow::exposeEvent(QExposeEvent *) +{ + Q_D(QVulkanWindow); + + if (isExposed()) { + d->ensureStarted(); + } else { + if (!d->flags.testFlag(PersistentResources)) { + d->releaseSwapChain(); + d->reset(); + } + } +} + +void QVulkanWindowPrivate::ensureStarted() +{ + Q_Q(QVulkanWindow); + if (status == QVulkanWindowPrivate::StatusFailRetry) + status = QVulkanWindowPrivate::StatusUninitialized; + if (status == QVulkanWindowPrivate::StatusUninitialized) { + init(); + if (status == QVulkanWindowPrivate::StatusDeviceReady) + recreateSwapChain(); + } + if (status == QVulkanWindowPrivate::StatusReady) + q->requestUpdate(); +} + +/*! + \internal + */ +void QVulkanWindow::resizeEvent(QResizeEvent *) +{ + // Nothing to do here - recreating the swapchain is handled when building the next frame. +} + +/*! + \internal + */ +bool QVulkanWindow::event(QEvent *e) +{ + Q_D(QVulkanWindow); + + switch (e->type()) { + case QEvent::UpdateRequest: + d->beginFrame(); + break; + + // The swapchain must be destroyed before the surface as per spec. This is + // not ideal for us because the surface is managed by the QPlatformWindow + // which may be gone already when the unexpose comes, making the validation + // layer scream. The solution is to listen to the PlatformSurface events. + case QEvent::PlatformSurface: + if (static_cast<QPlatformSurfaceEvent *>(e)->surfaceEventType() == QPlatformSurfaceEvent::SurfaceAboutToBeDestroyed) { + d->releaseSwapChain(); + d->reset(); + } + break; + + default: + break; + } + + return QWindow::event(e); +} + +/*! + Returns true if this window has successfully initialized all Vulkan + resources, including the swapchain. + + \note Initialization happens on the first expose event after the window is + made visible. + */ +bool QVulkanWindow::isValid() const +{ + Q_D(const QVulkanWindow); + return d->status == QVulkanWindowPrivate::StatusReady; +} + +/*! + Returns a new instance of QVulkanWindowRenderer. + + This virtual function is called once during the lifetime of the window, at + some point after making it visible for the first time. + + The default implementation returns null and so no rendering will be + performed apart from clearing the buffers. + + The window takes ownership of the returned renderer object. + */ +QVulkanWindowRenderer *QVulkanWindow::createRenderer() +{ + return nullptr; +} + +/*! + Virtual destructor. + */ +QVulkanWindowRenderer::~QVulkanWindowRenderer() +{ +} + +/*! + This virtual function is called right before graphics initialization, that + ends up in calling initResources(), is about to begin. + + Normally there is no need to reimplement this function. However, there are + cases that involve decisions based on both the physical device and the + surface. These cannot normally be performed before making the QVulkanWindow + visible since the Vulkan surface is not retrievable at that stage. + + Instead, applications can reimplement this function. Here both + QVulkanWindow::physicalDevice() and QVulkanInstance::surfaceForWindow() are + functional, but no further logical device initialization has taken place + yet. + + The default implementation is empty. + */ +void QVulkanWindowRenderer::preInitResources() +{ +} + +/*! + This virtual function is called when it is time to create the renderer's + graphics resources. + + Depending on the QVulkanWindow::PersistentResources flag, device lost + situations, etc. this function may be called more than once during the + lifetime of a QVulkanWindow. However, subsequent invocations are always + preceded by a call to releaseResources(). + + Accessors like device(), graphicsQueue() and graphicsCommandPool() are only + guaranteed to return valid values inside this function and afterwards, up + until releaseResources() is called. + + The default implementation is empty. + */ +void QVulkanWindowRenderer::initResources() +{ +} + +/*! + This virtual function is called when swapchain, framebuffer or renderpass + related initialization can be performed. Swapchain and related resources + are reset and then recreated in response to window resize events, and + therefore a pair of calls to initResources() and releaseResources() can + have multiple calls to initSwapChainResources() and + releaseSwapChainResources() calls in-between. + + Accessors like QVulkanWindow::swapChainImageSize() are only guaranteed to + return valid values inside this function and afterwards, up until + releaseSwapChainResources() is called. + + This is also the place where size-dependent calculations (for example, the + projection matrix) should be made since this function is called effectively + on every resize. + + The default implementation is empty. + */ +void QVulkanWindowRenderer::initSwapChainResources() +{ +} + +/*! + This virtual function is called when swapchain, framebuffer or renderpass + related resources must be released. + + The implementation must be prepared that a call to this function may be + followed by a new call to initSwapChainResources() at a later point. + + QVulkanWindow takes care of waiting for the device to become idle before + and after invoking this function. + + The default implementation is empty. + + \note This is the last place to act with all graphics resources intact + before QVulkanWindow starts releasing them. It is therefore essential that + implementations with an asynchronous, potentially multi-threaded + startNextFrame() perform a blocking wait and call + QVulkanWindow::frameReady() before returning from this function in case + there is a pending frame submission. + */ +void QVulkanWindowRenderer::releaseSwapChainResources() +{ +} + +/*! + This virtual function is called when the renderer's graphics resources must be + released. + + The implementation must be prepared that a call to this function may be + followed by an initResources() at a later point. + + QVulkanWindow takes care of waiting for the device to become idle before + and after invoking this function. + + The default implementation is empty. + */ +void QVulkanWindowRenderer::releaseResources() +{ +} + +/*! + \fn QVulkanWindowRenderer::startNextFrame() + + This virtual function is called when the draw calls for the next frame are + to be added to the command buffer. + + Each call to this function must be followed by a call to + QVulkanWindow::frameReady(). Failing to do so will stall the rendering + loop. The call can also be made at a later time, after returning from this + function. This means that it is possible to kick off asynchronous work, and + only update the command buffer and notify QVulkanWindow when that work has + finished. + + All Vulkan resources are initialized and ready when this function is + invoked. The current framebuffer and main command buffer can be retrieved + via QVulkanWindow::currentFramebuffer() and + QVulkanWindow::currentCommandBuffer(). The logical device and the active + graphics queue are available via QVulkanWindow::device() and + QVulkanWindow::graphicsQueue(). Implementations can create additional + command buffers from the pool returned by + QVulkanWindow::graphicsCommandPool(). For convenience, the index of a host + visible and device local memory type index are exposed via + QVulkanWindow::hostVisibleMemoryIndex() and + QVulkanWindow::deviceLocalMemoryIndex(). All these accessors are safe to be + called from any thread. + + \sa QVulkanWindow::frameReady(), QVulkanWindow + */ + +/*! + This virtual function is called when the physical device is lost, meaning + the creation of the logical device fails with \c{VK_ERROR_DEVICE_LOST}. + + The default implementation is empty. + + There is typically no need to perform anything special in this function + because QVulkanWindow will automatically retry to initialize itself after a + certain amount of time. + + \sa logicalDeviceLost() + */ +void QVulkanWindowRenderer::physicalDeviceLost() +{ +} + +/*! + This virtual function is called when the logical device (VkDevice) is lost, + meaning some operation failed with \c{VK_ERROR_DEVICE_LOST}. + + The default implementation is empty. + + There is typically no need to perform anything special in this function. + QVulkanWindow will automatically release all resources (invoking + releaseSwapChainResources() and releaseResources() as necessary) and will + attempt to reinitialize, acquiring a new device. When the physical device + was also lost, this reinitialization attempt may then result in + physicalDeviceLost(). + + \sa physicalDeviceLost() + */ +void QVulkanWindowRenderer::logicalDeviceLost() +{ +} + +void QVulkanWindowPrivate::beginFrame() +{ + if (!swapChain || framePending) + return; + + Q_Q(QVulkanWindow); + if (q->size() * q->devicePixelRatio() != swapChainImageSize) { + recreateSwapChain(); + if (!swapChain) + return; + } + + FrameResources &frame(frameRes[currentFrame]); + + if (!frame.imageAcquired) { + // Wait if we are too far ahead, i.e. the thread gets throttled based on the presentation rate + // (note that we are using FIFO mode -> vsync) + if (frame.fenceWaitable) { + devFuncs->vkWaitForFences(dev, 1, &frame.fence, VK_TRUE, UINT64_MAX); + devFuncs->vkResetFences(dev, 1, &frame.fence); + frame.fenceWaitable = false; + } + + // move on to next swapchain image + VkResult err = vkAcquireNextImageKHR(dev, swapChain, UINT64_MAX, + frame.imageSem, frame.fence, ¤tImage); + if (err == VK_SUCCESS || err == VK_SUBOPTIMAL_KHR) { + frame.imageSemWaitable = true; + frame.imageAcquired = true; + frame.fenceWaitable = true; + } else if (err == VK_ERROR_OUT_OF_DATE_KHR) { + recreateSwapChain(); + q->requestUpdate(); + return; + } else { + if (!checkDeviceLost(err)) + qWarning("QVulkanWindow: Failed to acquire next swapchain image: %d", err); + q->requestUpdate(); + return; + } + } + + // make sure the previous draw for the same image has finished + ImageResources &image(imageRes[currentImage]); + if (image.cmdFenceWaitable) { + devFuncs->vkWaitForFences(dev, 1, &image.cmdFence, VK_TRUE, UINT64_MAX); + devFuncs->vkResetFences(dev, 1, &image.cmdFence); + image.cmdFenceWaitable = false; + } + + // build new draw command buffer + if (image.cmdBuf) { + devFuncs->vkFreeCommandBuffers(dev, cmdPool, 1, &image.cmdBuf); + image.cmdBuf = 0; + } + + VkCommandBufferAllocateInfo cmdBufInfo = { + VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO, nullptr, cmdPool, VK_COMMAND_BUFFER_LEVEL_PRIMARY, 1 }; + VkResult err = devFuncs->vkAllocateCommandBuffers(dev, &cmdBufInfo, &image.cmdBuf); + if (err != VK_SUCCESS) { + if (!checkDeviceLost(err)) + qWarning("QVulkanWindow: Failed to allocate frame command buffer: %d", err); + return; + } + + VkCommandBufferBeginInfo cmdBufBeginInfo = { + VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO, nullptr, 0, nullptr }; + err = devFuncs->vkBeginCommandBuffer(image.cmdBuf, &cmdBufBeginInfo); + if (err != VK_SUCCESS) { + if (!checkDeviceLost(err)) + qWarning("QVulkanWindow: Failed to begin frame command buffer: %d", err); + return; + } + + if (frameGrabbing) + frameGrabTargetImage = QImage(swapChainImageSize, QImage::Format_RGBA8888); + + if (renderer) { + framePending = true; + renderer->startNextFrame(); + // done for now - endFrame() will get invoked when frameReady() is called back + } else { + VkClearColorValue clearColor = { 0.0f, 0.0f, 0.0f, 1.0f }; + VkClearDepthStencilValue clearDS = { 1.0f, 0 }; + VkClearValue clearValues[3]; + memset(clearValues, 0, sizeof(clearValues)); + clearValues[0].color = clearValues[2].color = clearColor; + clearValues[1].depthStencil = clearDS; + + VkRenderPassBeginInfo rpBeginInfo; + memset(&rpBeginInfo, 0, sizeof(rpBeginInfo)); + rpBeginInfo.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO; + rpBeginInfo.renderPass = defaultRenderPass; + rpBeginInfo.framebuffer = image.fb; + rpBeginInfo.renderArea.extent.width = swapChainImageSize.width(); + rpBeginInfo.renderArea.extent.height = swapChainImageSize.height(); + rpBeginInfo.clearValueCount = sampleCount > VK_SAMPLE_COUNT_1_BIT ? 3 : 2; + rpBeginInfo.pClearValues = clearValues; + devFuncs->vkCmdBeginRenderPass(image.cmdBuf, &rpBeginInfo, VK_SUBPASS_CONTENTS_INLINE); + devFuncs->vkCmdEndRenderPass(image.cmdBuf); + + endFrame(); + } +} + +void QVulkanWindowPrivate::endFrame() +{ + Q_Q(QVulkanWindow); + + FrameResources &frame(frameRes[currentFrame]); + ImageResources &image(imageRes[currentImage]); + + if (gfxQueueFamilyIdx != presQueueFamilyIdx && !frameGrabbing) { + // Add the swapchain image release to the command buffer that will be + // submitted to the graphics queue. + VkImageMemoryBarrier presTrans; + memset(&presTrans, 0, sizeof(presTrans)); + presTrans.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER; + presTrans.dstAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT; + presTrans.oldLayout = presTrans.newLayout = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR; + presTrans.srcQueueFamilyIndex = gfxQueueFamilyIdx; + presTrans.dstQueueFamilyIndex = presQueueFamilyIdx; + presTrans.image = image.image; + presTrans.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; + presTrans.subresourceRange.levelCount = presTrans.subresourceRange.layerCount = 1; + devFuncs->vkCmdPipelineBarrier(image.cmdBuf, + VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, + VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, + 0, 0, nullptr, 0, nullptr, + 1, &presTrans); + } + + // When grabbing a frame, add a readback at the end and skip presenting. + if (frameGrabbing) + addReadback(); + + VkResult err = devFuncs->vkEndCommandBuffer(image.cmdBuf); + if (err != VK_SUCCESS) { + if (!checkDeviceLost(err)) + qWarning("QVulkanWindow: Failed to end frame command buffer: %d", err); + return; + } + + // submit draw calls + VkSubmitInfo submitInfo; + memset(&submitInfo, 0, sizeof(submitInfo)); + submitInfo.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO; + submitInfo.commandBufferCount = 1; + submitInfo.pCommandBuffers = &image.cmdBuf; + if (frame.imageSemWaitable) { + submitInfo.waitSemaphoreCount = 1; + submitInfo.pWaitSemaphores = &frame.imageSem; + } + if (!frameGrabbing) { + submitInfo.signalSemaphoreCount = 1; + submitInfo.pSignalSemaphores = &frame.drawSem; + } + VkPipelineStageFlags psf = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT; + submitInfo.pWaitDstStageMask = &psf; + + Q_ASSERT(!image.cmdFenceWaitable); + + err = devFuncs->vkQueueSubmit(gfxQueue, 1, &submitInfo, image.cmdFence); + if (err == VK_SUCCESS) { + frame.imageSemWaitable = false; + image.cmdFenceWaitable = true; + } else { + if (!checkDeviceLost(err)) + qWarning("QVulkanWindow: Failed to submit to graphics queue: %d", err); + return; + } + + // block and then bail out when grabbing + if (frameGrabbing) { + finishBlockingReadback(); + frameGrabbing = false; + // Leave frame.imageAcquired set to true. + // Do not change currentFrame. + emit q->frameGrabbed(frameGrabTargetImage); + return; + } + + if (gfxQueueFamilyIdx != presQueueFamilyIdx) { + // Submit the swapchain image acquire to the present queue. + submitInfo.pWaitSemaphores = &frame.drawSem; + submitInfo.pSignalSemaphores = &frame.presTransSem; + submitInfo.pCommandBuffers = &image.presTransCmdBuf; // must be USAGE_SIMULTANEOUS + err = devFuncs->vkQueueSubmit(presQueue, 1, &submitInfo, VK_NULL_HANDLE); + if (err != VK_SUCCESS) { + if (!checkDeviceLost(err)) + qWarning("QVulkanWindow: Failed to submit to present queue: %d", err); + return; + } + } + + // queue present + VkPresentInfoKHR presInfo; + memset(&presInfo, 0, sizeof(presInfo)); + presInfo.sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR; + presInfo.swapchainCount = 1; + presInfo.pSwapchains = &swapChain; + presInfo.pImageIndices = ¤tImage; + presInfo.waitSemaphoreCount = 1; + presInfo.pWaitSemaphores = gfxQueueFamilyIdx == presQueueFamilyIdx ? &frame.drawSem : &frame.presTransSem; + + err = vkQueuePresentKHR(gfxQueue, &presInfo); + if (err != VK_SUCCESS) { + if (err == VK_ERROR_OUT_OF_DATE_KHR) { + recreateSwapChain(); + q->requestUpdate(); + return; + } else if (err != VK_SUBOPTIMAL_KHR) { + if (!checkDeviceLost(err)) + qWarning("QVulkanWindow: Failed to present: %d", err); + return; + } + } + + frame.imageAcquired = false; + + inst->presentQueued(q); + + currentFrame = (currentFrame + 1) % frameLag; +} + +/*! + This function must be called exactly once in response to each invocation of + the QVulkanWindowRenderer::startNextFrame() implementation. At the time of + this call, the main command buffer, exposed via currentCommandBuffer(), + must have all necessary rendering commands added to it since this function + will trigger submitting the commands and queuing the present command. + + \note This function must only be called from the gui/main thread, which is + where QVulkanWindowRenderer's functions are invoked and where the + QVulkanWindow instance lives. + + \sa QVulkanWindowRenderer::startNextFrame() + */ +void QVulkanWindow::frameReady() +{ + Q_ASSERT_X(QThread::currentThread() == QCoreApplication::instance()->thread(), + "QVulkanWindow", "frameReady() can only be called from the GUI (main) thread"); + + Q_D(QVulkanWindow); + + if (!d->framePending) { + qWarning("QVulkanWindow: frameReady() called without a corresponding startNextFrame()"); + return; + } + + d->framePending = false; + + d->endFrame(); +} + +bool QVulkanWindowPrivate::checkDeviceLost(VkResult err) +{ + if (err == VK_ERROR_DEVICE_LOST) { + qWarning("QVulkanWindow: Device lost"); + if (renderer) + renderer->logicalDeviceLost(); + qCDebug(lcVk, "Releasing all resources due to device lost"); + releaseSwapChain(); + reset(); + qCDebug(lcVk, "Restarting"); + ensureStarted(); + return true; + } + return false; +} + +void QVulkanWindowPrivate::addReadback() +{ + VkImageCreateInfo imageInfo; + memset(&imageInfo, 0, sizeof(imageInfo)); + imageInfo.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO; + imageInfo.imageType = VK_IMAGE_TYPE_2D; + imageInfo.format = VK_FORMAT_R8G8B8A8_UNORM; + imageInfo.extent.width = frameGrabTargetImage.width(); + imageInfo.extent.height = frameGrabTargetImage.height(); + imageInfo.extent.depth = 1; + imageInfo.mipLevels = 1; + imageInfo.arrayLayers = 1; + imageInfo.samples = VK_SAMPLE_COUNT_1_BIT; + imageInfo.tiling = VK_IMAGE_TILING_LINEAR; + imageInfo.usage = VK_IMAGE_USAGE_TRANSFER_DST_BIT; + imageInfo.initialLayout = VK_IMAGE_LAYOUT_PREINITIALIZED; + + VkResult err = devFuncs->vkCreateImage(dev, &imageInfo, nullptr, &frameGrabImage); + if (err != VK_SUCCESS) { + qWarning("QVulkanWindow: Failed to create image for readback: %d", err); + return; + } + + VkMemoryRequirements memReq; + devFuncs->vkGetImageMemoryRequirements(dev, frameGrabImage, &memReq); + + VkMemoryAllocateInfo allocInfo = { + VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, + nullptr, + memReq.size, + hostVisibleMemIndex + }; + + err = devFuncs->vkAllocateMemory(dev, &allocInfo, nullptr, &frameGrabImageMem); + if (err != VK_SUCCESS) { + qWarning("QVulkanWindow: Failed to allocate memory for readback image: %d", err); + return; + } + + err = devFuncs->vkBindImageMemory(dev, frameGrabImage, frameGrabImageMem, 0); + if (err != VK_SUCCESS) { + qWarning("QVulkanWindow: Failed to bind readback image memory: %d", err); + return; + } + + ImageResources &image(imageRes[currentImage]); + + VkImageMemoryBarrier barrier; + memset(&barrier, 0, sizeof(barrier)); + barrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER; + barrier.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; + barrier.subresourceRange.levelCount = barrier.subresourceRange.layerCount = 1; + + barrier.oldLayout = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR; + barrier.newLayout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL; + barrier.srcAccessMask = VK_ACCESS_MEMORY_READ_BIT; + barrier.dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT; + barrier.image = image.image; + + devFuncs->vkCmdPipelineBarrier(image.cmdBuf, + VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, + VK_PIPELINE_STAGE_TRANSFER_BIT, + 0, 0, nullptr, 0, nullptr, + 1, &barrier); + + barrier.oldLayout = VK_IMAGE_LAYOUT_PREINITIALIZED; + barrier.newLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL; + barrier.srcAccessMask = 0; + barrier.dstAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT; + barrier.image = frameGrabImage; + + devFuncs->vkCmdPipelineBarrier(image.cmdBuf, + VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, + VK_PIPELINE_STAGE_TRANSFER_BIT, + 0, 0, nullptr, 0, nullptr, + 1, &barrier); + + VkImageCopy copyInfo; + memset(©Info, 0, sizeof(copyInfo)); + copyInfo.srcSubresource.aspectMask = copyInfo.dstSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; + copyInfo.srcSubresource.layerCount = copyInfo.dstSubresource.layerCount = 1; + copyInfo.extent.width = frameGrabTargetImage.width(); + copyInfo.extent.height = frameGrabTargetImage.height(); + copyInfo.extent.depth = 1; + + devFuncs->vkCmdCopyImage(image.cmdBuf, image.image, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, + frameGrabImage, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 1, ©Info); + + barrier.oldLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL; + barrier.newLayout = VK_IMAGE_LAYOUT_GENERAL; + barrier.srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT; + barrier.dstAccessMask = VK_ACCESS_HOST_READ_BIT; + barrier.image = frameGrabImage; + + devFuncs->vkCmdPipelineBarrier(image.cmdBuf, + VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, + VK_PIPELINE_STAGE_TRANSFER_BIT, + 0, 0, nullptr, 0, nullptr, + 1, &barrier); +} + +void QVulkanWindowPrivate::finishBlockingReadback() +{ + ImageResources &image(imageRes[currentImage]); + + // Block until the current frame is done. Normally this wait would only be + // done in current + concurrentFrameCount(). + devFuncs->vkWaitForFences(dev, 1, &image.cmdFence, VK_TRUE, UINT64_MAX); + devFuncs->vkResetFences(dev, 1, &image.cmdFence); + // will reuse the same image for the next "real" frame, do not wait then + image.cmdFenceWaitable = false; + + VkImageSubresource subres = { VK_IMAGE_ASPECT_COLOR_BIT, 0, 0 }; + VkSubresourceLayout layout; + devFuncs->vkGetImageSubresourceLayout(dev, frameGrabImage, &subres, &layout); + + uchar *p; + VkResult err = devFuncs->vkMapMemory(dev, frameGrabImageMem, layout.offset, layout.size, 0, reinterpret_cast<void **>(&p)); + if (err != VK_SUCCESS) { + qWarning("QVulkanWindow: Failed to map readback image memory after transfer: %d", err); + return; + } + + for (int y = 0; y < frameGrabTargetImage.height(); ++y) { + memcpy(frameGrabTargetImage.scanLine(y), p, frameGrabTargetImage.width() * 4); + p += layout.rowPitch; + } + + devFuncs->vkUnmapMemory(dev, frameGrabImageMem); + + devFuncs->vkDestroyImage(dev, frameGrabImage, nullptr); + frameGrabImage = VK_NULL_HANDLE; + devFuncs->vkFreeMemory(dev, frameGrabImageMem, nullptr); + frameGrabImageMem = VK_NULL_HANDLE; +} + +/*! + Returns the active physical device. + + \note Calling this function is only valid from the invocation of + QVulkanWindowRenderer::preInitResources() up until + QVulkanWindowRenderer::releaseResources(). + */ +VkPhysicalDevice QVulkanWindow::physicalDevice() const +{ + Q_D(const QVulkanWindow); + if (d->physDevIndex < d->physDevs.count()) + return d->physDevs[d->physDevIndex]; + qWarning("QVulkanWindow: Physical device not available"); + return VK_NULL_HANDLE; +} + +/*! + Returns a pointer to the properties for the active physical device. + + \note Calling this function is only valid from the invocation of + QVulkanWindowRenderer::preInitResources() up until + QVulkanWindowRenderer::releaseResources(). + */ +const VkPhysicalDeviceProperties *QVulkanWindow::physicalDeviceProperties() const +{ + Q_D(const QVulkanWindow); + if (d->physDevIndex < d->physDevProps.count()) + return &d->physDevProps[d->physDevIndex]; + qWarning("QVulkanWindow: Physical device properties not available"); + return nullptr; +} + +/*! + Returns the active logical device. + + \note Calling this function is only valid from the invocation of + QVulkanWindowRenderer::initResources() up until + QVulkanWindowRenderer::releaseResources(). + */ +VkDevice QVulkanWindow::device() const +{ + Q_D(const QVulkanWindow); + return d->dev; +} + +/*! + Returns the active graphics queue. + + \note Calling this function is only valid from the invocation of + QVulkanWindowRenderer::initResources() up until + QVulkanWindowRenderer::releaseResources(). + */ +VkQueue QVulkanWindow::graphicsQueue() const +{ + Q_D(const QVulkanWindow); + return d->gfxQueue; +} + +/*! + Returns the active graphics command pool. + + \note Calling this function is only valid from the invocation of + QVulkanWindowRenderer::initResources() up until + QVulkanWindowRenderer::releaseResources(). + */ +VkCommandPool QVulkanWindow::graphicsCommandPool() const +{ + Q_D(const QVulkanWindow); + return d->cmdPool; +} + +/*! + Returns a host visible memory type index suitable for general use. + + The returned memory type will be both host visible and coherent. In + addition, it will also be cached, if possible. + + \note Calling this function is only valid from the invocation of + QVulkanWindowRenderer::initResources() up until + QVulkanWindowRenderer::releaseResources(). + */ +uint32_t QVulkanWindow::hostVisibleMemoryIndex() const +{ + Q_D(const QVulkanWindow); + return d->hostVisibleMemIndex; +} + +/*! + Returns a device local memory type index suitable for general use. + + \note Calling this function is only valid from the invocation of + QVulkanWindowRenderer::initResources() up until + QVulkanWindowRenderer::releaseResources(). + */ +uint32_t QVulkanWindow::deviceLocalMemoryIndex() const +{ + Q_D(const QVulkanWindow); + return d->deviceLocalMemIndex; +} + +/*! + Returns a typical render pass with one sub-pass. + + \note Applications are not required to use this render pass. However, they + are then responsible for ensuring the current swap chain and depth-stencil + images get transitioned from \c{VK_IMAGE_LAYOUT_UNDEFINED} to + \c{VK_IMAGE_LAYOUT_PRESENT_SRC_KHR} and + \c{VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL} either via the + application's custom render pass or by other means. + + \note Stencil read/write is not enabled in this render pass. + + \note Calling this function is only valid from the invocation of + QVulkanWindowRenderer::initResources() up until + QVulkanWindowRenderer::releaseResources(). + + \sa currentFramebuffer() + */ +VkRenderPass QVulkanWindow::defaultRenderPass() const +{ + Q_D(const QVulkanWindow); + return d->defaultRenderPass; +} + +/*! + Returns the color buffer format used by the swapchain. + + \note Calling this function is only valid from the invocation of + QVulkanWindowRenderer::initResources() up until + QVulkanWindowRenderer::releaseResources(). + + \sa setPreferredColorFormats() + */ +VkFormat QVulkanWindow::colorFormat() const +{ + Q_D(const QVulkanWindow); + return d->colorFormat; +} + +/*! + Returns the format used by the depth-stencil buffer(s). + + \note Calling this function is only valid from the invocation of + QVulkanWindowRenderer::initResources() up until + QVulkanWindowRenderer::releaseResources(). + */ +VkFormat QVulkanWindow::depthStencilFormat() const +{ + Q_D(const QVulkanWindow); + return d->dsFormat; +} + +/*! + Returns the image size of the swapchain. + + This usually matches the size of the window, but may also differ in case + \c vkGetPhysicalDeviceSurfaceCapabilitiesKHR reports a fixed size. + + \note Calling this function is only valid from the invocation of + QVulkanWindowRenderer::initSwapChainResources() up until + QVulkanWindowRenderer::releaseSwapChainResources(). + */ +QSize QVulkanWindow::swapChainImageSize() const +{ + Q_D(const QVulkanWindow); + return d->swapChainImageSize; +} + +/*! + Returns The active command buffer for the current swap chain image. + Implementations of QVulkanWindowRenderer::startNextFrame() are expected to + add commands to this command buffer. + + \note This function must only be called from within startNextFrame() and, in + case of asynchronous command generation, up until the call to frameReady(). + */ +VkCommandBuffer QVulkanWindow::currentCommandBuffer() const +{ + Q_D(const QVulkanWindow); + if (!d->framePending) { + qWarning("QVulkanWindow: Attempted to call currentCommandBuffer() without an active frame"); + return VK_NULL_HANDLE; + } + return d->imageRes[d->currentImage].cmdBuf; +} + +/*! + Returns a VkFramebuffer for the current swapchain image using the default + render pass. + + The framebuffer has two attachments (color, depth-stencil) when + multisampling is not in use, and three (color resolve, depth-stencil, + multisample color) when sampleCountFlagBits() is greater than + \c{VK_SAMPLE_COUNT_1_BIT}. Renderers must take this into account, for + example when providing clear values. + + \note Applications are not required to use this framebuffer in case they + provide their own render pass instead of using the one returned from + defaultRenderPass(). + + \note This function must only be called from within startNextFrame() and, in + case of asynchronous command generation, up until the call to frameReady(). + + \sa defaultRenderPass() + */ +VkFramebuffer QVulkanWindow::currentFramebuffer() const +{ + Q_D(const QVulkanWindow); + if (!d->framePending) { + qWarning("QVulkanWindow: Attempted to call currentFramebuffer() without an active frame"); + return VK_NULL_HANDLE; + } + return d->imageRes[d->currentImage].fb; +} + +/*! + Returns the current frame index in the range [0, concurrentFrameCount() - 1]. + + Renderer implementations will have to ensure that uniform data and other + dynamic resources exist in multiple copies, in order to prevent frame N + altering the data used by the still-active frames N - 1, N - 2, ... N - + concurrentFrameCount() + 1. + + To avoid relying on dynamic array sizes, applications can use + MAX_CONCURRENT_FRAME_COUNT when declaring arrays. This is guaranteed to be + always equal to or greater than the value returned from + concurrentFrameCount(). Such arrays can then be indexed by the value + returned from this function. + + \code + class Renderer { + ... + VkDescriptorBufferInfo m_uniformBufInfo[QVulkanWindow::MAX_CONCURRENT_FRAME_COUNT]; + }; + + void Renderer::startNextFrame() + { + VkDescriptorBufferInfo &uniformBufInfo(m_uniformBufInfo[m_window->currentFrame()]); + ... + } + \endcode + + \note This function must only be called from within startNextFrame() and, in + case of asynchronous command generation, up until the call to frameReady(). + + \sa concurrentFrameCount() + */ +int QVulkanWindow::currentFrame() const +{ + Q_D(const QVulkanWindow); + if (!d->framePending) + qWarning("QVulkanWindow: Attempted to call currentFrame() without an active frame"); + return d->currentFrame; +} + +/*! + \variable QVulkanWindow::MAX_CONCURRENT_FRAME_COUNT + + \brief A constant value that is always equal to or greater than the maximum value + of concurrentFrameCount(). + */ + +/*! + Returns the number of frames that can be potentially active at the same time. + + \note The value is constant for the entire lifetime of the QVulkanWindow. + + \code + class Renderer { + ... + VkDescriptorBufferInfo m_uniformBufInfo[QVulkanWindow::MAX_CONCURRENT_FRAME_COUNT]; + }; + + void Renderer::startNextFrame() + { + const int count = m_window->concurrentFrameCount(); + for (int i = 0; i < count; ++i) + m_uniformBufInfo[i] = ... + ... + } + \endcode + + \sa currentFrame() + */ +int QVulkanWindow::concurrentFrameCount() const +{ + Q_D(const QVulkanWindow); + return d->frameLag; +} + +/*! + Returns the number of images in the swap chain. + + \note Accessing this is necessary when providing a custom render pass and + framebuffer. The framebuffer is specific to the current swapchain image and + hence the application must provide multiple framebuffers. + + \note Calling this function is only valid from the invocation of + QVulkanWindowRenderer::initSwapChainResources() up until + QVulkanWindowRenderer::releaseSwapChainResources(). + */ +int QVulkanWindow::swapChainImageCount() const +{ + Q_D(const QVulkanWindow); + return d->swapChainBufferCount; +} + +/*! + Returns the current swap chain image index in the range [0, swapChainImageCount() - 1]. + + \note This function must only be called from within startNextFrame() and, in + case of asynchronous command generation, up until the call to frameReady(). + */ +int QVulkanWindow::currentSwapChainImageIndex() const +{ + Q_D(const QVulkanWindow); + if (!d->framePending) + qWarning("QVulkanWindow: Attempted to call currentSwapChainImageIndex() without an active frame"); + return d->currentImage; +} + +/*! + Returns the specified swap chain image. + + \a idx must be in the range [0, swapChainImageCount() - 1]. + + \note Calling this function is only valid from the invocation of + QVulkanWindowRenderer::initSwapChainResources() up until + QVulkanWindowRenderer::releaseSwapChainResources(). + */ +VkImage QVulkanWindow::swapChainImage(int idx) const +{ + Q_D(const QVulkanWindow); + return idx >= 0 && idx < d->swapChainBufferCount ? d->imageRes[idx].image : VK_NULL_HANDLE; +} + +/*! + Returns the specified swap chain image view. + + \a idx must be in the range [0, swapChainImageCount() - 1]. + + \note Calling this function is only valid from the invocation of + QVulkanWindowRenderer::initSwapChainResources() up until + QVulkanWindowRenderer::releaseSwapChainResources(). + */ +VkImageView QVulkanWindow::swapChainImageView(int idx) const +{ + Q_D(const QVulkanWindow); + return idx >= 0 && idx < d->swapChainBufferCount ? d->imageRes[idx].imageView : VK_NULL_HANDLE; +} + +/*! + Returns the depth-stencil image. + + \note Calling this function is only valid from the invocation of + QVulkanWindowRenderer::initSwapChainResources() up until + QVulkanWindowRenderer::releaseSwapChainResources(). + */ +VkImage QVulkanWindow::depthStencilImage() const +{ + Q_D(const QVulkanWindow); + return d->dsImage; +} + +/*! + Returns the depth-stencil image view. + + \note Calling this function is only valid from the invocation of + QVulkanWindowRenderer::initSwapChainResources() up until + QVulkanWindowRenderer::releaseSwapChainResources(). + */ +VkImageView QVulkanWindow::depthStencilImageView() const +{ + Q_D(const QVulkanWindow); + return d->dsView; +} + +/*! + Returns the current sample count as a \c VkSampleCountFlagBits value. + + When targeting the default render target, the \c rasterizationSamples field + of \c VkPipelineMultisampleStateCreateInfo must be set to this value. + + \sa setSampleCount(), supportedSampleCounts() + */ +VkSampleCountFlagBits QVulkanWindow::sampleCountFlagBits() const +{ + Q_D(const QVulkanWindow); + return d->sampleCount; +} + +/*! + Returns the specified multisample color image, or \c{VK_NULL_HANDLE} if + multisampling is not in use. + + \a idx must be in the range [0, swapChainImageCount() - 1]. + + \note Calling this function is only valid from the invocation of + QVulkanWindowRenderer::initSwapChainResources() up until + QVulkanWindowRenderer::releaseSwapChainResources(). + */ +VkImage QVulkanWindow::msaaColorImage(int idx) const +{ + Q_D(const QVulkanWindow); + return idx >= 0 && idx < d->swapChainBufferCount ? d->imageRes[idx].msaaImage : VK_NULL_HANDLE; +} + +/*! + Returns the specified multisample color image view, or \c{VK_NULL_HANDLE} if + multisampling is not in use. + + \a idx must be in the range [0, swapChainImageCount() - 1]. + + \note Calling this function is only valid from the invocation of + QVulkanWindowRenderer::initSwapChainResources() up until + QVulkanWindowRenderer::releaseSwapChainResources(). + */ +VkImageView QVulkanWindow::msaaColorImageView(int idx) const +{ + Q_D(const QVulkanWindow); + return idx >= 0 && idx < d->swapChainBufferCount ? d->imageRes[idx].msaaImageView : VK_NULL_HANDLE; +} + +/*! + Returns true if the swapchain supports usage as transfer source, meaning + grab() is functional. + + \note Calling this function is only valid from the invocation of + QVulkanWindowRenderer::initSwapChainResources() up until + QVulkanWindowRenderer::releaseSwapChainResources(). + */ +bool QVulkanWindow::supportsGrab() const +{ + Q_D(const QVulkanWindow); + return d->swapChainSupportsReadBack; +} + +/*! + \fn void QVulkanWindow::frameGrabbed(const QImage &image) + + This signal is emitted when the \a image is ready. +*/ + +/*! + Builds and renders the next frame without presenting it, then performs a + blocking readback of the image content. + + Returns the image if the renderer's + \l{QVulkanWindowRenderer::startNextFrame()}{startNextFrame()} + implementation calls back frameReady() directly. Otherwise, returns an + incomplete image, that has the correct size but not the content yet. The + content will be delivered via the frameGrabbed() signal in the latter case. + + \note This function should not be called when a frame is in progress + (that is, frameReady() has not yet been called back by the application). + + \note This function is potentially expensive due to the additional, + blocking readback. + + \note This function currently requires that the swapchain supports usage as + a transfer source (\c{VK_IMAGE_USAGE_TRANSFER_SRC_BIT}), and will fail otherwise. + */ +QImage QVulkanWindow::grab() +{ + Q_D(QVulkanWindow); + if (!d->swapChain) { + qWarning("QVulkanWindow: Attempted to call grab() without a swapchain"); + return QImage(); + } + if (d->framePending) { + qWarning("QVulkanWindow: Attempted to call grab() while a frame is still pending"); + return QImage(); + } + if (!d->swapChainSupportsReadBack) { + qWarning("QVulkanWindow: Attempted to call grab() with a swapchain that does not support usage as transfer source"); + return QImage(); + } + + d->frameGrabbing = true; + d->beginFrame(); + + return d->frameGrabTargetImage; +} + +/*! + Returns a pointer to a QMatrix4x4 that can be used to correct for coordinate + system differences between OpenGL and Vulkan. + + By pre-multiplying the projection matrix with this matrix, applications can + continue to assume OpenGL-style Y coordinates in clip space (i.e. Y pointing + upwards), and can set minDepth and maxDepth to 0 and 1, respectively, + without any further corrections to the vertex Z positions, while using the + projection matrices retrieved from the QMatrix4x4 functions, such as + QMatrix4x4::perspective(), as-is. + + \note With vertex data following the default OpenGL rules (that is, the + front face being CCW), the correct winding order in the rasterization state + after applying this matrix is clockwise (\c{VK_FRONT_FACE_CLOCKWISE}). + */ +const QMatrix4x4 *QVulkanWindow::clipCorrectionMatrix() +{ + Q_D(QVulkanWindow); + if (d->m_clipCorrect.isIdentity()) { + // NB the ctor takes row-major + d->m_clipCorrect = QMatrix4x4(1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, -1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 0.5f, 0.5f, + 0.0f, 0.0f, 0.0f, 1.0f); + } + return &d->m_clipCorrect; +} + +QT_END_NAMESPACE diff --git a/src/gui/vulkan/qvulkanwindow.h b/src/gui/vulkan/qvulkanwindow.h new file mode 100644 index 0000000000..c32c40d459 --- /dev/null +++ b/src/gui/vulkan/qvulkanwindow.h @@ -0,0 +1,161 @@ +/**************************************************************************** +** +** 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 QVULKANWINDOW_H +#define QVULKANWINDOW_H + +#include <QtGui/qtguiglobal.h> + +#if QT_CONFIG(vulkan) || defined(Q_CLANG_QDOC) + +#include <QtGui/qvulkaninstance.h> +#include <QtGui/qwindow.h> +#include <QtGui/qimage.h> +#include <QtGui/qmatrix4x4.h> +#include <QtCore/qset.h> + +QT_BEGIN_NAMESPACE + +class QVulkanWindowPrivate; + +class Q_GUI_EXPORT QVulkanWindowRenderer +{ +public: + virtual ~QVulkanWindowRenderer(); + + virtual void preInitResources(); + virtual void initResources(); + virtual void initSwapChainResources(); + virtual void releaseSwapChainResources(); + virtual void releaseResources(); + + virtual void startNextFrame() = 0; + + virtual void physicalDeviceLost(); + virtual void logicalDeviceLost(); +}; + +class Q_GUI_EXPORT QVulkanWindow : public QWindow +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QVulkanWindow) + +public: + enum Flag { + PersistentResources = 0x01 + }; + Q_DECLARE_FLAGS(Flags, Flag) + + explicit QVulkanWindow(QWindow *parent = nullptr); + ~QVulkanWindow(); + + void setFlags(Flags flags); + Flags flags() const; + + QVector<VkPhysicalDeviceProperties> availablePhysicalDevices(); + void setPhysicalDeviceIndex(int idx); + + QVulkanInfoVector<QVulkanExtension> supportedDeviceExtensions(); + void setDeviceExtensions(const QByteArrayList &extensions); + + void setPreferredColorFormats(const QVector<VkFormat> &formats); + + QSet<int> supportedSampleCounts(); + void setSampleCount(int sampleCount); + + bool isValid() const; + + virtual QVulkanWindowRenderer *createRenderer(); + void frameReady(); + + VkPhysicalDevice physicalDevice() const; + const VkPhysicalDeviceProperties *physicalDeviceProperties() const; + VkDevice device() const; + VkQueue graphicsQueue() const; + VkCommandPool graphicsCommandPool() const; + uint32_t hostVisibleMemoryIndex() const; + uint32_t deviceLocalMemoryIndex() const; + VkRenderPass defaultRenderPass() const; + + VkFormat colorFormat() const; + VkFormat depthStencilFormat() const; + QSize swapChainImageSize() const; + + VkCommandBuffer currentCommandBuffer() const; + VkFramebuffer currentFramebuffer() const; + int currentFrame() const; + + static const int MAX_CONCURRENT_FRAME_COUNT = 3; + int concurrentFrameCount() const; + + int swapChainImageCount() const; + int currentSwapChainImageIndex() const; + VkImage swapChainImage(int idx) const; + VkImageView swapChainImageView(int idx) const; + VkImage depthStencilImage() const; + VkImageView depthStencilImageView() const; + + VkSampleCountFlagBits sampleCountFlagBits() const; + VkImage msaaColorImage(int idx) const; + VkImageView msaaColorImageView(int idx) const; + + bool supportsGrab() const; + QImage grab(); + + const QMatrix4x4 *clipCorrectionMatrix(); + +Q_SIGNALS: + void frameGrabbed(const QImage &image); + +protected: + void exposeEvent(QExposeEvent *) override; + void resizeEvent(QResizeEvent *) override; + bool event(QEvent *) override; + +private: + Q_DISABLE_COPY(QVulkanWindow) +}; + +Q_DECLARE_OPERATORS_FOR_FLAGS(QVulkanWindow::Flags) + +QT_END_NAMESPACE + +#endif // QT_CONFIG(vulkan) + +#endif diff --git a/src/gui/vulkan/qvulkanwindow_p.h b/src/gui/vulkan/qvulkanwindow_p.h new file mode 100644 index 0000000000..c6a772bc31 --- /dev/null +++ b/src/gui/vulkan/qvulkanwindow_p.h @@ -0,0 +1,188 @@ +/**************************************************************************** +** +** 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 QVULKANWINDOW_P_H +#define QVULKANWINDOW_P_H + +#include <QtGui/private/qtguiglobal_p.h> + +#if QT_CONFIG(vulkan) || defined(Q_CLANG_QDOC) + +#include "qvulkanwindow.h" +#include <QtCore/QHash> +#include <private/qwindow_p.h> + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of a number of Qt sources files. This header file may change from +// version to version without notice, or even be removed. +// +// We mean it. +// + +QT_BEGIN_NAMESPACE + +class QVulkanWindowPrivate : public QWindowPrivate +{ + Q_DECLARE_PUBLIC(QVulkanWindow) + +public: + ~QVulkanWindowPrivate(); + + void ensureStarted(); + void init(); + void reset(); + bool createDefaultRenderPass(); + void recreateSwapChain(); + uint32_t chooseTransientImageMemType(VkImage img, uint32_t startIndex); + bool createTransientImage(VkFormat format, VkImageUsageFlags usage, VkImageAspectFlags aspectMask, + VkImage *images, VkDeviceMemory *mem, VkImageView *views, int count); + void releaseSwapChain(); + void beginFrame(); + void endFrame(); + bool checkDeviceLost(VkResult err); + void addReadback(); + void finishBlockingReadback(); + + enum Status { + StatusUninitialized, + StatusFail, + StatusFailRetry, + StatusDeviceReady, + StatusReady + }; + Status status = StatusUninitialized; + QVulkanWindowRenderer *renderer = nullptr; + QVulkanInstance *inst = nullptr; + VkSurfaceKHR surface = VK_NULL_HANDLE; + int physDevIndex = 0; + QVector<VkPhysicalDevice> physDevs; + QVector<VkPhysicalDeviceProperties> physDevProps; + QVulkanWindow::Flags flags = 0; + QByteArrayList requestedDevExtensions; + QHash<VkPhysicalDevice, QVulkanInfoVector<QVulkanExtension> > supportedDevExtensions; + QVector<VkFormat> requestedColorFormats; + VkSampleCountFlagBits sampleCount = VK_SAMPLE_COUNT_1_BIT; + + VkDevice dev = VK_NULL_HANDLE; + QVulkanDeviceFunctions *devFuncs; + uint32_t gfxQueueFamilyIdx; + uint32_t presQueueFamilyIdx; + VkQueue gfxQueue; + VkQueue presQueue; + VkCommandPool cmdPool = VK_NULL_HANDLE; + VkCommandPool presCmdPool = VK_NULL_HANDLE; + uint32_t hostVisibleMemIndex; + uint32_t deviceLocalMemIndex; + VkFormat colorFormat; + VkColorSpaceKHR colorSpace; + VkFormat dsFormat = VK_FORMAT_D24_UNORM_S8_UINT; + + PFN_vkCreateSwapchainKHR vkCreateSwapchainKHR = nullptr; + PFN_vkDestroySwapchainKHR vkDestroySwapchainKHR; + PFN_vkGetSwapchainImagesKHR vkGetSwapchainImagesKHR; + PFN_vkAcquireNextImageKHR vkAcquireNextImageKHR; + PFN_vkQueuePresentKHR vkQueuePresentKHR; + PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR vkGetPhysicalDeviceSurfaceCapabilitiesKHR = nullptr; + PFN_vkGetPhysicalDeviceSurfaceFormatsKHR vkGetPhysicalDeviceSurfaceFormatsKHR; + + static const int MAX_SWAPCHAIN_BUFFER_COUNT = 3; + static const int MAX_FRAME_LAG = QVulkanWindow::MAX_CONCURRENT_FRAME_COUNT; + // QVulkanWindow only supports the always available FIFO mode. The + // rendering thread will get throttled to the presentation rate (vsync). + // This is in effect Example 5 from the VK_KHR_swapchain spec. + VkPresentModeKHR presentMode = VK_PRESENT_MODE_FIFO_KHR; + int swapChainBufferCount = 2; + int frameLag = 2; + + QSize swapChainImageSize; + VkSwapchainKHR swapChain = VK_NULL_HANDLE; + bool swapChainSupportsReadBack = false; + + struct ImageResources { + VkImage image = VK_NULL_HANDLE; + VkImageView imageView = VK_NULL_HANDLE; + VkCommandBuffer cmdBuf = VK_NULL_HANDLE; + VkFence cmdFence = VK_NULL_HANDLE; + bool cmdFenceWaitable = false; + VkFramebuffer fb = VK_NULL_HANDLE; + VkCommandBuffer presTransCmdBuf = VK_NULL_HANDLE; + VkImage msaaImage = VK_NULL_HANDLE; + VkImageView msaaImageView = VK_NULL_HANDLE; + } imageRes[MAX_SWAPCHAIN_BUFFER_COUNT]; + + VkDeviceMemory msaaImageMem = VK_NULL_HANDLE; + + uint32_t currentImage; + + struct FrameResources { + VkFence fence = VK_NULL_HANDLE; + bool fenceWaitable = false; + VkSemaphore imageSem = VK_NULL_HANDLE; + VkSemaphore drawSem = VK_NULL_HANDLE; + VkSemaphore presTransSem = VK_NULL_HANDLE; + bool imageAcquired = false; + bool imageSemWaitable = false; + } frameRes[MAX_FRAME_LAG]; + + uint32_t currentFrame; + + VkRenderPass defaultRenderPass = VK_NULL_HANDLE; + + VkDeviceMemory dsMem = VK_NULL_HANDLE; + VkImage dsImage = VK_NULL_HANDLE; + VkImageView dsView = VK_NULL_HANDLE; + + bool framePending = false; + bool frameGrabbing = false; + QImage frameGrabTargetImage; + VkImage frameGrabImage = VK_NULL_HANDLE; + VkDeviceMemory frameGrabImageMem = VK_NULL_HANDLE; + + QMatrix4x4 m_clipCorrect; +}; + +QT_END_NAMESPACE + +#endif // QT_CONFIG(vulkan) + +#endif 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<registry> + <comment> +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. + </comment> + + <!-- SECTION: Vulkan vendor IDs for physical devices without PCI vendor IDs --> + <vendorids> + <vendorid name="KHR" id="0x10000" comment="This is the next available Khronos vendor ID"/> + <vendorid name="VIV" id="0x10001" comment="Vivante vendor ID"/> + <vendorid name="VSI" id="0x10002" comment="VeriSilicon vendor ID"/> + </vendorids> + + <!-- SECTION: Vulkan vendor/author tags for extensions and layers --> + <tags> + <tag name="IMG" author="Imagination Technologies" contact="Michael Worcester @michaelworcester"/> + <tag name="AMD" author="Advanced Micro Devices, Inc." contact="Daniel Rakos @aqnuep"/> + <tag name="ARM" author="ARM Limited" contact="Jan-Harald Fredriksen @janharald"/> + <tag name="FSL" author="Freescale Semiconductor, Inc." contact="Norbert Nopper @FslNopper"/> + <tag name="BRCM" author="Broadcom Corporation" contact="Graeme Leese @gnl21"/> + <tag name="NXP" author="NXP Semiconductors N.V." contact="Norbert Nopper @FslNopper"/> + <tag name="NV" author="NVIDIA Corporation" contact="Daniel Koch @dgkoch"/> + <tag name="NVX" author="NVIDIA Corporation" contact="Daniel Koch @dgkoch"/> + <tag name="VIV" author="Vivante Corporation" contact="Yanjun Zhang @yanjunzhang"/> + <tag name="VSI" author="VeriSilicon Holdings Co., Ltd." contact="Yanjun Zhang @yanjunzhang"/> + <tag name="KDAB" author="KDAB" contact="Sean Harmer @seanharmer"/> + <tag name="ANDROID" author="Google, Inc." contact="Jesse Hall @jessehall"/> + <tag name="CHROMIUM" author="Google, Inc." contact="Jesse Hall @jessehall"/> + <tag name="GOOGLE" author="Google, Inc." contact="Jesse Hall @jessehall"/> + <tag name="QCOM" author="Qualcomm Technologies, Inc." contact="Maurice Ribble @mribble"/> + <tag name="LUNARG" author="LunarG, Inc." contact="Karen Ghavam @KarenGhavam"/> + <tag name="SAMSUNG" author="Samsung Electronics Co., Ltd." contact="Alon Or-bach @alonorbach"/> + <tag name="SEC" author="Samsung Electronics Co., Ltd." contact="Alon Or-bach @alonorbach"/> + <tag name="TIZEN" author="Samsung Electronics Co., Ltd." contact="Alon Or-bach @alonorbach"/> + <tag name="RENDERDOC" author="RenderDoc (renderdoc.org)" contact="baldurk@baldurk.org"/> + <tag name="NN" author="Nintendo Co., Ltd." contact="Yasuhiro Yoshioka @yoshioka_yasuhiro"/> + </tags> + + <!-- SECTION: Vulkan type definitions --> + <types> + <type name="vk_platform" category="include">#include "vk_platform.h"</type> + <!-- WSI extensions --> + <type category="include">#include "<name>vulkan.h</name>"</type> + <type category="include">#include <<name>X11/Xlib.h</name>></type> + <type category="include">#include <<name>X11/extensions/Xrandr.h</name>></type> + <type category="include">#include <<name>android/native_window.h</name>></type> + <type category="include">#include <<name>mir_toolkit/client_types.h</name>></type> + <type category="include">#include <<name>wayland-client.h</name>></type> + <type category="include">#include <<name>windows.h</name>></type> + <type category="include">#include <<name>xcb/xcb.h</name>></type> + + <type requires="X11/Xlib.h" name="Display"/> + <type requires="X11/Xlib.h" name="VisualID"/> + <type requires="X11/Xlib.h" name="Window"/> + <type requires="X11/extensions/Xrandr.h" name="RROutput"/> + <type requires="android/native_window.h" name="ANativeWindow"/> + <type requires="mir_toolkit/client_types.h" name="MirConnection"/> + <type requires="mir_toolkit/client_types.h" name="MirSurface"/> + <type requires="wayland-client.h" name="wl_display"/> + <type requires="wayland-client.h" name="wl_surface"/> + <type requires="windows.h" name="HINSTANCE"/> + <type requires="windows.h" name="HWND"/> + <type requires="windows.h" name="HANDLE"/> + <type requires="windows.h" name="SECURITY_ATTRIBUTES"/> + <type requires="windows.h" name="DWORD"/> + <type requires="xcb/xcb.h" name="xcb_connection_t"/> + <type requires="xcb/xcb.h" name="xcb_visualid_t"/> + <type requires="xcb/xcb.h" name="xcb_window_t"/> + + <type category="define">#define <name>VK_MAKE_VERSION</name>(major, minor, patch) \ + (((major) << 22) | ((minor) << 12) | (patch))</type> + <type category="define">#define <name>VK_VERSION_MAJOR</name>(version) ((uint32_t)(version) >> 22)</type> + <type category="define">#define <name>VK_VERSION_MINOR</name>(version) (((uint32_t)(version) >> 12) & 0x3ff)</type> + <type category="define">#define <name>VK_VERSION_PATCH</name>(version) ((uint32_t)(version) & 0xfff)</type> + + <type category="define">// 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 <name>VK_API_VERSION</name> <type>VK_MAKE_VERSION</type>(1, 0, 0)</type> <!-- The patch version here should never be set to anything other than 0 --> + <type category="define">// Vulkan 1.0 version number +#define <name>VK_API_VERSION_1_0</name> <type>VK_MAKE_VERSION</type>(1, 0, 0)</type> <!-- The patch version here should never be set to anything other than 0 --> + <type category="define">// Version of this file +#define <name>VK_HEADER_VERSION</name> 39</type> + + <type category="define"> +#define <name>VK_DEFINE_HANDLE</name>(object) typedef struct object##_T* object;</type> + + <type category="define" name="VK_DEFINE_NON_DISPATCHABLE_HANDLE"> +#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 + </type> + + <type category="define"> +#define <name>VK_NULL_HANDLE</name> 0 + </type> + + <type category="basetype">typedef <type>uint32_t</type> <name>VkSampleMask</name>;</type> + <type category="basetype">typedef <type>uint32_t</type> <name>VkBool32</name>;</type> + <type category="basetype">typedef <type>uint32_t</type> <name>VkFlags</name>;</type> + <type category="basetype">typedef <type>uint64_t</type> <name>VkDeviceSize</name>;</type> + <!-- Basic C types, pulled in via vk_platform.h --> + <type requires="vk_platform" name="void"/> + <type requires="vk_platform" name="char"/> + <type requires="vk_platform" name="float"/> + <type requires="vk_platform" name="uint8_t"/> + <type requires="vk_platform" name="uint32_t"/> + <type requires="vk_platform" name="uint64_t"/> + <type requires="vk_platform" name="int32_t"/> + <type requires="vk_platform" name="size_t"/> + <!-- Bitmask types --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkFramebufferCreateFlags</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkQueryPoolCreateFlags</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkRenderPassCreateFlags</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkSamplerCreateFlags</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineLayoutCreateFlags</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineCacheCreateFlags</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineDepthStencilStateCreateFlags</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineDynamicStateCreateFlags</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineColorBlendStateCreateFlags</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineMultisampleStateCreateFlags</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineRasterizationStateCreateFlags</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineViewportStateCreateFlags</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineTessellationStateCreateFlags</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineInputAssemblyStateCreateFlags</name>;</type><!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineVertexInputStateCreateFlags</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineShaderStageCreateFlags</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkDescriptorSetLayoutCreateFlags</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkBufferViewCreateFlags</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkInstanceCreateFlags</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkDeviceCreateFlags</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkDeviceQueueCreateFlags</name>;</type> <!-- creation flags --> + <type requires="VkQueueFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkQueueFlags</name>;</type> <!-- Queue capabilities --> + <type requires="VkMemoryPropertyFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkMemoryPropertyFlags</name>;</type> <!-- Memory properties passed into vkAllocateMemory(). --> + <type requires="VkMemoryHeapFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkMemoryHeapFlags</name>;</type> <!-- Memory heap flags --> + <type requires="VkAccessFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkAccessFlags</name>;</type> <!-- Memory access flags passed to barrier/dependency operations --> + <type requires="VkBufferUsageFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkBufferUsageFlags</name>;</type> <!-- Buffer usage flags --> + <type requires="VkBufferCreateFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkBufferCreateFlags</name>;</type> <!-- Buffer creation flags --> + <type requires="VkShaderStageFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkShaderStageFlags</name>;</type> <!-- Shader stage flags --> + <type requires="VkImageUsageFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkImageUsageFlags</name>;</type> <!-- Image usage flags --> + <type requires="VkImageCreateFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkImageCreateFlags</name>;</type> <!-- Image creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkImageViewCreateFlags</name>;</type> <!-- Image view creation flags (no bits yet) --> + <type requires="VkPipelineCreateFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineCreateFlags</name>;</type> <!-- Pipeline creation flags --> + <type requires="VkColorComponentFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkColorComponentFlags</name>;</type> <!-- Color component flags --> + <type requires="VkFenceCreateFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkFenceCreateFlags</name>;</type> <!-- Fence creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkSemaphoreCreateFlags</name>;</type> <!-- Semaphore creation flags --> + <type requires="VkFormatFeatureFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkFormatFeatureFlags</name>;</type> <!-- Format capability flags --> + <type requires="VkQueryControlFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkQueryControlFlags</name>;</type> <!-- Query control flags --> + <type requires="VkQueryResultFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkQueryResultFlags</name>;</type> <!-- Query result flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkShaderModuleCreateFlags</name>;</type> <!-- Shader module creation flags (no bits yet) --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkEventCreateFlags</name>;</type> <!-- Event creation flags (no bits yet) --> + <type requires="VkCommandPoolCreateFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkCommandPoolCreateFlags</name>;</type> <!-- Command pool creation flags --> + <type requires="VkCommandPoolResetFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkCommandPoolResetFlags</name>;</type> <!-- Command pool reset flags --> + <type requires="VkCommandBufferResetFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkCommandBufferResetFlags</name>;</type> <!-- Command buffer reset flags --> + <type requires="VkCommandBufferUsageFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkCommandBufferUsageFlags</name>;</type> <!-- Command buffer usage flags --> + <type requires="VkQueryPipelineStatisticFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkQueryPipelineStatisticFlags</name>;</type> <!-- Pipeline statistics flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkMemoryMapFlags</name>;</type> <!-- Memory mapping flags (no bits yet) --> + <type requires="VkImageAspectFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkImageAspectFlags</name>;</type> <!-- Bitmask of image aspects --> + <type requires="VkSparseMemoryBindFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkSparseMemoryBindFlags</name>;</type> <!-- Sparse memory bind flags --> + <type requires="VkSparseImageFormatFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkSparseImageFormatFlags</name>;</type> <!-- Sparse image memory requirements flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkSubpassDescriptionFlags</name>;</type> <!-- Subpass description flags --> + <type requires="VkPipelineStageFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineStageFlags</name>;</type> <!-- Pipeline stages --> + <type requires="VkSampleCountFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkSampleCountFlags</name>;</type> <!-- Pipeline stages --> + <type requires="VkAttachmentDescriptionFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkAttachmentDescriptionFlags</name>;</type> <!-- Render pass attachment description flags --> + <type requires="VkStencilFaceFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkStencilFaceFlags</name>;</type> <!-- Stencil face flags --> + <type requires="VkCullModeFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkCullModeFlags</name>;</type> <!-- Cull mode flags --> + <type requires="VkDescriptorPoolCreateFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkDescriptorPoolCreateFlags</name>;</type> <!-- Descriptor pool creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkDescriptorPoolResetFlags</name>;</type> <!-- Descriptor pool reset flags --> + <type requires="VkDependencyFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkDependencyFlags</name>;</type> <!-- Pipeline barrier and subpass dependency flags --> + + <type requires="VkIndirectCommandsLayoutUsageFlagBitsNVX" category="bitmask">typedef <type>VkFlags</type> <name>VkIndirectCommandsLayoutUsageFlagsNVX</name>;</type> <!-- Device generated commands usage flags --> + <type requires="VkObjectEntryUsageFlagBitsNVX" category="bitmask">typedef <type>VkFlags</type> <name>VkObjectEntryUsageFlagsNVX</name>;</type> <!-- Object usage flags --> + + <!-- WSI extensions --> + <type requires="VkCompositeAlphaFlagBitsKHR" category="bitmask">typedef <type>VkFlags</type> <name>VkCompositeAlphaFlagsKHR</name>;</type> + <type requires="VkDisplayPlaneAlphaFlagBitsKHR" category="bitmask">typedef <type>VkFlags</type> <name>VkDisplayPlaneAlphaFlagsKHR</name>;</type> + <type requires="VkSurfaceTransformFlagBitsKHR" category="bitmask">typedef <type>VkFlags</type> <name>VkSurfaceTransformFlagsKHR</name>;</type> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkSwapchainCreateFlagsKHR</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkDisplayModeCreateFlagsKHR</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkDisplaySurfaceCreateFlagsKHR</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkAndroidSurfaceCreateFlagsKHR</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkMirSurfaceCreateFlagsKHR</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkViSurfaceCreateFlagsNN</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkWaylandSurfaceCreateFlagsKHR</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkWin32SurfaceCreateFlagsKHR</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkXlibSurfaceCreateFlagsKHR</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkXcbSurfaceCreateFlagsKHR</name>;</type> <!-- creation flags --> + + <type requires="VkDebugReportFlagBitsEXT" category="bitmask">typedef <type>VkFlags</type> <name>VkDebugReportFlagsEXT</name>;</type> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkCommandPoolTrimFlagsKHR</name>;</type> + <type requires="VkExternalMemoryHandleTypeFlagBitsNV" category="bitmask">typedef <type>VkFlags</type> <name>VkExternalMemoryHandleTypeFlagsNV</name>;</type> + <type requires="VkExternalMemoryFeatureFlagBitsNV" category="bitmask">typedef <type>VkFlags</type> <name>VkExternalMemoryFeatureFlagsNV</name>;</type> + <type requires="VkSurfaceCounterFlagBitsEXT" category="bitmask">typedef <type>VkFlags</type> <name>VkSurfaceCounterFlagsEXT</name>;</type> + + <!-- Types which can be void pointers or class pointers, selected at compile time --> + <type category="handle"><type>VK_DEFINE_HANDLE</type>(<name>VkInstance</name>)</type> + <type category="handle" parent="VkInstance"><type>VK_DEFINE_HANDLE</type>(<name>VkPhysicalDevice</name>)</type> + <type category="handle" parent="VkPhysicalDevice"><type>VK_DEFINE_HANDLE</type>(<name>VkDevice</name>)</type> + <type category="handle" parent="VkDevice"><type>VK_DEFINE_HANDLE</type>(<name>VkQueue</name>)</type> + <type category="handle" parent="VkCommandPool"><type>VK_DEFINE_HANDLE</type>(<name>VkCommandBuffer</name>)</type> + <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkDeviceMemory</name>)</type> + <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkCommandPool</name>)</type> + <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkBuffer</name>)</type> + <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkBufferView</name>)</type> + <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkImage</name>)</type> + <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkImageView</name>)</type> + <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkShaderModule</name>)</type> + <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkPipeline</name>)</type> + <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkPipelineLayout</name>)</type> + <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkSampler</name>)</type> + <type category="handle" parent="VkDescriptorPool"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkDescriptorSet</name>)</type> + <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkDescriptorSetLayout</name>)</type> + <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkDescriptorPool</name>)</type> + <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkFence</name>)</type> + <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkSemaphore</name>)</type> + <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkEvent</name>)</type> + <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkQueryPool</name>)</type> + <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkFramebuffer</name>)</type> + <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkRenderPass</name>)</type> + <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkPipelineCache</name>)</type> + <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkObjectTableNVX</name>)</type> + <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkIndirectCommandsLayoutNVX</name>)</type> + + <!-- WSI extensions --> + <type category="handle"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkDisplayKHR</name>)</type> + <type category="handle" parent="VkPhysicalDevice,VkDisplayKHR"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkDisplayModeKHR</name>)</type> + <type category="handle" parent="VkInstance"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkSurfaceKHR</name>)</type> + <type category="handle" parent="VkSurfaceKHR"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkSwapchainKHR</name>)</type> + <type category="handle" parent="VkInstance"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkDebugReportCallbackEXT</name>)</type> + + <!-- Types generated from corresponding <enums> tags below --> + <type name="VkAttachmentLoadOp" category="enum"/> + <type name="VkAttachmentStoreOp" category="enum"/> + <type name="VkBlendFactor" category="enum"/> + <type name="VkBlendOp" category="enum"/> + <type name="VkBorderColor" category="enum"/> + <type name="VkFramebufferCreateFlagBits" category="enum"/> + <type name="VkQueryPoolCreateFlagBits" category="enum"/> + <type name="VkRenderPassCreateFlagBits" category="enum"/> + <type name="VkSamplerCreateFlagBits" category="enum"/> + <type name="VkPipelineCacheHeaderVersion" category="enum"/> + <type name="VkPipelineLayoutCreateFlagBits" category="enum"/> + <type name="VkPipelineCacheCreateFlagBits" category="enum"/> + <type name="VkPipelineDepthStencilStateCreateFlagBits" category="enum"/> + <type name="VkPipelineDynamicStateCreateFlagBits" category="enum"/> + <type name="VkPipelineColorBlendStateCreateFlagBits" category="enum"/> + <type name="VkPipelineMultisampleStateCreateFlagBits" category="enum"/> + <type name="VkPipelineRasterizationStateCreateFlagBits" category="enum"/> + <type name="VkPipelineViewportStateCreateFlagBits" category="enum"/> + <type name="VkPipelineTessellationStateCreateFlagBits" category="enum"/> + <type name="VkPipelineInputAssemblyStateCreateFlagBits" category="enum"/> + <type name="VkPipelineVertexInputStateCreateFlagBits" category="enum"/> + <type name="VkPipelineShaderStageCreateFlagBits" category="enum"/> + <type name="VkDescriptorSetLayoutCreateFlagBits" category="enum"/> + <type name="VkBufferViewCreateFlagBits" category="enum"/> + <type name="VkInstanceCreateFlagBits" category="enum"/> + <type name="VkDeviceQueueCreateFlagBits" category="enum"/> + <type name="VkBufferCreateFlagBits" category="enum"/> + <type name="VkBufferUsageFlagBits" category="enum"/> + <type name="VkColorComponentFlagBits" category="enum"/> + <type name="VkComponentSwizzle" category="enum"/> + <type name="VkCommandPoolCreateFlagBits" category="enum"/> + <type name="VkCommandPoolResetFlagBits" category="enum"/> + <type name="VkCommandBufferResetFlagBits" category="enum"/> + <type name="VkCommandBufferLevel" category="enum"/> + <type name="VkCommandBufferUsageFlagBits" category="enum"/> + <type name="VkCompareOp" category="enum"/> + <type name="VkCullModeFlagBits" category="enum"/> + <type name="VkDescriptorType" category="enum"/> + <type name="VkDeviceCreateFlagBits" category="enum"/> + <type name="VkDynamicState" category="enum"/> + <type name="VkFenceCreateFlagBits" category="enum"/> + <type name="VkPolygonMode" category="enum"/> + <type name="VkFormat" category="enum"/> + <type name="VkFormatFeatureFlagBits" category="enum"/> + <type name="VkFrontFace" category="enum"/> + <type name="VkImageAspectFlagBits" category="enum"/> + <type name="VkImageCreateFlagBits" category="enum"/> + <type name="VkImageLayout" category="enum"/> + <type name="VkImageTiling" category="enum"/> + <type name="VkImageType" category="enum"/> + <type name="VkImageUsageFlagBits" category="enum"/> + <type name="VkImageViewType" category="enum"/> + <type name="VkSharingMode" category="enum"/> + <type name="VkIndexType" category="enum"/> + <type name="VkLogicOp" category="enum"/> + <type name="VkMemoryHeapFlagBits" category="enum"/> + <type name="VkAccessFlagBits" category="enum"/> + <type name="VkMemoryPropertyFlagBits" category="enum"/> + <type name="VkPhysicalDeviceType" category="enum"/> + <type name="VkPipelineBindPoint" category="enum"/> + <type name="VkPipelineCreateFlagBits" category="enum"/> + <type name="VkPrimitiveTopology" category="enum"/> + <type name="VkQueryControlFlagBits" category="enum"/> + <type name="VkQueryPipelineStatisticFlagBits" category="enum"/> + <type name="VkQueryResultFlagBits" category="enum"/> + <type name="VkQueryType" category="enum"/> + <type name="VkQueueFlagBits" category="enum"/> + <type name="VkSubpassContents" category="enum"/> + <type name="VkResult" category="enum"/> + <type name="VkShaderStageFlagBits" category="enum"/> + <type name="VkSparseMemoryBindFlagBits" category="enum"/> + <type name="VkStencilFaceFlagBits" category="enum"/> + <type name="VkStencilOp" category="enum"/> + <type name="VkStructureType" category="enum"/> + <type name="VkSystemAllocationScope" category="enum"/> + <type name="VkInternalAllocationType" category="enum"/> + <type name="VkSamplerAddressMode" category="enum"/> + <type name="VkFilter" category="enum"/> + <type name="VkSamplerMipmapMode" category="enum"/> + <type name="VkVertexInputRate" category="enum"/> + <type name="VkPipelineStageFlagBits" category="enum"/> + <type name="VkSparseImageFormatFlagBits" category="enum"/> + <type name="VkSampleCountFlagBits" category="enum"/> + <type name="VkAttachmentDescriptionFlagBits" category="enum"/> + <type name="VkDescriptorPoolCreateFlagBits" category="enum"/> + <type name="VkDependencyFlagBits" category="enum"/> + <type name="VkIndirectCommandsLayoutUsageFlagBitsNVX" category="enum"/> + <type name="VkIndirectCommandsTokenTypeNVX" category="enum"/> + <type name="VkObjectEntryUsageFlagBitsNVX" category="enum"/> + <type name="VkObjectEntryTypeNVX" category="enum"/> + <!-- WSI extensions --> + <type name="VkColorSpaceKHR" category="enum"/> + <type name="VkCompositeAlphaFlagBitsKHR" category="enum"/> + <type name="VkDisplayPlaneAlphaFlagBitsKHR" category="enum"/> + <type name="VkPresentModeKHR" category="enum"/> + <type name="VkSurfaceTransformFlagBitsKHR" category="enum"/> + <type name="VkDebugReportFlagBitsEXT" category="enum"/> + <type name="VkDebugReportObjectTypeEXT" category="enum"/> + <type name="VkDebugReportErrorEXT" category="enum"/> + <type name="VkRasterizationOrderAMD" category="enum"/> + <type name="VkExternalMemoryHandleTypeFlagBitsNV" category="enum"/> + <type name="VkExternalMemoryFeatureFlagBitsNV" category="enum"/> + <type name="VkValidationCheckEXT" category="enum"/> + <type name="VkSurfaceCounterFlagBitsEXT" category="enum"/> + <type name="VkDisplayPowerStateEXT" category="enum"/> + <type name="VkDeviceEventTypeEXT" category="enum"/> + <type name="VkDisplayEventTypeEXT" category="enum"/> + + <!-- The PFN_vk*Function types are used by VkAllocationCallbacks below --> + <type category="funcpointer">typedef void (VKAPI_PTR *<name>PFN_vkInternalAllocationNotification</name>)( + <type>void</type>* pUserData, + <type>size_t</type> size, + <type>VkInternalAllocationType</type> allocationType, + <type>VkSystemAllocationScope</type> allocationScope);</type> + <type category="funcpointer">typedef void (VKAPI_PTR *<name>PFN_vkInternalFreeNotification</name>)( + <type>void</type>* pUserData, + <type>size_t</type> size, + <type>VkInternalAllocationType</type> allocationType, + <type>VkSystemAllocationScope</type> allocationScope);</type> + <type category="funcpointer">typedef void* (VKAPI_PTR *<name>PFN_vkReallocationFunction</name>)( + <type>void</type>* pUserData, + <type>void</type>* pOriginal, + <type>size_t</type> size, + <type>size_t</type> alignment, + <type>VkSystemAllocationScope</type> allocationScope);</type> + <type category="funcpointer">typedef void* (VKAPI_PTR *<name>PFN_vkAllocationFunction</name>)( + <type>void</type>* pUserData, + <type>size_t</type> size, + <type>size_t</type> alignment, + <type>VkSystemAllocationScope</type> allocationScope);</type> + <type category="funcpointer">typedef void (VKAPI_PTR *<name>PFN_vkFreeFunction</name>)( + <type>void</type>* pUserData, + <type>void</type>* pMemory);</type> + + <!-- The PFN_vkVoidFunction type are used by VkGet*ProcAddr below --> + <type category="funcpointer">typedef void (VKAPI_PTR *<name>PFN_vkVoidFunction</name>)(void);</type> + + <!-- The PFN_vkDebugReportCallbackEXT type are used by the DEBUG_REPORT extension--> + <type category="funcpointer">typedef VkBool32 (VKAPI_PTR *<name>PFN_vkDebugReportCallbackEXT</name>)( + <type>VkDebugReportFlagsEXT</type> flags, + <type>VkDebugReportObjectTypeEXT</type> objectType, + <type>uint64_t</type> object, + <type>size_t</type> location, + <type>int32_t</type> messageCode, + const <type>char</type>* pLayerPrefix, + const <type>char</type>* pMessage, + <type>void</type>* pUserData);</type> + + <!-- Struct types --> + <type category="struct" name="VkOffset2D"> + <member><type>int32_t</type> <name>x</name></member> + <member><type>int32_t</type> <name>y</name></member> + </type> + <type category="struct" name="VkOffset3D"> + <member><type>int32_t</type> <name>x</name></member> + <member><type>int32_t</type> <name>y</name></member> + <member><type>int32_t</type> <name>z</name></member> + </type> + <type category="struct" name="VkExtent2D"> + <member><type>uint32_t</type> <name>width</name></member> + <member><type>uint32_t</type> <name>height</name></member> + </type> + <type category="struct" name="VkExtent3D"> + <member><type>uint32_t</type> <name>width</name></member> + <member><type>uint32_t</type> <name>height</name></member> + <member><type>uint32_t</type> <name>depth</name></member> + </type> + <type category="struct" name="VkViewport"> + <member><type>float</type> <name>x</name></member> + <member><type>float</type> <name>y</name></member> + <member><type>float</type> <name>width</name></member> + <member><type>float</type> <name>height</name></member> + <member><type>float</type> <name>minDepth</name></member> + <member><type>float</type> <name>maxDepth</name></member> + </type> + <type category="struct" name="VkRect2D"> + <member><type>VkOffset2D</type> <name>offset</name></member> + <member><type>VkExtent2D</type> <name>extent</name></member> + </type> + <type category="struct" name="VkRect3D"> + <member><type>VkOffset3D</type> <name>offset</name></member> + <member><type>VkExtent3D</type> <name>extent</name></member> + </type> + <type category="struct" name="VkClearRect"> + <member><type>VkRect2D</type> <name>rect</name></member> + <member><type>uint32_t</type> <name>baseArrayLayer</name></member> + <member><type>uint32_t</type> <name>layerCount</name></member> + </type> + <type category="struct" name="VkComponentMapping"> + <member><type>VkComponentSwizzle</type> <name>r</name></member> + <member><type>VkComponentSwizzle</type> <name>g</name></member> + <member><type>VkComponentSwizzle</type> <name>b</name></member> + <member><type>VkComponentSwizzle</type> <name>a</name></member> + </type> + <type category="struct" name="VkPhysicalDeviceProperties" returnedonly="true"> + <member><type>uint32_t</type> <name>apiVersion</name></member> + <member><type>uint32_t</type> <name>driverVersion</name></member> + <member><type>uint32_t</type> <name>vendorID</name></member> + <member><type>uint32_t</type> <name>deviceID</name></member> + <member><type>VkPhysicalDeviceType</type> <name>deviceType</name></member> + <member><type>char</type> <name>deviceName</name>[<enum>VK_MAX_PHYSICAL_DEVICE_NAME_SIZE</enum>]</member> + <member><type>uint8_t</type> <name>pipelineCacheUUID</name>[<enum>VK_UUID_SIZE</enum>]</member> + <member><type>VkPhysicalDeviceLimits</type> <name>limits</name></member> + <member><type>VkPhysicalDeviceSparseProperties</type> <name>sparseProperties</name></member> + </type> + <type category="struct" name="VkExtensionProperties" returnedonly="true"> + <member><type>char</type> <name>extensionName</name>[<enum>VK_MAX_EXTENSION_NAME_SIZE</enum>]</member> <!-- extension name --> + <member><type>uint32_t</type> <name>specVersion</name></member> <!-- version of the extension specification implemented --> + </type> + <type category="struct" name="VkLayerProperties" returnedonly="true"> + <member><type>char</type> <name>layerName</name>[<enum>VK_MAX_EXTENSION_NAME_SIZE</enum>]</member> <!-- layer name --> + <member><type>uint32_t</type> <name>specVersion</name></member> <!-- version of the layer specification implemented --> + <member><type>uint32_t</type> <name>implementationVersion</name></member> <!-- build or release version of the layer's library --> + <member><type>char</type> <name>description</name>[<enum>VK_MAX_DESCRIPTION_SIZE</enum>]</member> <!-- Free-form description of the layer --> + </type> + <type category="struct" name="VkApplicationInfo"> + <member values="VK_STRUCTURE_TYPE_APPLICATION_INFO"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true" len="null-terminated">const <type>char</type>* <name>pApplicationName</name></member> + <member><type>uint32_t</type> <name>applicationVersion</name></member> + <member optional="true" len="null-terminated">const <type>char</type>* <name>pEngineName</name></member> + <member><type>uint32_t</type> <name>engineVersion</name></member> + <member><type>uint32_t</type> <name>apiVersion</name></member> + </type> + <type category="struct" name="VkAllocationCallbacks"> + <member optional="true"><type>void</type>* <name>pUserData</name></member> + <member><type>PFN_vkAllocationFunction</type> <name>pfnAllocation</name></member> + <member><type>PFN_vkReallocationFunction</type> <name>pfnReallocation</name></member> + <member><type>PFN_vkFreeFunction</type> <name>pfnFree</name></member> + <member optional="true"><type>PFN_vkInternalAllocationNotification</type> <name>pfnInternalAllocation</name></member> + <member optional="true"><type>PFN_vkInternalFreeNotification</type> <name>pfnInternalFree</name></member> + </type> + <type category="struct" name="VkDeviceQueueCreateInfo"> + <member values="VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkDeviceQueueCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member><type>uint32_t</type> <name>queueFamilyIndex</name></member> + <member><type>uint32_t</type> <name>queueCount</name></member> + <member len="queueCount">const <type>float</type>* <name>pQueuePriorities</name></member> + </type> + <type category="struct" name="VkDeviceCreateInfo"> + <member values="VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member> + <member validextensionstructs="VkPhysicalDeviceFeatures2KHR">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkDeviceCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member><type>uint32_t</type> <name>queueCreateInfoCount</name></member> + <member len="queueCreateInfoCount">const <type>VkDeviceQueueCreateInfo</type>* <name>pQueueCreateInfos</name></member> + <member optional="true"><type>uint32_t</type> <name>enabledLayerCount</name></member> + <member len="enabledLayerCount,null-terminated">const <type>char</type>* const* <name>ppEnabledLayerNames</name></member> <!-- Ordered list of layer names to be enabled --> + <member optional="true"><type>uint32_t</type> <name>enabledExtensionCount</name></member> + <member len="enabledExtensionCount,null-terminated">const <type>char</type>* const* <name>ppEnabledExtensionNames</name></member> + <member optional="true">const <type>VkPhysicalDeviceFeatures</type>* <name>pEnabledFeatures</name></member> + </type> + <type category="struct" name="VkInstanceCreateInfo"> + <member values="VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkInstanceCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member optional="true">const <type>VkApplicationInfo</type>* <name>pApplicationInfo</name></member> + <member optional="true"><type>uint32_t</type> <name>enabledLayerCount</name></member> + <member len="enabledLayerCount,null-terminated">const <type>char</type>* const* <name>ppEnabledLayerNames</name></member> <!-- Ordered list of layer names to be enabled --> + <member optional="true"><type>uint32_t</type> <name>enabledExtensionCount</name></member> + <member len="enabledExtensionCount,null-terminated">const <type>char</type>* const* <name>ppEnabledExtensionNames</name></member> <!-- Extension names to be enabled --> + </type> + <type category="struct" name="VkQueueFamilyProperties" returnedonly="true"> + <member optional="true"><type>VkQueueFlags</type> <name>queueFlags</name></member> <!-- Queue flags --> + <member><type>uint32_t</type> <name>queueCount</name></member> + <member><type>uint32_t</type> <name>timestampValidBits</name></member> + <member><type>VkExtent3D</type> <name>minImageTransferGranularity</name></member> <!-- Minimum alignment requirement for image transfers --> + </type> + <type category="struct" name="VkPhysicalDeviceMemoryProperties" returnedonly="true"> + <member><type>uint32_t</type> <name>memoryTypeCount</name></member> + <member><type>VkMemoryType</type> <name>memoryTypes</name>[<enum>VK_MAX_MEMORY_TYPES</enum>]</member> + <member><type>uint32_t</type> <name>memoryHeapCount</name></member> + <member><type>VkMemoryHeap</type> <name>memoryHeaps</name>[<enum>VK_MAX_MEMORY_HEAPS</enum>]</member> + </type> + <type category="struct" name="VkMemoryAllocateInfo"> + <member values="VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO"><type>VkStructureType</type> <name>sType</name></member> + <member validextensionstructs="VkDedicatedAllocationMemoryAllocateInfoNV">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member><type>VkDeviceSize</type> <name>allocationSize</name></member> <!-- Size of memory allocation --> + <member><type>uint32_t</type> <name>memoryTypeIndex</name></member> <!-- Index of the of the memory type to allocate from --> + </type> + <type category="struct" name="VkMemoryRequirements" returnedonly="true"> + <member><type>VkDeviceSize</type> <name>size</name></member> <!-- Specified in bytes --> + <member><type>VkDeviceSize</type> <name>alignment</name></member> <!-- Specified in bytes --> + <member><type>uint32_t</type> <name>memoryTypeBits</name></member> <!-- Bitmask of the allowed memory type indices into memoryTypes[] for this object --> + </type> + <type category="struct" name="VkSparseImageFormatProperties" returnedonly="true"> + <member optional="true"><type>VkImageAspectFlags</type> <name>aspectMask</name></member> + <member><type>VkExtent3D</type> <name>imageGranularity</name></member> + <member optional="true"><type>VkSparseImageFormatFlags</type> <name>flags</name></member> + </type> + <type category="struct" name="VkSparseImageMemoryRequirements" returnedonly="true"> + <member><type>VkSparseImageFormatProperties</type> <name>formatProperties</name></member> + <member><type>uint32_t</type> <name>imageMipTailFirstLod</name></member> + <member><type>VkDeviceSize</type> <name>imageMipTailSize</name></member> <!-- Specified in bytes, must be a multiple of sparse block size in bytes / alignment --> + <member><type>VkDeviceSize</type> <name>imageMipTailOffset</name></member> <!-- Specified in bytes, must be a multiple of sparse block size in bytes / alignment --> + <member><type>VkDeviceSize</type> <name>imageMipTailStride</name></member> <!-- Specified in bytes, must be a multiple of sparse block size in bytes / alignment --> + </type> + <type category="struct" name="VkMemoryType" returnedonly="true"> + <member optional="true"><type>VkMemoryPropertyFlags</type> <name>propertyFlags</name></member> <!-- Memory properties of this memory type --> + <member><type>uint32_t</type> <name>heapIndex</name></member> <!-- Index of the memory heap allocations of this memory type are taken from --> + </type> + <type category="struct" name="VkMemoryHeap" returnedonly="true"> + <member><type>VkDeviceSize</type> <name>size</name></member> <!-- Available memory in the heap--> + <member optional="true"><type>VkMemoryHeapFlags</type> <name>flags</name></member> <!-- Flags for the heap--> + </type> + <type category="struct" name="VkMappedMemoryRange"> + <member values="VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member><type>VkDeviceMemory</type> <name>memory</name></member> <!-- Mapped memory object --> + <member><type>VkDeviceSize</type> <name>offset</name></member> <!-- Offset within the memory object where the range starts --> + <member><type>VkDeviceSize</type> <name>size</name></member> <!-- Size of the range within the memory object --> + </type> + <type category="struct" name="VkFormatProperties" returnedonly="true"> + <member optional="true"><type>VkFormatFeatureFlags</type> <name>linearTilingFeatures</name></member> <!-- Format features in case of linear tiling --> + <member optional="true"><type>VkFormatFeatureFlags</type> <name>optimalTilingFeatures</name></member> <!-- Format features in case of optimal tiling --> + <member optional="true"><type>VkFormatFeatureFlags</type> <name>bufferFeatures</name></member> <!-- Format features supported by buffers --> + </type> + <type category="struct" name="VkImageFormatProperties" returnedonly="true"> + <member><type>VkExtent3D</type> <name>maxExtent</name></member> <!-- max image dimensions for this resource type --> + <member><type>uint32_t</type> <name>maxMipLevels</name></member> <!-- max number of mipmap levels for this resource type --> + <member><type>uint32_t</type> <name>maxArrayLayers</name></member> <!-- max array size for this resource type --> + <member optional="true"><type>VkSampleCountFlags</type> <name>sampleCounts</name></member> <!-- supported sample counts for this resource type --> + <member><type>VkDeviceSize</type> <name>maxResourceSize</name></member> <!-- max size (in bytes) of this resource type --> + </type> + <type category="struct" name="VkDescriptorBufferInfo"> + <member><type>VkBuffer</type> <name>buffer</name></member> <!-- Buffer used for this descriptor slot when the descriptor is UNIFORM_BUFFER[_DYNAMIC] or STORAGE_BUFFER[_DYNAMIC]. VK_NULL_HANDLE otherwise. --> + <member><type>VkDeviceSize</type> <name>offset</name></member> <!-- Base offset from buffer start in bytes to update in the descriptor set. --> + <member><type>VkDeviceSize</type> <name>range</name></member> <!-- Size in bytes of the buffer resource for this descriptor update. --> + </type> + <type category="struct" name="VkDescriptorImageInfo"> + <member noautovalidity="true"><type>VkSampler</type> <name>sampler</name></member> <!-- Sampler to write to the descriptor in case it is a SAMPLER or COMBINED_IMAGE_SAMPLER descriptor. Ignored otherwise. --> + <member noautovalidity="true"><type>VkImageView</type> <name>imageView</name></member> <!-- Image view to write to the descriptor in case it is a SAMPLED_IMAGE, STORAGE_IMAGE, COMBINED_IMAGE_SAMPLER, or INPUT_ATTACHMENT descriptor. Ignored otherwise. --> + <member noautovalidity="true"><type>VkImageLayout</type> <name>imageLayout</name></member> <!-- Layout the image is expected to be in when accessed using this descriptor (only used if imageView is not VK_NULL_HANDLE). --> + </type> + <type category="struct" name="VkWriteDescriptorSet"> + <member values="VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member><type>VkDescriptorSet</type> <name>dstSet</name></member> <!-- Destination descriptor set --> + <member><type>uint32_t</type> <name>dstBinding</name></member> <!-- Binding within the destination descriptor set to write --> + <member><type>uint32_t</type> <name>dstArrayElement</name></member> <!-- Array element within the destination binding to write --> + <member><type>uint32_t</type> <name>descriptorCount</name></member> <!-- Number of descriptors to write (determines the size of the array pointed by pDescriptors) --> + <member><type>VkDescriptorType</type> <name>descriptorType</name></member> <!-- Descriptor type to write (determines which members of the array pointed by pDescriptors are going to be used) --> + <member noautovalidity="true" len="descriptorCount">const <type>VkDescriptorImageInfo</type>* <name>pImageInfo</name></member> <!-- Sampler, image view, and layout for SAMPLER, COMBINED_IMAGE_SAMPLER, {SAMPLED,STORAGE}_IMAGE, and INPUT_ATTACHMENT descriptor types. --> + <member noautovalidity="true" len="descriptorCount">const <type>VkDescriptorBufferInfo</type>* <name>pBufferInfo</name></member> <!-- Raw buffer, size, and offset for {UNIFORM,STORAGE}_BUFFER[_DYNAMIC] descriptor types. --> + <member noautovalidity="true" len="descriptorCount">const <type>VkBufferView</type>* <name>pTexelBufferView</name></member> <!-- Buffer view to write to the descriptor for {UNIFORM,STORAGE}_TEXEL_BUFFER descriptor types. --> + </type> + <type category="struct" name="VkCopyDescriptorSet"> + <member values="VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member><type>VkDescriptorSet</type> <name>srcSet</name></member> <!-- Source descriptor set --> + <member><type>uint32_t</type> <name>srcBinding</name></member> <!-- Binding within the source descriptor set to copy from --> + <member><type>uint32_t</type> <name>srcArrayElement</name></member> <!-- Array element within the source binding to copy from --> + <member><type>VkDescriptorSet</type> <name>dstSet</name></member> <!-- Destination descriptor set --> + <member><type>uint32_t</type> <name>dstBinding</name></member> <!-- Binding within the destination descriptor set to copy to --> + <member><type>uint32_t</type> <name>dstArrayElement</name></member> <!-- Array element within the destination binding to copy to --> + <member><type>uint32_t</type> <name>descriptorCount</name></member> <!-- Number of descriptors to write (determines the size of the array pointed by pDescriptors) --> + </type> + <type category="struct" name="VkBufferCreateInfo"> + <member values="VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member> + <member validextensionstructs="VkDedicatedAllocationBufferCreateInfoNV">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure. --> + <member optional="true"><type>VkBufferCreateFlags</type> <name>flags</name></member> <!-- Buffer creation flags --> + <member><type>VkDeviceSize</type> <name>size</name></member> <!-- Specified in bytes --> + <member><type>VkBufferUsageFlags</type> <name>usage</name></member> <!-- Buffer usage flags --> + <member><type>VkSharingMode</type> <name>sharingMode</name></member> + <member optional="true"><type>uint32_t</type> <name>queueFamilyIndexCount</name></member> + <member noautovalidity="true" len="queueFamilyIndexCount">const <type>uint32_t</type>* <name>pQueueFamilyIndices</name></member> + </type> + <type category="struct" name="VkBufferViewCreateInfo"> + <member values="VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure. --> + <member optional="true"><type>VkBufferViewCreateFlags</type><name>flags</name></member> <!-- Reserved --> + <member><type>VkBuffer</type> <name>buffer</name></member> + <member><type>VkFormat</type> <name>format</name></member> <!-- Optionally specifies format of elements --> + <member><type>VkDeviceSize</type> <name>offset</name></member> <!-- Specified in bytes --> + <member><type>VkDeviceSize</type> <name>range</name></member> <!-- View size specified in bytes --> + </type> + <type category="struct" name="VkImageSubresource"> + <member><type>VkImageAspectFlags</type> <name>aspectMask</name></member> + <member><type>uint32_t</type> <name>mipLevel</name></member> + <member><type>uint32_t</type> <name>arrayLayer</name></member> + </type> + <type category="struct" name="VkImageSubresourceLayers"> + <member><type>VkImageAspectFlags</type> <name>aspectMask</name></member> + <member><type>uint32_t</type> <name>mipLevel</name></member> + <member><type>uint32_t</type> <name>baseArrayLayer</name></member> + <member><type>uint32_t</type> <name>layerCount</name></member> + </type> + <type category="struct" name="VkImageSubresourceRange"> + <member><type>VkImageAspectFlags</type> <name>aspectMask</name></member> + <member><type>uint32_t</type> <name>baseMipLevel</name></member> + <member><type>uint32_t</type> <name>levelCount</name></member> + <member><type>uint32_t</type> <name>baseArrayLayer</name></member> + <member><type>uint32_t</type> <name>layerCount</name></member> + </type> + <type category="struct" name="VkMemoryBarrier"> + <member values="VK_STRUCTURE_TYPE_MEMORY_BARRIER"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure. --> + <member optional="true"><type>VkAccessFlags</type> <name>srcAccessMask</name></member> <!-- Memory accesses from the source of the dependency to synchronize --> + <member optional="true"><type>VkAccessFlags</type> <name>dstAccessMask</name></member> <!-- Memory accesses from the destination of the dependency to synchronize --> + </type> + <type category="struct" name="VkBufferMemoryBarrier"> + <member values="VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure. --> + <member optional="true"><type>VkAccessFlags</type> <name>srcAccessMask</name></member> <!-- Memory accesses from the source of the dependency to synchronize --> + <member optional="true"><type>VkAccessFlags</type> <name>dstAccessMask</name></member> <!-- Memory accesses from the destination of the dependency to synchronize --> + <member><type>uint32_t</type> <name>srcQueueFamilyIndex</name></member> <!-- Queue family to transition ownership from --> + <member><type>uint32_t</type> <name>dstQueueFamilyIndex</name></member> <!-- Queue family to transition ownership to --> + <member><type>VkBuffer</type> <name>buffer</name></member> <!-- Buffer to sync --> + <member><type>VkDeviceSize</type> <name>offset</name></member> <!-- Offset within the buffer to sync --> + <member><type>VkDeviceSize</type> <name>size</name></member> <!-- Amount of bytes to sync --> + </type> + <type category="struct" name="VkImageMemoryBarrier"> + <member values="VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure. --> + <member optional="true"><type>VkAccessFlags</type> <name>srcAccessMask</name></member> <!-- Memory accesses from the source of the dependency to synchronize --> + <member optional="true"><type>VkAccessFlags</type> <name>dstAccessMask</name></member> <!-- Memory accesses from the destination of the dependency to synchronize --> + <member><type>VkImageLayout</type> <name>oldLayout</name></member> <!-- Current layout of the image --> + <member><type>VkImageLayout</type> <name>newLayout</name></member> <!-- New layout to transition the image to --> + <member><type>uint32_t</type> <name>srcQueueFamilyIndex</name></member> <!-- Queue family to transition ownership from --> + <member><type>uint32_t</type> <name>dstQueueFamilyIndex</name></member> <!-- Queue family to transition ownership to --> + <member><type>VkImage</type> <name>image</name></member> <!-- Image to sync --> + <member><type>VkImageSubresourceRange</type> <name>subresourceRange</name></member> <!-- Subresource range to sync --> + </type> + <type category="struct" name="VkImageCreateInfo"> + <member values="VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member> + <member validextensionstructs="VkDedicatedAllocationImageCreateInfoNV">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure. --> + <member optional="true"><type>VkImageCreateFlags</type> <name>flags</name></member> <!-- Image creation flags --> + <member><type>VkImageType</type> <name>imageType</name></member> + <member><type>VkFormat</type> <name>format</name></member> + <member><type>VkExtent3D</type> <name>extent</name></member> + <member><type>uint32_t</type> <name>mipLevels</name></member> + <member><type>uint32_t</type> <name>arrayLayers</name></member> + <member><type>VkSampleCountFlagBits</type> <name>samples</name></member> + <member><type>VkImageTiling</type> <name>tiling</name></member> + <member><type>VkImageUsageFlags</type> <name>usage</name></member> <!-- Image usage flags --> + <member><type>VkSharingMode</type> <name>sharingMode</name></member> <!-- Cross-queue-family sharing mode --> + <member optional="true"><type>uint32_t</type> <name>queueFamilyIndexCount</name></member> <!-- Number of queue families to share across --> + <member noautovalidity="true" len="queueFamilyIndexCount">const <type>uint32_t</type>* <name>pQueueFamilyIndices</name></member> <!-- Array of queue family indices to share across --> + <member><type>VkImageLayout</type> <name>initialLayout</name></member> <!-- Initial image layout for all subresources --> + </type> + <type category="struct" name="VkSubresourceLayout" returnedonly="true"> + <member><type>VkDeviceSize</type> <name>offset</name></member> <!-- Specified in bytes --> + <member><type>VkDeviceSize</type> <name>size</name></member> <!-- Specified in bytes --> + <member><type>VkDeviceSize</type> <name>rowPitch</name></member> <!-- Specified in bytes --> + <member><type>VkDeviceSize</type> <name>arrayPitch</name></member> <!-- Specified in bytes --> + <member><type>VkDeviceSize</type> <name>depthPitch</name></member> <!-- Specified in bytes --> + </type> + <type category="struct" name="VkImageViewCreateInfo"> + <member values="VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkImageViewCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member><type>VkImage</type> <name>image</name></member> + <member><type>VkImageViewType</type> <name>viewType</name></member> + <member><type>VkFormat</type> <name>format</name></member> + <member><type>VkComponentMapping</type> <name>components</name></member> + <member><type>VkImageSubresourceRange</type> <name>subresourceRange</name></member> + </type> + <type category="struct" name="VkBufferCopy"> + <member><type>VkDeviceSize</type> <name>srcOffset</name></member> <!-- Specified in bytes --> + <member><type>VkDeviceSize</type> <name>dstOffset</name></member> <!-- Specified in bytes --> + <member><type>VkDeviceSize</type> <name>size</name></member> <!-- Specified in bytes --> + </type> + <type category="struct" name="VkSparseMemoryBind"> + <member><type>VkDeviceSize</type> <name>resourceOffset</name></member> <!-- Specified in bytes --> + <member><type>VkDeviceSize</type> <name>size</name></member> <!-- Specified in bytes --> + <member optional="true"><type>VkDeviceMemory</type> <name>memory</name></member> + <member><type>VkDeviceSize</type> <name>memoryOffset</name></member> <!-- Specified in bytes --> + <member optional="true"><type>VkSparseMemoryBindFlags</type><name>flags</name></member> <!-- Reserved for future --> + </type> + <type category="struct" name="VkSparseImageMemoryBind"> + <member><type>VkImageSubresource</type> <name>subresource</name></member> + <member><type>VkOffset3D</type> <name>offset</name></member> + <member><type>VkExtent3D</type> <name>extent</name></member> + <member optional="true"><type>VkDeviceMemory</type> <name>memory</name></member> + <member><type>VkDeviceSize</type> <name>memoryOffset</name></member> <!-- Specified in bytes --> + <member optional="true"><type>VkSparseMemoryBindFlags</type><name>flags</name></member> <!-- Reserved for future --> + </type> + <type category="struct" name="VkSparseBufferMemoryBindInfo"> + <member><type>VkBuffer</type> <name>buffer</name></member> + <member><type>uint32_t</type> <name>bindCount</name></member> + <member len="bindCount">const <type>VkSparseMemoryBind</type>* <name>pBinds</name></member> + </type> + <type category="struct" name="VkSparseImageOpaqueMemoryBindInfo"> + <member><type>VkImage</type> <name>image</name></member> + <member><type>uint32_t</type> <name>bindCount</name></member> + <member len="bindCount">const <type>VkSparseMemoryBind</type>* <name>pBinds</name></member> + </type> + <type category="struct" name="VkSparseImageMemoryBindInfo"> + <member><type>VkImage</type> <name>image</name></member> + <member><type>uint32_t</type> <name>bindCount</name></member> + <member len="bindCount">const <type>VkSparseImageMemoryBind</type>* <name>pBinds</name></member> + </type> + <type category="struct" name="VkBindSparseInfo"> + <member values="VK_STRUCTURE_TYPE_BIND_SPARSE_INFO"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure. --> + <member optional="true"><type>uint32_t</type> <name>waitSemaphoreCount</name></member> + <member len="waitSemaphoreCount">const <type>VkSemaphore</type>* <name>pWaitSemaphores</name></member> + <member optional="true"><type>uint32_t</type> <name>bufferBindCount</name></member> + <member len="bufferBindCount">const <type>VkSparseBufferMemoryBindInfo</type>* <name>pBufferBinds</name></member> + <member optional="true"><type>uint32_t</type> <name>imageOpaqueBindCount</name></member> + <member len="imageOpaqueBindCount">const <type>VkSparseImageOpaqueMemoryBindInfo</type>* <name>pImageOpaqueBinds</name></member> + <member optional="true"><type>uint32_t</type> <name>imageBindCount</name></member> + <member len="imageBindCount">const <type>VkSparseImageMemoryBindInfo</type>* <name>pImageBinds</name></member> + <member optional="true"><type>uint32_t</type> <name>signalSemaphoreCount</name></member> + <member len="signalSemaphoreCount">const <type>VkSemaphore</type>* <name>pSignalSemaphores</name></member> + </type> + <type category="struct" name="VkImageCopy"> + <member><type>VkImageSubresourceLayers</type> <name>srcSubresource</name></member> + <member><type>VkOffset3D</type> <name>srcOffset</name></member> <!-- Specified in pixels for both compressed and uncompressed images --> + <member><type>VkImageSubresourceLayers</type> <name>dstSubresource</name></member> + <member><type>VkOffset3D</type> <name>dstOffset</name></member> <!-- Specified in pixels for both compressed and uncompressed images --> + <member><type>VkExtent3D</type> <name>extent</name></member> <!-- Specified in pixels for both compressed and uncompressed images --> + </type> + <type category="struct" name="VkImageBlit"> + <member><type>VkImageSubresourceLayers</type> <name>srcSubresource</name></member> + <member><type>VkOffset3D</type> <name>srcOffsets</name>[2]</member> <!-- Specified in pixels for both compressed and uncompressed images --> + <member><type>VkImageSubresourceLayers</type> <name>dstSubresource</name></member> + <member><type>VkOffset3D</type> <name>dstOffsets</name>[2]</member> <!-- Specified in pixels for both compressed and uncompressed images --> + </type> + <type category="struct" name="VkBufferImageCopy"> + <member><type>VkDeviceSize</type> <name>bufferOffset</name></member> <!-- Specified in bytes --> + <member><type>uint32_t</type> <name>bufferRowLength</name></member> <!-- Specified in texels --> + <member><type>uint32_t</type> <name>bufferImageHeight</name></member> + <member><type>VkImageSubresourceLayers</type> <name>imageSubresource</name></member> + <member><type>VkOffset3D</type> <name>imageOffset</name></member> <!-- Specified in pixels for both compressed and uncompressed images --> + <member><type>VkExtent3D</type> <name>imageExtent</name></member> <!-- Specified in pixels for both compressed and uncompressed images --> + </type> + <type category="struct" name="VkImageResolve"> + <member><type>VkImageSubresourceLayers</type> <name>srcSubresource</name></member> + <member><type>VkOffset3D</type> <name>srcOffset</name></member> + <member><type>VkImageSubresourceLayers</type> <name>dstSubresource</name></member> + <member><type>VkOffset3D</type> <name>dstOffset</name></member> + <member><type>VkExtent3D</type> <name>extent</name></member> + </type> + <type category="struct" name="VkShaderModuleCreateInfo"> + <member values="VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkShaderModuleCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member><type>size_t</type> <name>codeSize</name></member> <!-- Specified in bytes --> + <member len="latexmath:[$codeSize \over 4$]">const <type>uint32_t</type>* <name>pCode</name></member> <!-- Binary code of size codeSize --> + </type> + <type category="struct" name="VkDescriptorSetLayoutBinding"> + <member><type>uint32_t</type> <name>binding</name></member> <!-- Binding number for this entry --> + <member><type>VkDescriptorType</type> <name>descriptorType</name></member> <!-- Type of the descriptors in this binding --> + <member optional="true"><type>uint32_t</type> <name>descriptorCount</name></member> <!-- Number of descriptors in this binding --> + <member noautovalidity="true"><type>VkShaderStageFlags</type> <name>stageFlags</name></member> <!-- Shader stages this binding is visible to --> + <member noautovalidity="true" optional="true" len="descriptorCount">const <type>VkSampler</type>* <name>pImmutableSamplers</name></member> <!-- Immutable samplers (used if descriptor type is SAMPLER or COMBINED_IMAGE_SAMPLER, is either NULL or contains count number of elements) --> + </type> + <type category="struct" name="VkDescriptorSetLayoutCreateInfo"> + <member values="VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkDescriptorSetLayoutCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member optional="true"><type>uint32_t</type> <name>bindingCount</name></member> <!-- Number of bindings in the descriptor set layout --> + <member len="bindingCount">const <type>VkDescriptorSetLayoutBinding</type>* <name>pBindings</name></member> <!-- Array of descriptor set layout bindings --> + </type> + <type category="struct" name="VkDescriptorPoolSize"> + <member><type>VkDescriptorType</type> <name>type</name></member> + <member><type>uint32_t</type> <name>descriptorCount</name></member> + </type> + <type category="struct" name="VkDescriptorPoolCreateInfo"> + <member values="VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkDescriptorPoolCreateFlags</type> <name>flags</name></member> + <member><type>uint32_t</type> <name>maxSets</name></member> + <member><type>uint32_t</type> <name>poolSizeCount</name></member> + <member len="poolSizeCount">const <type>VkDescriptorPoolSize</type>* <name>pPoolSizes</name></member> + </type> + <type category="struct" name="VkDescriptorSetAllocateInfo"> + <member values="VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member><type>VkDescriptorPool</type> <name>descriptorPool</name></member> + <member><type>uint32_t</type> <name>descriptorSetCount</name></member> + <member len="descriptorSetCount">const <type>VkDescriptorSetLayout</type>* <name>pSetLayouts</name></member> + </type> + <type category="struct" name="VkSpecializationMapEntry"> + <member><type>uint32_t</type> <name>constantID</name></member> <!-- The SpecConstant ID specified in the BIL --> + <member><type>uint32_t</type> <name>offset</name></member> <!-- Offset of the value in the data block --> + <member><type>size_t</type> <name>size</name></member> <!-- Size in bytes of the SpecConstant --> + </type> + <type category="struct" name="VkSpecializationInfo"> + <member optional="true"><type>uint32_t</type> <name>mapEntryCount</name></member> <!-- Number of entries in the map --> + <member len="mapEntryCount" noautovalidity="true">const <type>VkSpecializationMapEntry</type>* <name>pMapEntries</name></member> <!-- Array of map entries --> + <member optional="true"><type>size_t</type> <name>dataSize</name></member> <!-- Size in bytes of pData --> + <member len="dataSize">const <type>void</type>* <name>pData</name></member> <!-- Pointer to SpecConstant data --> + </type> + <type category="struct" name="VkPipelineShaderStageCreateInfo"> + <member values="VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkPipelineShaderStageCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member><type>VkShaderStageFlagBits</type> <name>stage</name></member> <!-- Shader stage --> + <member><type>VkShaderModule</type> <name>module</name></member> <!-- Module containing entry point --> + <member len="null-terminated">const <type>char</type>* <name>pName</name></member> <!-- Null-terminated entry point name --> + <member optional="true">const <type>VkSpecializationInfo</type>* <name>pSpecializationInfo</name></member> + </type> + <type category="struct" name="VkComputePipelineCreateInfo"> + <member values="VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkPipelineCreateFlags</type> <name>flags</name></member> <!-- Pipeline creation flags --> + <member><type>VkPipelineShaderStageCreateInfo</type> <name>stage</name></member> + <member><type>VkPipelineLayout</type> <name>layout</name></member> <!-- Interface layout of the pipeline --> + <member noautovalidity="true" optional="true"><type>VkPipeline</type> <name>basePipelineHandle</name></member> <!-- If VK_PIPELINE_CREATE_DERIVATIVE_BIT is set and this value is nonzero, it specifies the handle of the base pipeline this is a derivative of --> + <member><type>int32_t</type> <name>basePipelineIndex</name></member> <!-- If VK_PIPELINE_CREATE_DERIVATIVE_BIT is set and this value is not -1, it specifies an index into pCreateInfos of the base pipeline this is a derivative of --> + </type> + <type category="struct" name="VkVertexInputBindingDescription"> + <member><type>uint32_t</type> <name>binding</name></member> <!-- Vertex buffer binding id --> + <member><type>uint32_t</type> <name>stride</name></member> <!-- Distance between vertices in bytes (0 = no advancement) --> + <member><type>VkVertexInputRate</type> <name>inputRate</name></member> <!-- The rate at which the vertex data is consumed --> + </type> + <type category="struct" name="VkVertexInputAttributeDescription"> + <member><type>uint32_t</type> <name>location</name></member> <!-- location of the shader vertex attrib --> + <member><type>uint32_t</type> <name>binding</name></member> <!-- Vertex buffer binding id --> + <member><type>VkFormat</type> <name>format</name></member> <!-- format of source data --> + <member><type>uint32_t</type> <name>offset</name></member> <!-- Offset of first element in bytes from base of vertex --> + </type> + <type category="struct" name="VkPipelineVertexInputStateCreateInfo"> + <member values="VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkPipelineVertexInputStateCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member optional="true"><type>uint32_t</type> <name>vertexBindingDescriptionCount</name></member> <!-- number of bindings --> + <member len="vertexBindingDescriptionCount">const <type>VkVertexInputBindingDescription</type>* <name>pVertexBindingDescriptions</name></member> + <member optional="true"><type>uint32_t</type> <name>vertexAttributeDescriptionCount</name></member> <!-- number of attributes --> + <member len="vertexAttributeDescriptionCount">const <type>VkVertexInputAttributeDescription</type>* <name>pVertexAttributeDescriptions</name></member> + </type> + <type category="struct" name="VkPipelineInputAssemblyStateCreateInfo"> + <member values="VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkPipelineInputAssemblyStateCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member><type>VkPrimitiveTopology</type> <name>topology</name></member> + <member><type>VkBool32</type> <name>primitiveRestartEnable</name></member> + </type> + <type category="struct" name="VkPipelineTessellationStateCreateInfo"> + <member values="VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkPipelineTessellationStateCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member><type>uint32_t</type> <name>patchControlPoints</name></member> + </type> + <type category="struct" name="VkPipelineViewportStateCreateInfo"> + <member values="VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkPipelineViewportStateCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member><type>uint32_t</type> <name>viewportCount</name></member> + <member noautovalidity="true" optional="true" len="viewportCount">const <type>VkViewport</type>* <name>pViewports</name></member> + <member><type>uint32_t</type> <name>scissorCount</name></member> + <member noautovalidity="true" optional="true" len="scissorCount">const <type>VkRect2D</type>* <name>pScissors</name></member> + </type> + <type category="struct" name="VkPipelineRasterizationStateCreateInfo"> + <member values="VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member> + <member validextensionstructs="VkPipelineRasterizationStateRasterizationOrderAMD">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkPipelineRasterizationStateCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member><type>VkBool32</type> <name>depthClampEnable</name></member> + <member><type>VkBool32</type> <name>rasterizerDiscardEnable</name></member> + <member><type>VkPolygonMode</type> <name>polygonMode</name></member> <!-- optional (GL45) --> + <member optional="true"><type>VkCullModeFlags</type> <name>cullMode</name></member> + <member><type>VkFrontFace</type> <name>frontFace</name></member> + <member><type>VkBool32</type> <name>depthBiasEnable</name></member> + <member><type>float</type> <name>depthBiasConstantFactor</name></member> + <member><type>float</type> <name>depthBiasClamp</name></member> + <member><type>float</type> <name>depthBiasSlopeFactor</name></member> + <member><type>float</type> <name>lineWidth</name></member> + </type> + <type category="struct" name="VkPipelineMultisampleStateCreateInfo"> + <member values="VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkPipelineMultisampleStateCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member><type>VkSampleCountFlagBits</type> <name>rasterizationSamples</name></member> <!-- Number of samples used for rasterization --> + <member><type>VkBool32</type> <name>sampleShadingEnable</name></member> <!-- optional (GL45) --> + <member><type>float</type> <name>minSampleShading</name></member> <!-- optional (GL45) --> + <member optional="true" len="latexmath:[$\lceil{\mathit{rasterizationSamples} \over 32}\rceil$]">const <type>VkSampleMask</type>* <name>pSampleMask</name></member> <!-- Array of sampleMask words --> + <member><type>VkBool32</type> <name>alphaToCoverageEnable</name></member> + <member><type>VkBool32</type> <name>alphaToOneEnable</name></member> + </type> + <type category="struct" name="VkPipelineColorBlendAttachmentState"> + <member><type>VkBool32</type> <name>blendEnable</name></member> + <member><type>VkBlendFactor</type> <name>srcColorBlendFactor</name></member> + <member><type>VkBlendFactor</type> <name>dstColorBlendFactor</name></member> + <member><type>VkBlendOp</type> <name>colorBlendOp</name></member> + <member><type>VkBlendFactor</type> <name>srcAlphaBlendFactor</name></member> + <member><type>VkBlendFactor</type> <name>dstAlphaBlendFactor</name></member> + <member><type>VkBlendOp</type> <name>alphaBlendOp</name></member> + <member optional="true"><type>VkColorComponentFlags</type> <name>colorWriteMask</name></member> + </type> + <type category="struct" name="VkPipelineColorBlendStateCreateInfo"> + <member values="VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkPipelineColorBlendStateCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member><type>VkBool32</type> <name>logicOpEnable</name></member> + <member noautovalidity="true"><type>VkLogicOp</type> <name>logicOp</name></member> + <member optional="true"><type>uint32_t</type> <name>attachmentCount</name></member> <!-- # of pAttachments --> + <member len="attachmentCount">const <type>VkPipelineColorBlendAttachmentState</type>* <name>pAttachments</name></member> + <member><type>float</type> <name>blendConstants</name>[4]</member> + </type> + <type category="struct" name="VkPipelineDynamicStateCreateInfo"> + <member values="VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkPipelineDynamicStateCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member><type>uint32_t</type> <name>dynamicStateCount</name></member> + <member len="dynamicStateCount">const <type>VkDynamicState</type>* <name>pDynamicStates</name></member> + </type> + <type category="struct" name="VkStencilOpState"> + <member><type>VkStencilOp</type> <name>failOp</name></member> + <member><type>VkStencilOp</type> <name>passOp</name></member> + <member><type>VkStencilOp</type> <name>depthFailOp</name></member> + <member><type>VkCompareOp</type> <name>compareOp</name></member> + <member><type>uint32_t</type> <name>compareMask</name></member> + <member><type>uint32_t</type> <name>writeMask</name></member> + <member><type>uint32_t</type> <name>reference</name></member> + </type> + <type category="struct" name="VkPipelineDepthStencilStateCreateInfo"> + <member values="VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkPipelineDepthStencilStateCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member><type>VkBool32</type> <name>depthTestEnable</name></member> + <member><type>VkBool32</type> <name>depthWriteEnable</name></member> + <member><type>VkCompareOp</type> <name>depthCompareOp</name></member> + <member><type>VkBool32</type> <name>depthBoundsTestEnable</name></member> <!-- optional (depth_bounds_test) --> + <member><type>VkBool32</type> <name>stencilTestEnable</name></member> + <member><type>VkStencilOpState</type> <name>front</name></member> + <member><type>VkStencilOpState</type> <name>back</name></member> + <member><type>float</type> <name>minDepthBounds</name></member> + <member><type>float</type> <name>maxDepthBounds</name></member> + </type> + <type category="struct" name="VkGraphicsPipelineCreateInfo"> + <member values="VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkPipelineCreateFlags</type> <name>flags</name></member> <!-- Pipeline creation flags --> + <member><type>uint32_t</type> <name>stageCount</name></member> + <member len="stageCount">const <type>VkPipelineShaderStageCreateInfo</type>* <name>pStages</name></member> <!-- One entry for each active shader stage --> + <member>const <type>VkPipelineVertexInputStateCreateInfo</type>* <name>pVertexInputState</name></member> + <member>const <type>VkPipelineInputAssemblyStateCreateInfo</type>* <name>pInputAssemblyState</name></member> + <member noautovalidity="true" optional="true">const <type>VkPipelineTessellationStateCreateInfo</type>* <name>pTessellationState</name></member> + <member noautovalidity="true" optional="true">const <type>VkPipelineViewportStateCreateInfo</type>* <name>pViewportState</name></member> + <member>const <type>VkPipelineRasterizationStateCreateInfo</type>* <name>pRasterizationState</name></member> + <member noautovalidity="true" optional="true">const <type>VkPipelineMultisampleStateCreateInfo</type>* <name>pMultisampleState</name></member> + <member noautovalidity="true" optional="true">const <type>VkPipelineDepthStencilStateCreateInfo</type>* <name>pDepthStencilState</name></member> + <member noautovalidity="true" optional="true">const <type>VkPipelineColorBlendStateCreateInfo</type>* <name>pColorBlendState</name></member> + <member optional="true">const <type>VkPipelineDynamicStateCreateInfo</type>* <name>pDynamicState</name></member> + <member><type>VkPipelineLayout</type> <name>layout</name></member> <!-- Interface layout of the pipeline --> + <member><type>VkRenderPass</type> <name>renderPass</name></member> + <member><type>uint32_t</type> <name>subpass</name></member> + <member noautovalidity="true" optional="true"><type>VkPipeline</type> <name>basePipelineHandle</name></member> <!-- If VK_PIPELINE_CREATE_DERIVATIVE_BIT is set and this value is nonzero, it specifies the handle of the base pipeline this is a derivative of --> + <member><type>int32_t</type> <name>basePipelineIndex</name></member> <!-- If VK_PIPELINE_CREATE_DERIVATIVE_BIT is set and this value is not -1, it specifies an index into pCreateInfos of the base pipeline this is a derivative of --> + </type> + <type category="struct" name="VkPipelineCacheCreateInfo"> + <member values="VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkPipelineCacheCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member optional="true"><type>size_t</type> <name>initialDataSize</name></member> <!-- Size of initial data to populate cache, in bytes --> + <member len="initialDataSize">const <type>void</type>* <name>pInitialData</name></member> <!-- Initial data to populate cache --> + </type> + <type category="struct" name="VkPushConstantRange"> + <member><type>VkShaderStageFlags</type> <name>stageFlags</name></member> <!-- Which stages use the range --> + <member><type>uint32_t</type> <name>offset</name></member> <!-- Start of the range, in bytes --> + <member><type>uint32_t</type> <name>size</name></member> <!-- Size of the range, in bytes --> + </type> + <type category="struct" name="VkPipelineLayoutCreateInfo"> + <member values="VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkPipelineLayoutCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member optional="true"><type>uint32_t</type> <name>setLayoutCount</name></member> <!-- Number of descriptor sets interfaced by the pipeline --> + <member len="setLayoutCount">const <type>VkDescriptorSetLayout</type>* <name>pSetLayouts</name></member> <!-- Array of setCount number of descriptor set layout objects defining the layout of the --> + <member optional="true"><type>uint32_t</type> <name>pushConstantRangeCount</name></member> <!-- Number of push-constant ranges used by the pipeline --> + <member len="pushConstantRangeCount">const <type>VkPushConstantRange</type>* <name>pPushConstantRanges</name></member> <!-- Array of pushConstantRangeCount number of ranges used by various shader stages --> + </type> + <type category="struct" name="VkSamplerCreateInfo"> + <member values="VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkSamplerCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member><type>VkFilter</type> <name>magFilter</name></member> <!-- Filter mode for magnification --> + <member><type>VkFilter</type> <name>minFilter</name></member> <!-- Filter mode for minifiation --> + <member><type>VkSamplerMipmapMode</type> <name>mipmapMode</name></member> <!-- Mipmap selection mode --> + <member><type>VkSamplerAddressMode</type> <name>addressModeU</name></member> + <member><type>VkSamplerAddressMode</type> <name>addressModeV</name></member> + <member><type>VkSamplerAddressMode</type> <name>addressModeW</name></member> + <member><type>float</type> <name>mipLodBias</name></member> + <member><type>VkBool32</type> <name>anisotropyEnable</name></member> + <member><type>float</type> <name>maxAnisotropy</name></member> + <member><type>VkBool32</type> <name>compareEnable</name></member> + <member noautovalidity="true"><type>VkCompareOp</type> <name>compareOp</name></member> + <member><type>float</type> <name>minLod</name></member> + <member><type>float</type> <name>maxLod</name></member> + <member noautovalidity="true"><type>VkBorderColor</type> <name>borderColor</name></member> + <member><type>VkBool32</type> <name>unnormalizedCoordinates</name></member> + </type> + <type category="struct" name="VkCommandPoolCreateInfo"> + <member values="VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkCommandPoolCreateFlags</type> <name>flags</name></member> <!-- Command pool creation flags --> + <member><type>uint32_t</type> <name>queueFamilyIndex</name></member> + </type> + <type category="struct" name="VkCommandBufferAllocateInfo"> + <member values="VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member><type>VkCommandPool</type> <name>commandPool</name></member> + <member><type>VkCommandBufferLevel</type> <name>level</name></member> + <member><type>uint32_t</type> <name>commandBufferCount</name></member> + </type> + <type category="struct" name="VkCommandBufferInheritanceInfo"> + <member values="VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true" noautovalidity="true"><type>VkRenderPass</type> <name>renderPass</name></member> <!-- Render pass for secondary command buffers --> + <member><type>uint32_t</type> <name>subpass</name></member> + <member optional="true" noautovalidity="true"><type>VkFramebuffer</type> <name>framebuffer</name></member> <!-- Framebuffer for secondary command buffers --> + <member><type>VkBool32</type> <name>occlusionQueryEnable</name></member> <!-- Whether this secondary command buffer may be executed during an occlusion query --> + <member optional="true" noautovalidity="true"><type>VkQueryControlFlags</type> <name>queryFlags</name></member> <!-- Query flags used by this secondary command buffer, if executed during an occlusion query --> + <member optional="true" noautovalidity="true"><type>VkQueryPipelineStatisticFlags</type> <name>pipelineStatistics</name></member> <!-- Pipeline statistics that may be counted for this secondary command buffer --> + </type> + <type category="struct" name="VkCommandBufferBeginInfo"> + <member values="VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkCommandBufferUsageFlags</type> <name>flags</name></member> <!-- Command buffer usage flags --> + <member optional="true" noautovalidity="true">const <type>VkCommandBufferInheritanceInfo</type>* <name>pInheritanceInfo</name></member> <!-- Pointer to inheritance info for secondary command buffers --> + </type> + <type category="struct" name="VkRenderPassBeginInfo"> + <member values="VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member><type>VkRenderPass</type> <name>renderPass</name></member> + <member><type>VkFramebuffer</type> <name>framebuffer</name></member> + <member><type>VkRect2D</type> <name>renderArea</name></member> + <member optional="true"><type>uint32_t</type> <name>clearValueCount</name></member> + <member len="clearValueCount" noautovalidity="true">const <type>VkClearValue</type>* <name>pClearValues</name></member> + </type> + <type category="union" name="VkClearColorValue" comment="// Union allowing specification of floating point, integer, or unsigned integer color data. Actual value selected is based on image/attachment being cleared."> + <member><type>float</type> <name>float32</name>[4]</member> + <member><type>int32_t</type> <name>int32</name>[4]</member> + <member><type>uint32_t</type> <name>uint32</name>[4]</member> + </type> + <type category="struct" name="VkClearDepthStencilValue"> + <member><type>float</type> <name>depth</name></member> + <member><type>uint32_t</type> <name>stencil</name></member> + </type> + <type category="union" name="VkClearValue" comment="// Union allowing specification of color or depth and stencil values. Actual value selected is based on attachment being cleared."> + <member><type>VkClearColorValue</type> <name>color</name></member> + <member><type>VkClearDepthStencilValue</type> <name>depthStencil</name></member> + </type> + <type category="struct" name="VkClearAttachment"> + <member><type>VkImageAspectFlags</type> <name>aspectMask</name></member> + <member><type>uint32_t</type> <name>colorAttachment</name></member> + <member><type>VkClearValue</type> <name>clearValue</name></member> + </type> + <type category="struct" name="VkAttachmentDescription"> + <member optional="true"><type>VkAttachmentDescriptionFlags</type> <name>flags</name></member> + <member><type>VkFormat</type> <name>format</name></member> + <member><type>VkSampleCountFlagBits</type> <name>samples</name></member> + <member><type>VkAttachmentLoadOp</type> <name>loadOp</name></member> <!-- Load operation for color or depth data --> + <member><type>VkAttachmentStoreOp</type> <name>storeOp</name></member> <!-- Store operation for color or depth data --> + <member><type>VkAttachmentLoadOp</type> <name>stencilLoadOp</name></member> <!-- Load operation for stencil data --> + <member><type>VkAttachmentStoreOp</type> <name>stencilStoreOp</name></member> <!-- Store operation for stencil data --> + <member><type>VkImageLayout</type> <name>initialLayout</name></member> + <member><type>VkImageLayout</type> <name>finalLayout</name></member> + </type> + <type category="struct" name="VkAttachmentReference"> + <member><type>uint32_t</type> <name>attachment</name></member> + <member><type>VkImageLayout</type> <name>layout</name></member> + </type> + <type category="struct" name="VkSubpassDescription"> + <member optional="true"><type>VkSubpassDescriptionFlags</type> <name>flags</name></member> + <member><type>VkPipelineBindPoint</type> <name>pipelineBindPoint</name></member> <!-- Must be VK_PIPELINE_BIND_POINT_GRAPHICS for now --> + <member optional="true"><type>uint32_t</type> <name>inputAttachmentCount</name></member> + <member len="inputAttachmentCount">const <type>VkAttachmentReference</type>* <name>pInputAttachments</name></member> + <member optional="true"><type>uint32_t</type> <name>colorAttachmentCount</name></member> + <member len="colorAttachmentCount">const <type>VkAttachmentReference</type>* <name>pColorAttachments</name></member> + <member optional="true" len="colorAttachmentCount">const <type>VkAttachmentReference</type>* <name>pResolveAttachments</name></member> + <member optional="true">const <type>VkAttachmentReference</type>* <name>pDepthStencilAttachment</name></member> + <member optional="true"><type>uint32_t</type> <name>preserveAttachmentCount</name></member> + <member len="preserveAttachmentCount">const <type>uint32_t</type>* <name>pPreserveAttachments</name></member> + </type> + <type category="struct" name="VkSubpassDependency"> + <member><type>uint32_t</type> <name>srcSubpass</name></member> + <member><type>uint32_t</type> <name>dstSubpass</name></member> + <member><type>VkPipelineStageFlags</type> <name>srcStageMask</name></member> + <member><type>VkPipelineStageFlags</type> <name>dstStageMask</name></member> + <member optional="true"><type>VkAccessFlags</type> <name>srcAccessMask</name></member> <!-- Memory accesses from the source of the dependency to synchronize --> + <member optional="true"><type>VkAccessFlags</type> <name>dstAccessMask</name></member> <!-- Memory accesses from the destination of the dependency to synchronize --> + <member optional="true"><type>VkDependencyFlags</type> <name>dependencyFlags</name></member> + </type> + <type category="struct" name="VkRenderPassCreateInfo"> + <member values="VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkRenderPassCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member optional="true"><type>uint32_t</type> <name>attachmentCount</name></member> + <member len="attachmentCount">const <type>VkAttachmentDescription</type>* <name>pAttachments</name></member> + <member><type>uint32_t</type> <name>subpassCount</name></member> + <member len="subpassCount">const <type>VkSubpassDescription</type>* <name>pSubpasses</name></member> + <member optional="true"><type>uint32_t</type> <name>dependencyCount</name></member> + <member len="dependencyCount">const <type>VkSubpassDependency</type>* <name>pDependencies</name></member> + </type> + <type category="struct" name="VkEventCreateInfo"> + <member values="VK_STRUCTURE_TYPE_EVENT_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkEventCreateFlags</type> <name>flags</name></member> <!-- Event creation flags --> + </type> + <type category="struct" name="VkFenceCreateInfo"> + <member values="VK_STRUCTURE_TYPE_FENCE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkFenceCreateFlags</type> <name>flags</name></member> <!-- Fence creation flags --> + </type> + <type category="struct" name="VkPhysicalDeviceFeatures"> + <member><type>VkBool32</type> <name>robustBufferAccess</name></member> <!-- out of bounds buffer accesses are well defined --> + <member><type>VkBool32</type> <name>fullDrawIndexUint32</name></member> <!-- full 32-bit range of indices for indexed draw calls --> + <member><type>VkBool32</type> <name>imageCubeArray</name></member> <!-- image views which are arrays of cube maps --> + <member><type>VkBool32</type> <name>independentBlend</name></member> <!-- blending operations are controlled per-attachment --> + <member><type>VkBool32</type> <name>geometryShader</name></member> <!-- geometry stage --> + <member><type>VkBool32</type> <name>tessellationShader</name></member> <!-- tessellation control and evaluation stage --> + <member><type>VkBool32</type> <name>sampleRateShading</name></member> <!-- per-sample shading and interpolation --> + <member><type>VkBool32</type> <name>dualSrcBlend</name></member> <!-- blend operations which take two sources --> + <member><type>VkBool32</type> <name>logicOp</name></member> <!-- logic operations --> + <member><type>VkBool32</type> <name>multiDrawIndirect</name></member> <!-- multi draw indirect --> + <member><type>VkBool32</type> <name>drawIndirectFirstInstance</name></member> <!-- indirect draws can use non-zero firstInstance --> + <member><type>VkBool32</type> <name>depthClamp</name></member> <!-- depth clamping --> + <member><type>VkBool32</type> <name>depthBiasClamp</name></member> <!-- depth bias clamping --> + <member><type>VkBool32</type> <name>fillModeNonSolid</name></member> <!-- point and wireframe fill modes --> + <member><type>VkBool32</type> <name>depthBounds</name></member> <!-- depth bounds test --> + <member><type>VkBool32</type> <name>wideLines</name></member> <!-- lines with width greater than 1 --> + <member><type>VkBool32</type> <name>largePoints</name></member> <!-- points with size greater than 1 --> + <member><type>VkBool32</type> <name>alphaToOne</name></member> <!-- the fragment alpha component can be forced to maximum representable alpha value --> + <member><type>VkBool32</type> <name>multiViewport</name></member> <!-- viewport arrays --> + <member><type>VkBool32</type> <name>samplerAnisotropy</name></member> <!-- anisotropic sampler filtering --> + <member><type>VkBool32</type> <name>textureCompressionETC2</name></member> <!-- ETC texture compression formats --> + <member><type>VkBool32</type> <name>textureCompressionASTC_LDR</name></member> <!-- ASTC LDR texture compression formats --> + <member><type>VkBool32</type> <name>textureCompressionBC</name></member> <!-- BC1-7 texture compressed formats --> + <member><type>VkBool32</type> <name>occlusionQueryPrecise</name></member> <!-- precise occlusion queries returning actual sample counts --> + <member><type>VkBool32</type> <name>pipelineStatisticsQuery</name></member> <!-- pipeline statistics query --> + <member><type>VkBool32</type> <name>vertexPipelineStoresAndAtomics</name></member> <!-- stores and atomic ops on storage buffers and images are supported in vertex, tessellation, and geometry stages --> + <member><type>VkBool32</type> <name>fragmentStoresAndAtomics</name></member> <!-- stores and atomic ops on storage buffers and images are supported in the fragment stage --> + <member><type>VkBool32</type> <name>shaderTessellationAndGeometryPointSize</name></member><!-- tessellation and geometry stages can export point size --> + <member><type>VkBool32</type> <name>shaderImageGatherExtended</name></member> <!-- image gather with run-time values and independent offsets --> + <member><type>VkBool32</type> <name>shaderStorageImageExtendedFormats</name></member> <!-- the extended set of formats can be used for storage images --> + <member><type>VkBool32</type> <name>shaderStorageImageMultisample</name></member> <!-- multisample images can be used for storage images --> + <member><type>VkBool32</type> <name>shaderStorageImageReadWithoutFormat</name></member> <!-- read from storage image does not require format qualifier --> + <member><type>VkBool32</type> <name>shaderStorageImageWriteWithoutFormat</name></member> <!-- write to storage image does not require format qualifier --> + <member><type>VkBool32</type> <name>shaderUniformBufferArrayDynamicIndexing</name></member> <!-- arrays of uniform buffers can be accessed with dynamically uniform indices --> + <member><type>VkBool32</type> <name>shaderSampledImageArrayDynamicIndexing</name></member> <!-- arrays of sampled images can be accessed with dynamically uniform indices --> + <member><type>VkBool32</type> <name>shaderStorageBufferArrayDynamicIndexing</name></member> <!-- arrays of storage buffers can be accessed with dynamically uniform indices --> + <member><type>VkBool32</type> <name>shaderStorageImageArrayDynamicIndexing</name></member> <!-- arrays of storage images can be accessed with dynamically uniform indices --> + <member><type>VkBool32</type> <name>shaderClipDistance</name></member> <!-- clip distance in shaders --> + <member><type>VkBool32</type> <name>shaderCullDistance</name></member> <!-- cull distance in shaders --> + <member><type>VkBool32</type> <name>shaderFloat64</name></member> <!-- 64-bit floats (doubles) in shaders --> + <member><type>VkBool32</type> <name>shaderInt64</name></member> <!-- 64-bit integers in shaders --> + <member><type>VkBool32</type> <name>shaderInt16</name></member> <!-- 16-bit integers in shaders --> + <member><type>VkBool32</type> <name>shaderResourceResidency</name></member> <!-- shader can use texture operations that return resource residency information (requires sparseNonResident support) --> + <member><type>VkBool32</type> <name>shaderResourceMinLod</name></member> <!-- shader can use texture operations that specify minimum resource level of detail --> + <member><type>VkBool32</type> <name>sparseBinding</name></member> <!-- Sparse resources support: Resource memory can be managed at opaque page level rather than object level --> + <member><type>VkBool32</type> <name>sparseResidencyBuffer</name></member> <!-- Sparse resources support: GPU can access partially resident buffers --> + <member><type>VkBool32</type> <name>sparseResidencyImage2D</name></member> <!-- Sparse resources support: GPU can access partially resident 2D (non-MSAA non-depth/stencil) images --> + <member><type>VkBool32</type> <name>sparseResidencyImage3D</name></member> <!-- Sparse resources support: GPU can access partially resident 3D images --> + <member><type>VkBool32</type> <name>sparseResidency2Samples</name></member> <!-- Sparse resources support: GPU can access partially resident MSAA 2D images with 2 samples --> + <member><type>VkBool32</type> <name>sparseResidency4Samples</name></member> <!-- Sparse resources support: GPU can access partially resident MSAA 2D images with 4 samples --> + <member><type>VkBool32</type> <name>sparseResidency8Samples</name></member> <!-- Sparse resources support: GPU can access partially resident MSAA 2D images with 8 samples --> + <member><type>VkBool32</type> <name>sparseResidency16Samples</name></member> <!-- Sparse resources support: GPU can access partially resident MSAA 2D images with 16 samples --> + <member><type>VkBool32</type> <name>sparseResidencyAliased</name></member> <!-- Sparse resources support: GPU can correctly access data aliased into multiple locations (opt-in) --> + <member><type>VkBool32</type> <name>variableMultisampleRate</name></member> <!-- multisample rate must be the same for all pipelines in a subpass --> + <member><type>VkBool32</type> <name>inheritedQueries</name></member> <!-- Queries may be inherited from primary to secondary command buffers --> + </type> + <type category="struct" name="VkPhysicalDeviceSparseProperties" returnedonly="true"> + <member><type>VkBool32</type> <name>residencyStandard2DBlockShape</name></member> <!-- Sparse resources support: GPU will access all 2D (single sample) sparse resources using the standard sparse image block shapes (based on pixel format) --> + <member><type>VkBool32</type> <name>residencyStandard2DMultisampleBlockShape</name></member> <!-- Sparse resources support: GPU will access all 2D (multisample) sparse resources using the standard sparse image block shapes (based on pixel format) --> + <member><type>VkBool32</type> <name>residencyStandard3DBlockShape</name></member> <!-- Sparse resources support: GPU will access all 3D sparse resources using the standard sparse image block shapes (based on pixel format) --> + <member><type>VkBool32</type> <name>residencyAlignedMipSize</name></member> <!-- Sparse resources support: Images with mip level dimensions that are NOT a multiple of the sparse image block dimensions will be placed in the mip tail --> + <member><type>VkBool32</type> <name>residencyNonResidentStrict</name></member> <!-- Sparse resources support: GPU can consistently access non-resident regions of a resource, all reads return as if data is 0, writes are discarded --> + </type> + <type category="struct" name="VkPhysicalDeviceLimits" returnedonly="true"> + <!-- resource maximum sizes --> + <member><type>uint32_t</type> <name>maxImageDimension1D</name></member> <!-- max 1D image dimension --> + <member><type>uint32_t</type> <name>maxImageDimension2D</name></member> <!-- max 2D image dimension --> + <member><type>uint32_t</type> <name>maxImageDimension3D</name></member> <!-- max 3D image dimension --> + <member><type>uint32_t</type> <name>maxImageDimensionCube</name></member> <!-- max cubemap image dimension --> + <member><type>uint32_t</type> <name>maxImageArrayLayers</name></member> <!-- max layers for image arrays --> + <member><type>uint32_t</type> <name>maxTexelBufferElements</name></member> <!-- max texel buffer size (fstexels) --> + <member><type>uint32_t</type> <name>maxUniformBufferRange</name></member> <!-- max uniform buffer range (bytes) --> + <member><type>uint32_t</type> <name>maxStorageBufferRange</name></member> <!-- max storage buffer range (bytes) --> + <member><type>uint32_t</type> <name>maxPushConstantsSize</name></member> <!-- max size of the push constants pool (bytes) --> + <!-- memory limits --> + <member><type>uint32_t</type> <name>maxMemoryAllocationCount</name></member> <!-- max number of device memory allocations supported --> + <member><type>uint32_t</type> <name>maxSamplerAllocationCount</name></member> <!-- max number of samplers that can be allocated on a device --> + <member><type>VkDeviceSize</type> <name>bufferImageGranularity</name></member> <!-- Granularity (in bytes) at which buffers and images can be bound to adjacent memory for simultaneous usage --> + <member><type>VkDeviceSize</type> <name>sparseAddressSpaceSize</name></member> <!-- Total address space available for sparse allocations (bytes) --> + <!-- descriptor set limits --> + <member><type>uint32_t</type> <name>maxBoundDescriptorSets</name></member> <!-- max number of descriptors sets that can be bound to a pipeline --> + <member><type>uint32_t</type> <name>maxPerStageDescriptorSamplers</name></member> <!-- max number of samplers allowed per-stage in a descriptor set --> + <member><type>uint32_t</type> <name>maxPerStageDescriptorUniformBuffers</name></member> <!-- max number of uniform buffers allowed per-stage in a descriptor set --> + <member><type>uint32_t</type> <name>maxPerStageDescriptorStorageBuffers</name></member> <!-- max number of storage buffers allowed per-stage in a descriptor set --> + <member><type>uint32_t</type> <name>maxPerStageDescriptorSampledImages</name></member> <!-- max number of sampled images allowed per-stage in a descriptor set --> + <member><type>uint32_t</type> <name>maxPerStageDescriptorStorageImages</name></member> <!-- max number of storage images allowed per-stage in a descriptor set --> + <member><type>uint32_t</type> <name>maxPerStageDescriptorInputAttachments</name></member> <!-- max number of input attachments allowed per-stage in a descriptor set --> + <member><type>uint32_t</type> <name>maxPerStageResources</name></member> <!-- max number of resources allowed by a single stage --> + <member><type>uint32_t</type> <name>maxDescriptorSetSamplers</name></member> <!-- max number of samplers allowed in all stages in a descriptor set --> + <member><type>uint32_t</type> <name>maxDescriptorSetUniformBuffers</name></member> <!-- max number of uniform buffers allowed in all stages in a descriptor set --> + <member><type>uint32_t</type> <name>maxDescriptorSetUniformBuffersDynamic</name></member> <!-- max number of dynamic uniform buffers allowed in all stages in a descriptor set --> + <member><type>uint32_t</type> <name>maxDescriptorSetStorageBuffers</name></member> <!-- max number of storage buffers allowed in all stages in a descriptor set --> + <member><type>uint32_t</type> <name>maxDescriptorSetStorageBuffersDynamic</name></member> <!-- max number of dynamic storage buffers allowed in all stages in a descriptor set --> + <member><type>uint32_t</type> <name>maxDescriptorSetSampledImages</name></member> <!-- max number of sampled images allowed in all stages in a descriptor set --> + <member><type>uint32_t</type> <name>maxDescriptorSetStorageImages</name></member> <!-- max number of storage images allowed in all stages in a descriptor set --> + <member><type>uint32_t</type> <name>maxDescriptorSetInputAttachments</name></member> <!-- max number of input attachments allowed in all stages in a descriptor set --> + <!-- vertex stage limits --> + <member><type>uint32_t</type> <name>maxVertexInputAttributes</name></member> <!-- max number of vertex input attribute slots --> + <member><type>uint32_t</type> <name>maxVertexInputBindings</name></member> <!-- max number of vertex input binding slots --> + <member><type>uint32_t</type> <name>maxVertexInputAttributeOffset</name></member> <!-- max vertex input attribute offset added to vertex buffer offset --> + <member><type>uint32_t</type> <name>maxVertexInputBindingStride</name></member> <!-- max vertex input binding stride --> + <member><type>uint32_t</type> <name>maxVertexOutputComponents</name></member> <!-- max number of output components written by vertex shader --> + <!-- tessellation control stage limits --> + <member><type>uint32_t</type> <name>maxTessellationGenerationLevel</name></member> <!-- max level supported by tessellation primitive generator --> + <member><type>uint32_t</type> <name>maxTessellationPatchSize</name></member> <!-- max patch size (vertices) --> + <member><type>uint32_t</type> <name>maxTessellationControlPerVertexInputComponents</name></member> <!-- max number of input components per-vertex in TCS --> + <member><type>uint32_t</type> <name>maxTessellationControlPerVertexOutputComponents</name></member> <!-- max number of output components per-vertex in TCS --> + <member><type>uint32_t</type> <name>maxTessellationControlPerPatchOutputComponents</name></member> <!-- max number of output components per-patch in TCS --> + <member><type>uint32_t</type> <name>maxTessellationControlTotalOutputComponents</name></member> <!-- max total number of per-vertex and per-patch output components in TCS --> + <!-- tessellation evaluation stage limits --> + <member><type>uint32_t</type> <name>maxTessellationEvaluationInputComponents</name></member> <!-- max number of input components per vertex in TES --> + <member><type>uint32_t</type> <name>maxTessellationEvaluationOutputComponents</name></member> <!-- max number of output components per vertex in TES --> + <!-- geometry stage limits --> + <member><type>uint32_t</type> <name>maxGeometryShaderInvocations</name></member> <!-- max invocation count supported in geometry shader --> + <member><type>uint32_t</type> <name>maxGeometryInputComponents</name></member> <!-- max number of input components read in geometry stage --> + <member><type>uint32_t</type> <name>maxGeometryOutputComponents</name></member> <!-- max number of output components written in geometry stage --> + <member><type>uint32_t</type> <name>maxGeometryOutputVertices</name></member> <!-- max number of vertices that can be emitted in geometry stage --> + <member><type>uint32_t</type> <name>maxGeometryTotalOutputComponents</name></member> <!-- max total number of components (all vertices) written in geometry stage --> + <!-- fragment stage limits --> + <member><type>uint32_t</type> <name>maxFragmentInputComponents</name></member> <!-- max number of input compontents read in fragment stage --> + <member><type>uint32_t</type> <name>maxFragmentOutputAttachments</name></member> <!-- max number of output attachments written in fragment stage --> + <member><type>uint32_t</type> <name>maxFragmentDualSrcAttachments</name></member> <!-- max number of output attachments written when using dual source blending --> + <member><type>uint32_t</type> <name>maxFragmentCombinedOutputResources</name></member><!-- max total number of storage buffers, storage images and output buffers --> + <!-- compute stage limits --> + <member><type>uint32_t</type> <name>maxComputeSharedMemorySize</name></member> <!-- max total storage size of work group local storage (bytes) --> + <member><type>uint32_t</type> <name>maxComputeWorkGroupCount</name>[3]</member> <!-- max num of compute work groups that may be dispatched by a single command (x,y,z) --> + <member><type>uint32_t</type> <name>maxComputeWorkGroupInvocations</name></member> <!-- max total compute invocations in a single local work group --> + <member><type>uint32_t</type> <name>maxComputeWorkGroupSize</name>[3]</member> <!-- max local size of a compute work group (x,y,z) --> + <member><type>uint32_t</type> <name>subPixelPrecisionBits</name></member> <!-- number bits of subpixel precision in screen x and y--> + <member><type>uint32_t</type> <name>subTexelPrecisionBits</name></member> <!-- number bits of precision for selecting texel weights--> + <member><type>uint32_t</type> <name>mipmapPrecisionBits</name></member> <!-- number bits of precision for selecting mipmap weights --> + <member><type>uint32_t</type> <name>maxDrawIndexedIndexValue</name></member> <!-- max index value for indexed draw calls (for 32-bit indices) --> + <member><type>uint32_t</type> <name>maxDrawIndirectCount</name></member> <!-- max draw count for indirect draw calls --> + <member><type>float</type> <name>maxSamplerLodBias</name></member> <!-- max absolute sampler level of detail bias --> + <member><type>float</type> <name>maxSamplerAnisotropy</name></member> <!-- max degree of sampler anisotropy --> + <member><type>uint32_t</type> <name>maxViewports</name></member> <!-- max number of active viewports --> + <member><type>uint32_t</type> <name>maxViewportDimensions</name>[2]</member> <!-- max viewport dimensions (x,y) --> + <member><type>float</type> <name>viewportBoundsRange</name>[2]</member> <!-- viewport bounds range (min,max) --> + <member><type>uint32_t</type> <name>viewportSubPixelBits</name></member> <!-- number bits of subpixel precision for viewport --> + <member><type>size_t</type> <name>minMemoryMapAlignment</name></member> <!-- min required alignment of pointers returned by MapMemory (bytes) --> + <member><type>VkDeviceSize</type> <name>minTexelBufferOffsetAlignment</name></member> <!-- min required alignment for texel buffer offsets (bytes) --> + <member><type>VkDeviceSize</type> <name>minUniformBufferOffsetAlignment</name></member> <!-- min required alignment for uniform buffer sizes and offsets (bytes) --> + <member><type>VkDeviceSize</type> <name>minStorageBufferOffsetAlignment</name></member> <!-- min required alignment for storage buffer offsets (bytes) --> + <member><type>int32_t</type> <name>minTexelOffset</name></member> <!-- min texel offset for OpTextureSampleOffset --> + <member><type>uint32_t</type> <name>maxTexelOffset</name></member> <!-- max texel offset for OpTextureSampleOffset --> + <member><type>int32_t</type> <name>minTexelGatherOffset</name></member> <!-- min texel offset for OpTextureGatherOffset --> + <member><type>uint32_t</type> <name>maxTexelGatherOffset</name></member> <!-- max texel offset for OpTextureGatherOffset --> + <member><type>float</type> <name>minInterpolationOffset</name></member> <!-- furthest negative offset for interpolateAtOffset --> + <member><type>float</type> <name>maxInterpolationOffset</name></member> <!-- furthest positive offset for interpolateAtOffset --> + <member><type>uint32_t</type> <name>subPixelInterpolationOffsetBits</name></member> <!-- number of subpixel bits for interpolateAtOffset --> + <member><type>uint32_t</type> <name>maxFramebufferWidth</name></member> <!-- max width for a framebuffer --> + <member><type>uint32_t</type> <name>maxFramebufferHeight</name></member> <!-- max height for a framebuffer --> + <member><type>uint32_t</type> <name>maxFramebufferLayers</name></member> <!-- max layer count for a layered framebuffer --> + <member optional="true"><type>VkSampleCountFlags</type> <name>framebufferColorSampleCounts</name></member> <!-- supported color sample counts for a framebuffer --> + <member optional="true"><type>VkSampleCountFlags</type> <name>framebufferDepthSampleCounts</name></member> <!-- supported depth sample counts for a framebuffer --> + <member optional="true"><type>VkSampleCountFlags</type> <name>framebufferStencilSampleCounts</name></member> <!-- supported stencil sample counts for a framebuffer --> + <member optional="true"><type>VkSampleCountFlags</type> <name>framebufferNoAttachmentsSampleCounts</name></member> <!-- supported sample counts for a framebuffer with no attachments --> + <member><type>uint32_t</type> <name>maxColorAttachments</name></member> <!-- max number of color attachments per subpass --> + <member optional="true"><type>VkSampleCountFlags</type> <name>sampledImageColorSampleCounts</name></member> <!-- supported color sample counts for a non-integer sampled image --> + <member optional="true"><type>VkSampleCountFlags</type> <name>sampledImageIntegerSampleCounts</name></member> <!-- supported sample counts for an integer image --> + <member optional="true"><type>VkSampleCountFlags</type> <name>sampledImageDepthSampleCounts</name></member> <!-- supported depth sample counts for a sampled image --> + <member optional="true"><type>VkSampleCountFlags</type> <name>sampledImageStencilSampleCounts</name></member> <!-- supported stencil sample counts for a sampled image --> + <member optional="true"><type>VkSampleCountFlags</type> <name>storageImageSampleCounts</name></member> <!-- supported sample counts for a storage image --> + <member><type>uint32_t</type> <name>maxSampleMaskWords</name></member> <!-- max number of sample mask words --> + <member><type>VkBool32</type> <name>timestampComputeAndGraphics</name></member> <!-- timestamps on graphics and compute queues --> + <member><type>float</type> <name>timestampPeriod</name></member> <!-- number of nanoseconds it takes for timestamp query value to increment by 1 --> + <member><type>uint32_t</type> <name>maxClipDistances</name></member> <!-- max number of clip distances --> + <member><type>uint32_t</type> <name>maxCullDistances</name></member> <!-- max number of cull distances --> + <member><type>uint32_t</type> <name>maxCombinedClipAndCullDistances</name></member> <!-- max combined number of user clipping --> + <member><type>uint32_t</type> <name>discreteQueuePriorities</name></member> <!-- distinct queue priorities available --> + <member><type>float</type> <name>pointSizeRange</name>[2]</member> <!-- range (min,max) of supported point sizes --> + <member><type>float</type> <name>lineWidthRange</name>[2]</member> <!-- range (min,max) of supported line widths --> + <member><type>float</type> <name>pointSizeGranularity</name></member> <!-- granularity of supported point sizes --> + <member><type>float</type> <name>lineWidthGranularity</name></member> <!-- granularity of supported line widths --> + <member><type>VkBool32</type> <name>strictLines</name></member> <!-- line rasterization follows preferred rules --> + <member><type>VkBool32</type> <name>standardSampleLocations</name></member> <!-- supports standard sample locations for all supported sample counts --> + <member><type>VkDeviceSize</type> <name>optimalBufferCopyOffsetAlignment</name></member> <!-- optimal offset of buffer copies --> + <member><type>VkDeviceSize</type> <name>optimalBufferCopyRowPitchAlignment</name></member><!-- optimal pitch of buffer copies --> + <member><type>VkDeviceSize</type> <name>nonCoherentAtomSize</name></member> <!-- minimum size and alignment for non-coherent host-mapped device memory access --> + </type> + <type category="struct" name="VkSemaphoreCreateInfo"> + <member values="VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkSemaphoreCreateFlags</type> <name>flags</name></member> <!-- Semaphore creation flags --> + </type> + <type category="struct" name="VkQueryPoolCreateInfo"> + <member values="VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkQueryPoolCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member><type>VkQueryType</type> <name>queryType</name></member> + <member><type>uint32_t</type> <name>queryCount</name></member> + <member optional="true" noautovalidity="true"><type>VkQueryPipelineStatisticFlags</type> <name>pipelineStatistics</name></member> <!-- Optional --> + </type> + <type category="struct" name="VkFramebufferCreateInfo"> + <member values="VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkFramebufferCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member><type>VkRenderPass</type> <name>renderPass</name></member> + <member optional="true"><type>uint32_t</type> <name>attachmentCount</name></member> + <member len="attachmentCount">const <type>VkImageView</type>* <name>pAttachments</name></member> + <member><type>uint32_t</type> <name>width</name></member> + <member><type>uint32_t</type> <name>height</name></member> + <member><type>uint32_t</type> <name>layers</name></member> + </type> + <type category="struct" name="VkDrawIndirectCommand"> + <member><type>uint32_t</type> <name>vertexCount</name></member> + <member><type>uint32_t</type> <name>instanceCount</name></member> + <member><type>uint32_t</type> <name>firstVertex</name></member> + <member><type>uint32_t</type> <name>firstInstance</name></member> + </type> + <type category="struct" name="VkDrawIndexedIndirectCommand"> + <member><type>uint32_t</type> <name>indexCount</name></member> + <member><type>uint32_t</type> <name>instanceCount</name></member> + <member><type>uint32_t</type> <name>firstIndex</name></member> + <member><type>int32_t</type> <name>vertexOffset</name></member> + <member><type>uint32_t</type> <name>firstInstance</name></member> + </type> + <type category="struct" name="VkDispatchIndirectCommand"> + <member><type>uint32_t</type> <name>x</name></member> + <member><type>uint32_t</type> <name>y</name></member> + <member><type>uint32_t</type> <name>z</name></member> + </type> + <type category="struct" name="VkSubmitInfo"> + <member values="VK_STRUCTURE_TYPE_SUBMIT_INFO"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>uint32_t</type> <name>waitSemaphoreCount</name></member> + <member len="waitSemaphoreCount">const <type>VkSemaphore</type>* <name>pWaitSemaphores</name></member> + <member len="waitSemaphoreCount">const <type>VkPipelineStageFlags</type>* <name>pWaitDstStageMask</name></member> + <member optional="true"><type>uint32_t</type> <name>commandBufferCount</name></member> + <member len="commandBufferCount">const <type>VkCommandBuffer</type>* <name>pCommandBuffers</name></member> + <member optional="true"><type>uint32_t</type> <name>signalSemaphoreCount</name></member> + <member len="signalSemaphoreCount">const <type>VkSemaphore</type>* <name>pSignalSemaphores</name></member> + </type> + <!-- WSI extensions --> + <type category="struct" name="VkDisplayPropertiesKHR" returnedonly="true"> + <member><type>VkDisplayKHR</type> <name>display</name></member> <!-- Handle of the display object --> + <member len="null-terminated">const <type>char</type>* <name>displayName</name></member> <!-- Name of the display --> + <member><type>VkExtent2D</type> <name>physicalDimensions</name></member> <!-- In millimeters? --> + <member><type>VkExtent2D</type> <name>physicalResolution</name></member> <!-- Max resolution for CRT? --> + <member optional="true"><type>VkSurfaceTransformFlagsKHR</type> <name>supportedTransforms</name></member> <!-- one or more bits from VkSurfaceTransformFlagsKHR --> + <member><type>VkBool32</type> <name>planeReorderPossible</name></member> <!-- VK_TRUE if the overlay plane's z-order can be changed on this display. --> + <member><type>VkBool32</type> <name>persistentContent</name></member> <!-- VK_TRUE if this is a "smart" display that supports self-refresh/internal buffering. --> + </type> + <type category="struct" name="VkDisplayPlanePropertiesKHR" returnedonly="true"> + <member><type>VkDisplayKHR</type> <name>currentDisplay</name></member> <!-- Display the plane is currently associated with. Will be VK_NULL_HANDLE if the plane is not in use. --> + <member><type>uint32_t</type> <name>currentStackIndex</name></member> <!-- Current z-order of the plane. --> + </type> + <type category="struct" name="VkDisplayModeParametersKHR"> + <member><type>VkExtent2D</type> <name>visibleRegion</name></member> <!-- Visible scanout region. --> + <member><type>uint32_t</type> <name>refreshRate</name></member> <!-- Number of times per second the display is updated. --> + </type> + <type category="struct" name="VkDisplayModePropertiesKHR" returnedonly="true"> + <member><type>VkDisplayModeKHR</type> <name>displayMode</name></member> <!-- Handle of this display mode. --> + <member><type>VkDisplayModeParametersKHR</type> <name>parameters</name></member> <!-- The parameters this mode uses. --> + </type> + <type category="struct" name="VkDisplayModeCreateInfoKHR"> + <member values="VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkDisplayModeCreateFlagsKHR</type> <name>flags</name></member> <!-- Reserved --> + <member><type>VkDisplayModeParametersKHR</type> <name>parameters</name></member> <!-- The parameters this mode uses. --> + </type> + <type category="struct" name="VkDisplayPlaneCapabilitiesKHR" returnedonly="true"> + <member optional="true"><type>VkDisplayPlaneAlphaFlagsKHR</type> <name>supportedAlpha</name></member> <!-- Types of alpha blending supported, if any. --> + <member><type>VkOffset2D</type> <name>minSrcPosition</name></member> <!-- Does the plane have any position and extent restrictions? --> + <member><type>VkOffset2D</type> <name>maxSrcPosition</name></member> + <member><type>VkExtent2D</type> <name>minSrcExtent</name></member> + <member><type>VkExtent2D</type> <name>maxSrcExtent</name></member> + <member><type>VkOffset2D</type> <name>minDstPosition</name></member> + <member><type>VkOffset2D</type> <name>maxDstPosition</name></member> + <member><type>VkExtent2D</type> <name>minDstExtent</name></member> + <member><type>VkExtent2D</type> <name>maxDstExtent</name></member> + </type> + <type category="struct" name="VkDisplaySurfaceCreateInfoKHR"> + <member values="VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkDisplaySurfaceCreateFlagsKHR</type> <name>flags</name></member> <!-- Reserved --> + <member><type>VkDisplayModeKHR</type> <name>displayMode</name></member> <!-- The mode to use when displaying this surface --> + <member><type>uint32_t</type> <name>planeIndex</name></member> <!-- The plane on which this surface appears. Must be between 0 and the value returned by vkGetPhysicalDeviceDisplayPlanePropertiesKHR() in pPropertyCount. --> + <member><type>uint32_t</type> <name>planeStackIndex</name></member> <!-- The z-order of the plane. --> + <member><type>VkSurfaceTransformFlagBitsKHR</type> <name>transform</name></member> <!-- Transform to apply to the images as part of the scanout operation --> + <member><type>float</type> <name>globalAlpha</name></member> <!-- Global alpha value. Must be between 0 and 1, inclusive. Ignored if alphaMode is not VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR --> + <member><type>VkDisplayPlaneAlphaFlagBitsKHR</type> <name>alphaMode</name></member> <!-- What type of alpha blending to use. Must be a bit from vkGetDisplayPlanePropertiesKHR::supportedAlpha. --> + <member><type>VkExtent2D</type> <name>imageExtent</name></member> <!-- size of the images to use with this surface --> + </type> + <type category="struct" name="VkDisplayPresentInfoKHR"> + <member values="VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member><type>VkRect2D</type> <name>srcRect</name></member> <!-- Rectangle within the presentable image to read pixel data from when presenting to the display. --> + <member><type>VkRect2D</type> <name>dstRect</name></member> <!-- Rectangle within the current display mode's visible region to display srcRectangle in. --> + <member><type>VkBool32</type> <name>persistent</name></member> <!-- For smart displays, use buffered mode. If the display properties member "persistentMode" is VK_FALSE, this member must always be VK_FALSE. --> + </type> + <type category="struct" name="VkSurfaceCapabilitiesKHR" returnedonly="true"> + <member><type>uint32_t</type> <name>minImageCount</name></member> <!-- Supported minimum number of images for the surface --> + <member><type>uint32_t</type> <name>maxImageCount</name></member> <!-- Supported maximum number of images for the surface, 0 for unlimited --> + <member><type>VkExtent2D</type> <name>currentExtent</name></member> <!-- Current image width and height for the surface, (0, 0) if undefined --> + <member><type>VkExtent2D</type> <name>minImageExtent</name></member> <!-- Supported minimum image width and height for the surface --> + <member><type>VkExtent2D</type> <name>maxImageExtent</name></member> <!-- Supported maximum image width and height for the surface --> + <member><type>uint32_t</type> <name>maxImageArrayLayers</name></member> <!-- Supported maximum number of image layers for the surface --> + <member optional="true"><type>VkSurfaceTransformFlagsKHR</type> <name>supportedTransforms</name></member> <!-- 1 or more bits representing the transforms supported --> + <member><type>VkSurfaceTransformFlagBitsKHR</type> <name>currentTransform</name></member> <!-- The surface's current transform relative to the device's natural orientation --> + <member optional="true"><type>VkCompositeAlphaFlagsKHR</type> <name>supportedCompositeAlpha</name></member> <!-- 1 or more bits representing the alpha compositing modes supported --> + <member optional="true"><type>VkImageUsageFlags</type> <name>supportedUsageFlags</name></member> <!-- Supported image usage flags for the surface --> + </type> + <type category="struct" name="VkAndroidSurfaceCreateInfoKHR"> + <member values="VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkAndroidSurfaceCreateFlagsKHR</type> <name>flags</name></member> <!-- Reserved --> + <member noautovalidity="true"><type>ANativeWindow</type>* <name>window</name></member> + </type> + <type category="struct" name="VkMirSurfaceCreateInfoKHR"> + <member values="VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkMirSurfaceCreateFlagsKHR</type> <name>flags</name></member> <!-- Reserved --> + <member noautovalidity="true"><type>MirConnection</type>* <name>connection</name></member> + <member noautovalidity="true"><type>MirSurface</type>* <name>mirSurface</name></member> + </type> + <type category="struct" name="VkViSurfaceCreateInfoNN"> + <member values="VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkViSurfaceCreateFlagsNN</type> <name>flags</name></member> <!-- Reserved --> + <member><type>void</type>* <name>window</name></member> + </type> + <type category="struct" name="VkWaylandSurfaceCreateInfoKHR"> + <member values="VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkWaylandSurfaceCreateFlagsKHR</type> <name>flags</name></member> <!-- Reserved --> + <member noautovalidity="true">struct <type>wl_display</type>* <name>display</name></member> + <member noautovalidity="true">struct <type>wl_surface</type>* <name>surface</name></member> + </type> + <type category="struct" name="VkWin32SurfaceCreateInfoKHR"> + <member values="VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkWin32SurfaceCreateFlagsKHR</type> <name>flags</name></member> <!-- Reserved --> + <member><type>HINSTANCE</type> <name>hinstance</name></member> + <member><type>HWND</type> <name>hwnd</name></member> + </type> + <type category="struct" name="VkXlibSurfaceCreateInfoKHR"> + <member values="VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkXlibSurfaceCreateFlagsKHR</type> <name>flags</name></member> <!-- Reserved --> + <member noautovalidity="true"><type>Display</type>* <name>dpy</name></member> + <member><type>Window</type> <name>window</name></member> + </type> + <type category="struct" name="VkXcbSurfaceCreateInfoKHR"> + <member values="VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkXcbSurfaceCreateFlagsKHR</type> <name>flags</name></member> <!-- Reserved --> + <member noautovalidity="true"><type>xcb_connection_t</type>* <name>connection</name></member> + <member><type>xcb_window_t</type> <name>window</name></member> + </type> + <type category="struct" name="VkSurfaceFormatKHR" returnedonly="true"> + <member><type>VkFormat</type> <name>format</name></member> <!-- Supported pair of rendering format --> + <member><type>VkColorSpaceKHR</type> <name>colorSpace</name></member> <!-- and color space for the surface --> + </type> + <type category="struct" name="VkSwapchainCreateInfoKHR"> + <member values="VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkSwapchainCreateFlagsKHR</type> <name>flags</name></member> <!-- Reserved --> + <member><type>VkSurfaceKHR</type> <name>surface</name></member> <!-- The swapchain's target surface --> + <member><type>uint32_t</type> <name>minImageCount</name></member> <!-- Minimum number of presentation images the application needs --> + <member><type>VkFormat</type> <name>imageFormat</name></member> <!-- Format of the presentation images --> + <member><type>VkColorSpaceKHR</type> <name>imageColorSpace</name></member> <!-- Colorspace of the presentation images --> + <member><type>VkExtent2D</type> <name>imageExtent</name></member> <!-- Dimensions of the presentation images --> + <member><type>uint32_t</type> <name>imageArrayLayers</name></member> <!-- Determines the number of views for multiview/stereo presentation --> + <member><type>VkImageUsageFlags</type> <name>imageUsage</name></member> <!-- Bits indicating how the presentation images will be used --> + <member><type>VkSharingMode</type> <name>imageSharingMode</name></member> <!-- Sharing mode used for the presentation images --> + <member optional="true"><type>uint32_t</type> <name>queueFamilyIndexCount</name></member> <!-- Number of queue families having access to the images in case of concurrent sharing mode --> + <member noautovalidity="true" len="queueFamilyIndexCount">const <type>uint32_t</type>* <name>pQueueFamilyIndices</name></member> <!-- Array of queue family indices having access to the images in case of concurrent sharing mode --> + <member><type>VkSurfaceTransformFlagBitsKHR</type> <name>preTransform</name></member> <!-- The transform, relative to the device's natural orientation, applied to the image content prior to presentation --> + <member><type>VkCompositeAlphaFlagBitsKHR</type> <name>compositeAlpha</name></member> <!-- The alpha blending mode used when compositing this surface with other surfaces in the window system --> + <member><type>VkPresentModeKHR</type> <name>presentMode</name></member> <!-- Which presentation mode to use for presents on this swap chain --> + <member><type>VkBool32</type> <name>clipped</name></member> <!-- Specifies whether presentable images may be affected by window clip regions --> + <member optional="true"><type>VkSwapchainKHR</type> <name>oldSwapchain</name></member> <!-- Existing swap chain to replace, if any --> + </type> + <type category="struct" name="VkPresentInfoKHR"> + <member values="VK_STRUCTURE_TYPE_PRESENT_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member> + <member validextensionstructs="VkDisplayPresentInfoKHR">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>uint32_t</type> <name>waitSemaphoreCount</name></member> <!-- Number of semaphores to wait for before presenting --> + <member optional="true" len="waitSemaphoreCount">const <type>VkSemaphore</type>* <name>pWaitSemaphores</name></member> <!-- Semaphores to wait for before presenting --> + <member><type>uint32_t</type> <name>swapchainCount</name></member> <!-- Number of swap chains to present in this call --> + <member len="swapchainCount">const <type>VkSwapchainKHR</type>* <name>pSwapchains</name></member> <!-- Swapchains to present an image from --> + <member len="swapchainCount">const <type>uint32_t</type>* <name>pImageIndices</name></member> <!-- Indices of which swapchain images to present --> + <member optional="true" len="swapchainCount"><type>VkResult</type>* <name>pResults</name></member> <!-- Optional (i.e. if non-NULL) VkResult for each swapchain --> + </type> + <type category="struct" name="VkDebugReportCallbackCreateInfoEXT"> + <member values="VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member><type>VkDebugReportFlagsEXT</type> <name>flags</name></member> <!-- Indicates which events call this callback--> + <member><type>PFN_vkDebugReportCallbackEXT</type> <name>pfnCallback</name></member> <!-- Function pointer of a callback function--> + <member optional="true"><type>void</type>* <name>pUserData</name></member> <!-- User data provided to callback function --> + </type> + <type category="struct" name="VkValidationFlagsEXT"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member><type>uint32_t</type> <name>disabledValidationCheckCount</name></member> <!-- Number of validation checks to disable --> + <member len="disabledValidationCheckCount"><type>VkValidationCheckEXT</type>* <name>pDisabledValidationChecks</name></member> <!-- Validation checks to disable --> + </type> + <type category="struct" name="VkPipelineRasterizationStateRasterizationOrderAMD"> + <member values="VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member><type>VkRasterizationOrderAMD</type> <name>rasterizationOrder</name></member> <!-- Rasterization order to use for the pipeline --> + </type> + <type category="struct" name="VkDebugMarkerObjectNameInfoEXT"> + <member values="VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member><type>VkDebugReportObjectTypeEXT</type> <name>objectType</name></member> <!-- The type of the object --> + <member><type>uint64_t</type> <name>object</name></member> <!-- The handle of the object, cast to uint64_t --> + <member len="null-terminated">const <type>char</type>* <name>pObjectName</name></member> <!-- Name to apply to the object --> + </type> + <type category="struct" name="VkDebugMarkerObjectTagInfoEXT"> + <member values="VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member><type>VkDebugReportObjectTypeEXT</type> <name>objectType</name></member> <!-- The type of the object --> + <member><type>uint64_t</type> <name>object</name></member> <!-- The handle of the object, cast to uint64_t --> + <member><type>uint64_t</type> <name>tagName</name></member> <!-- The name of the tag to set on the object --> + <member><type>size_t</type> <name>tagSize</name></member> <!-- The length in bytes of the tag data --> + <member len="tagSize">const <type>void</type>* <name>pTag</name></member> <!-- Tag data to attach to the object --> + </type> + <type category="struct" name="VkDebugMarkerMarkerInfoEXT"> + <member values="VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member len="null-terminated">const <type>char</type>* <name>pMarkerName</name></member> <!-- Name of the debug marker --> + <member optional="true"><type>float</type> <name>color</name>[4]</member> <!-- Optional color for debug marker --> + </type> + <type category="struct" name="VkDedicatedAllocationImageCreateInfoNV"> + <member values="VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member><type>VkBool32</type> <name>dedicatedAllocation</name></member> <!-- Whether this image uses a dedicated allocation --> + </type> + <type category="struct" name="VkDedicatedAllocationBufferCreateInfoNV"> + <member values="VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member><type>VkBool32</type> <name>dedicatedAllocation</name></member> <!-- Whether this buffer uses a dedicated allocation --> + </type> + <type category="struct" name="VkDedicatedAllocationMemoryAllocateInfoNV"> + <member values="VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkImage</type> <name>image</name></member> <!-- Image that this allocation will be bound to --> + <member optional="true"><type>VkBuffer</type> <name>buffer</name></member> <!-- Buffer that this allocation will be bound to --> + </type> + <type category="struct" name="VkExternalImageFormatPropertiesNV" returnedonly="true"> + <member><type>VkImageFormatProperties</type> <name>imageFormatProperties</name></member> + <member optional="true"><type>VkExternalMemoryFeatureFlagsNV</type> <name>externalMemoryFeatures</name></member> + <member optional="true"><type>VkExternalMemoryHandleTypeFlagsNV</type> <name>exportFromImportedHandleTypes</name></member> + <member optional="true"><type>VkExternalMemoryHandleTypeFlagsNV</type> <name>compatibleHandleTypes</name></member> + </type> + <type category="struct" name="VkExternalMemoryImageCreateInfoNV"> + <member values="VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> + <member optional="true"><type>VkExternalMemoryHandleTypeFlagsNV</type> <name>handleTypes</name></member> + </type> + <type category="struct" name="VkExportMemoryAllocateInfoNV"> + <member values="VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> + <member optional="true"><type>VkExternalMemoryHandleTypeFlagsNV</type> <name>handleTypes</name></member> + </type> + <type category="struct" name="VkImportMemoryWin32HandleInfoNV"> + <member values="VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> + <member optional="true"><type>VkExternalMemoryHandleTypeFlagsNV</type> <name>handleType</name></member> + <member optional="true"><type>HANDLE</type> <name>handle</name></member> + </type> + <type category="struct" name="VkExportMemoryWin32HandleInfoNV"> + <member values="VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> + <member optional="true">const <type>SECURITY_ATTRIBUTES</type>* <name>pAttributes</name></member> + <member optional="true"><type>DWORD</type> <name>dwAccess</name></member> + </type> + <type category="struct" name="VkWin32KeyedMutexAcquireReleaseInfoNV"> + <member values="VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> + <member optional="true"><type>uint32_t</type> <name>acquireCount</name></member> + <member len="acquireCount">const <type>VkDeviceMemory</type>* <name>pAcquireSyncs</name></member> + <member len="acquireCount">const <type>uint64_t</type>* <name>pAcquireKeys</name></member> + <member len="acquireCount">const <type>uint32_t</type>* <name>pAcquireTimeoutMilliseconds</name></member> + <member optional="true"><type>uint32_t</type> <name>releaseCount</name></member> + <member len="releaseCount">const <type>VkDeviceMemory</type>* <name>pReleaseSyncs</name></member> + <member len="releaseCount">const <type>uint64_t</type>* <name>pReleaseKeys</name></member> + </type> + + <type category="struct" name="VkDeviceGeneratedCommandsFeaturesNVX"> + <member values="VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> + <member><type>VkBool32</type> <name>computeBindingPointSupport</name></member> + </type> + <type category="struct" name="VkDeviceGeneratedCommandsLimitsNVX"> + <member values="VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> + <member><type>uint32_t</type> <name>maxIndirectCommandsLayoutTokenCount</name></member> + <member><type>uint32_t</type> <name>maxObjectEntryCounts</name></member> + <member><type>uint32_t</type> <name>minSequenceCountBufferOffsetAlignment</name></member> + <member><type>uint32_t</type> <name>minSequenceIndexBufferOffsetAlignment</name></member> + <member><type>uint32_t</type> <name>minCommandsTokenBufferOffsetAlignment</name></member> + </type> + <type category="struct" name="VkIndirectCommandsTokenNVX"> + <member><type>VkIndirectCommandsTokenTypeNVX</type> <name>tokenType</name></member> + <member><type>VkBuffer</type> <name>buffer</name></member> <!-- buffer containing tableEntries and additional data for indirectCommands --> + <member><type>VkDeviceSize</type> <name>offset</name></member> <!-- offset from the base address of the buffer --> + </type> + <type category="struct" name="VkIndirectCommandsLayoutTokenNVX"> + <member><type>VkIndirectCommandsTokenTypeNVX</type> <name>tokenType</name></member> + <member><type>uint32_t</type> <name>bindingUnit</name></member> <!-- Binding unit for vertex attribute / descriptor set, offset for pushconstants --> + <member><type>uint32_t</type> <name>dynamicCount</name></member> <!-- Number of variable dynamic values for descriptor set / push constants --> + <member><type>uint32_t</type> <name>divisor</name></member> <!-- Rate the which the array is advanced per element (must be power of 2, minimum 1) --> + </type> + <type category="struct" name="VkIndirectCommandsLayoutCreateInfoNVX"> + <member values="VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> + <member><type>VkPipelineBindPoint</type> <name>pipelineBindPoint</name></member> + <member><type>VkIndirectCommandsLayoutUsageFlagsNVX</type> <name>flags</name></member> + <member><type>uint32_t</type> <name>tokenCount</name></member> + <member len="tokenCount">const <type>VkIndirectCommandsLayoutTokenNVX</type>* <name>pTokens</name></member> + </type> + <type category="struct" name="VkCmdProcessCommandsInfoNVX"> + <member values="VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> + <member externsync="true"><type>VkObjectTableNVX</type> <name>objectTable</name></member> + <member><type>VkIndirectCommandsLayoutNVX</type> <name>indirectCommandsLayout</name></member> + <member><type>uint32_t</type> <name>indirectCommandsTokenCount</name></member> + <member len="indirectCommandsTokenCount">const <type>VkIndirectCommandsTokenNVX</type>* <name>pIndirectCommandsTokens</name></member> + <member><type>uint32_t</type> <name>maxSequencesCount</name></member> + <member optional="true" externsync="true"><type>VkCommandBuffer</type> <name>targetCommandBuffer</name></member> + <member optional="true"><type>VkBuffer</type> <name>sequencesCountBuffer</name></member> + <member optional="true"><type>VkDeviceSize</type> <name>sequencesCountOffset</name></member> + <member optional="true"><type>VkBuffer</type> <name>sequencesIndexBuffer</name></member> + <member optional="true"><type>VkDeviceSize</type> <name>sequencesIndexOffset</name></member> + </type> + <type category="struct" name="VkCmdReserveSpaceForCommandsInfoNVX"> + <member values="VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> + <member externsync="true"><type>VkObjectTableNVX</type> <name>objectTable</name></member> + <member><type>VkIndirectCommandsLayoutNVX</type> <name>indirectCommandsLayout</name></member> + <member><type>uint32_t</type> <name>maxSequencesCount</name></member> + </type> + <type category="struct" name="VkObjectTableCreateInfoNVX"> + <member values="VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> + <member><type>uint32_t</type> <name>objectCount</name></member> + <member len="objectCount">const <type>VkObjectEntryTypeNVX</type>* <name>pObjectEntryTypes</name></member> + <member len="objectCount">const <type>uint32_t</type>* <name>pObjectEntryCounts</name></member> + <member len="objectCount">const <type>VkObjectEntryUsageFlagsNVX</type>* <name>pObjectEntryUsageFlags</name></member> + + <member><type>uint32_t</type> <name>maxUniformBuffersPerDescriptor</name></member> + <member><type>uint32_t</type> <name>maxStorageBuffersPerDescriptor</name></member> + <member><type>uint32_t</type> <name>maxStorageImagesPerDescriptor</name></member> + <member><type>uint32_t</type> <name>maxSampledImagesPerDescriptor</name></member> + <member><type>uint32_t</type> <name>maxPipelineLayouts</name></member> + </type> + <type category="struct" name="VkObjectTableEntryNVX"> + <member><type>VkObjectEntryTypeNVX</type> <name>type</name></member> + <member><type>VkObjectEntryUsageFlagsNVX</type> <name>flags</name></member> + </type> + <type category="struct" name="VkObjectTablePipelineEntryNVX"> + <member><type>VkObjectEntryTypeNVX</type> <name>type</name></member> + <member><type>VkObjectEntryUsageFlagsNVX</type> <name>flags</name></member> + <member><type>VkPipeline</type> <name>pipeline</name></member> + </type> + <type category="struct" name="VkObjectTableDescriptorSetEntryNVX"> + <member><type>VkObjectEntryTypeNVX</type> <name>type</name></member> + <member><type>VkObjectEntryUsageFlagsNVX</type> <name>flags</name></member> + <member><type>VkPipelineLayout</type> <name>pipelineLayout</name></member> + <member><type>VkDescriptorSet</type> <name>descriptorSet</name></member> + </type> + <type category="struct" name="VkObjectTableVertexBufferEntryNVX"> + <member><type>VkObjectEntryTypeNVX</type> <name>type</name></member> + <member><type>VkObjectEntryUsageFlagsNVX</type> <name>flags</name></member> + <member><type>VkBuffer</type> <name>buffer</name></member> + </type> + <type category="struct" name="VkObjectTableIndexBufferEntryNVX"> + <member><type>VkObjectEntryTypeNVX</type> <name>type</name></member> + <member><type>VkObjectEntryUsageFlagsNVX</type> <name>flags</name></member> + <member><type>VkBuffer</type> <name>buffer</name></member> + <member><type>VkIndexType</type> <name>indexType</name></member> + </type> + <type category="struct" name="VkObjectTablePushConstantEntryNVX"> + <member><type>VkObjectEntryTypeNVX</type> <name>type</name></member> + <member><type>VkObjectEntryUsageFlagsNVX</type> <name>flags</name></member> + <member><type>VkPipelineLayout</type> <name>pipelineLayout</name></member> + <member><type>VkShaderStageFlags</type> <name>stageFlags</name></member> + </type> + <type category="struct" name="VkPhysicalDeviceFeatures2KHR"> + <member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR"><type>VkStructureType</type> <name>sType</name></member> + <member><type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member><type>VkPhysicalDeviceFeatures</type> <name>features</name></member> + </type> + <type category="struct" name="VkPhysicalDeviceProperties2KHR" returnedonly="true"> + <member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR"><type>VkStructureType</type> <name>sType</name></member> + <member><type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member><type>VkPhysicalDeviceProperties</type> <name>properties</name></member> + </type> + <type category="struct" name="VkFormatProperties2KHR" returnedonly="true"> + <member values="VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR"><type>VkStructureType</type> <name>sType</name></member> + <member><type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member><type>VkFormatProperties</type> <name>formatProperties</name></member> + </type> + <type category="struct" name="VkImageFormatProperties2KHR" returnedonly="true"> + <member values="VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR"><type>VkStructureType</type> <name>sType</name></member> + <member><type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member><type>VkImageFormatProperties</type> <name>imageFormatProperties</name></member> + </type> + <type category="struct" name="VkPhysicalDeviceImageFormatInfo2KHR"> + <member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member><type>VkFormat</type> <name>format</name></member> + <member><type>VkImageType</type> <name>type</name></member> + <member><type>VkImageTiling</type> <name>tiling</name></member> + <member><type>VkImageUsageFlags</type> <name>usage</name></member> + <member optional="true"><type>VkImageCreateFlags</type> <name>flags</name></member> + </type> + <type category="struct" name="VkQueueFamilyProperties2KHR" returnedonly="true"> + <member values="VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR"><type>VkStructureType</type> <name>sType</name></member> + <member><type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member><type>VkQueueFamilyProperties</type> <name>queueFamilyProperties</name></member> + </type> + <type category="struct" name="VkPhysicalDeviceMemoryProperties2KHR" returnedonly="true"> + <member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR"><type>VkStructureType</type> <name>sType</name></member> + <member><type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member><type>VkPhysicalDeviceMemoryProperties</type> <name>memoryProperties</name></member> + </type> + <type category="struct" name="VkSparseImageFormatProperties2KHR" returnedonly="true"> + <member values="VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR"><type>VkStructureType</type> <name>sType</name></member> + <member><type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member><type>VkSparseImageFormatProperties</type> <name>properties</name></member> + </type> + <type category="struct" name="VkPhysicalDeviceSparseImageFormatInfo2KHR"> + <member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member><type>VkFormat</type> <name>format</name></member> + <member><type>VkImageType</type> <name>type</name></member> + <member><type>VkSampleCountFlagBits</type> <name>samples</name></member> + <member><type>VkImageUsageFlags</type> <name>usage</name></member> + <member><type>VkImageTiling</type> <name>tiling</name></member> + </type> + <type category="struct" name="VkSurfaceCapabilities2EXT" returnedonly="true"> + <member values="VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT"><type>VkStructureType</type> <name>sType</name></member> + <member><type>void</type>* <name>pNext</name></member> + <member><type>uint32_t</type> <name>minImageCount</name></member> <!-- Supported minimum number of images for the surface --> + <member><type>uint32_t</type> <name>maxImageCount</name></member> <!-- Supported maximum number of images for the surface, 0 for unlimited --> + <member><type>VkExtent2D</type> <name>currentExtent</name></member> <!-- Current image width and height for the surface, (0, 0) if undefined --> + <member><type>VkExtent2D</type> <name>minImageExtent</name></member> <!-- Supported minimum image width and height for the surface --> + <member><type>VkExtent2D</type> <name>maxImageExtent</name></member> <!-- Supported maximum image width and height for the surface --> + <member><type>uint32_t</type> <name>maxImageArrayLayers</name></member> <!-- Supported maximum number of image layers for the surface --> + <member optional="true"><type>VkSurfaceTransformFlagsKHR</type> <name>supportedTransforms</name></member> <!-- 1 or more bits representing the transforms supported --> + <member><type>VkSurfaceTransformFlagBitsKHR</type> <name>currentTransform</name></member> <!-- The surface's current transform relative to the device's natural orientation --> + <member optional="true"><type>VkCompositeAlphaFlagsKHR</type> <name>supportedCompositeAlpha</name></member> <!-- 1 or more bits representing the alpha compositing modes supported --> + <member optional="true"><type>VkImageUsageFlags</type> <name>supportedUsageFlags</name></member> <!-- Supported image usage flags for the surface --> + <member optional="true"><type>VkSurfaceCounterFlagsEXT</type> <name>supportedSurfaceCounters</name></member> + </type> + <type category="struct" name="VkDisplayPowerInfoEXT"> + <member values="VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> + <member><type>VkDisplayPowerStateEXT</type> <name>powerState</name></member> + </type> + <type category="struct" name="VkDeviceEventInfoEXT"> + <member values="VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> + <member><type>VkDeviceEventTypeEXT</type> <name>deviceEvent</name></member> + </type> + <type category="struct" name="VkDisplayEventInfoEXT"> + <member values="VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> + <member><type>VkDisplayEventTypeEXT</type> <name>displayEvent</name></member> + </type> + <type category="struct" name="VkSwapchainCounterCreateInfoEXT"> + <member values="VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member> + <member>const <type>void</type>* <name>pNext</name></member> + <member optional="true"><type>VkSurfaceCounterFlagsEXT</type> <name>surfaceCounters</name></member> + </type> + </types> + + <!-- SECTION: Vulkan enumerant (token) definitions. --> + + <enums name="API Constants" comment="Misc. hardcoded constants - not an enumerated type"> + <!-- This is part of the header boilerplate --> + <enum value="256" name="VK_MAX_PHYSICAL_DEVICE_NAME_SIZE"/> + <enum value="16" name="VK_UUID_SIZE"/> + <enum value="256" name="VK_MAX_EXTENSION_NAME_SIZE"/> + <enum value="256" name="VK_MAX_DESCRIPTION_SIZE"/> + <enum value="32" name="VK_MAX_MEMORY_TYPES"/> + <enum value="16" name="VK_MAX_MEMORY_HEAPS"/> <!-- The maximum number of unique memory heaps, each of which supporting 1 or more memory types. --> + <enum value="1000.0f" name="VK_LOD_CLAMP_NONE"/> + <enum value="(~0U)" name="VK_REMAINING_MIP_LEVELS"/> + <enum value="(~0U)" name="VK_REMAINING_ARRAY_LAYERS"/> + <enum value="(~0ULL)" name="VK_WHOLE_SIZE"/> + <enum value="(~0U)" name="VK_ATTACHMENT_UNUSED"/> + <enum value="1" name="VK_TRUE"/> + <enum value="0" name="VK_FALSE"/> + <enum value="(~0U)" name="VK_QUEUE_FAMILY_IGNORED"/> + <enum value="(~0U)" name="VK_SUBPASS_EXTERNAL"/> + </enums> + + <!-- Unlike OpenGL, most tokens in Vulkan are actual typed enumerants in + their own numeric namespaces. The "name" attribute is the C enum + type name, and is pulled in from a <type> definition above + (slightly clunky, but retains the type / enum distinction). "type" + attributes of "enum" or "bitmask" indicate that these values should + be generated inside an appropriate definition. --> + + <enums name="VkImageLayout" type="enum"> + <enum value="0" name="VK_IMAGE_LAYOUT_UNDEFINED" comment="Implicit layout an image is when its contents are undefined due to various reasons (e.g. right after creation)"/> + <enum value="1" name="VK_IMAGE_LAYOUT_GENERAL" comment="General layout when image can be used for any kind of access"/> + <enum value="2" name="VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL" comment="Optimal layout when image is only used for color attachment read/write"/> + <enum value="3" name="VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL" comment="Optimal layout when image is only used for depth/stencil attachment read/write"/> + <enum value="4" name="VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL" comment="Optimal layout when image is used for read only depth/stencil attachment and shader access"/> + <enum value="5" name="VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL" comment="Optimal layout when image is used for read only shader access"/> + <enum value="6" name="VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL" comment="Optimal layout when image is used only as source of transfer operations"/> + <enum value="7" name="VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL" comment="Optimal layout when image is used only as destination of transfer operations"/> + <enum value="8" name="VK_IMAGE_LAYOUT_PREINITIALIZED" comment="Initial layout used when the data is populated by the CPU"/> + </enums> + <enums name="VkAttachmentLoadOp" type="enum"> + <enum value="0" name="VK_ATTACHMENT_LOAD_OP_LOAD"/> + <enum value="1" name="VK_ATTACHMENT_LOAD_OP_CLEAR"/> + <enum value="2" name="VK_ATTACHMENT_LOAD_OP_DONT_CARE"/> + </enums> + <enums name="VkAttachmentStoreOp" type="enum"> + <enum value="0" name="VK_ATTACHMENT_STORE_OP_STORE"/> + <enum value="1" name="VK_ATTACHMENT_STORE_OP_DONT_CARE"/> + </enums> + <enums name="VkImageType" type="enum"> + <enum value="0" name="VK_IMAGE_TYPE_1D"/> + <enum value="1" name="VK_IMAGE_TYPE_2D"/> + <enum value="2" name="VK_IMAGE_TYPE_3D"/> + </enums> + <enums name="VkImageTiling" type="enum"> + <enum value="0" name="VK_IMAGE_TILING_OPTIMAL"/> + <enum value="1" name="VK_IMAGE_TILING_LINEAR"/> + </enums> + <enums name="VkImageViewType" type="enum"> + <enum value="0" name="VK_IMAGE_VIEW_TYPE_1D"/> + <enum value="1" name="VK_IMAGE_VIEW_TYPE_2D"/> + <enum value="2" name="VK_IMAGE_VIEW_TYPE_3D"/> + <enum value="3" name="VK_IMAGE_VIEW_TYPE_CUBE"/> + <enum value="4" name="VK_IMAGE_VIEW_TYPE_1D_ARRAY"/> + <enum value="5" name="VK_IMAGE_VIEW_TYPE_2D_ARRAY"/> + <enum value="6" name="VK_IMAGE_VIEW_TYPE_CUBE_ARRAY"/> + </enums> + <enums name="VkCommandBufferLevel" type="enum"> + <enum value="0" name="VK_COMMAND_BUFFER_LEVEL_PRIMARY"/> + <enum value="1" name="VK_COMMAND_BUFFER_LEVEL_SECONDARY"/> + </enums> + <enums name="VkComponentSwizzle" type="enum"> + <enum value="0" name="VK_COMPONENT_SWIZZLE_IDENTITY"/> + <enum value="1" name="VK_COMPONENT_SWIZZLE_ZERO"/> + <enum value="2" name="VK_COMPONENT_SWIZZLE_ONE"/> + <enum value="3" name="VK_COMPONENT_SWIZZLE_R"/> + <enum value="4" name="VK_COMPONENT_SWIZZLE_G"/> + <enum value="5" name="VK_COMPONENT_SWIZZLE_B"/> + <enum value="6" name="VK_COMPONENT_SWIZZLE_A"/> + </enums> + <enums name="VkDescriptorType" type="enum"> + <enum value="0" name="VK_DESCRIPTOR_TYPE_SAMPLER"/> + <enum value="1" name="VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER"/> + <enum value="2" name="VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE"/> + <enum value="3" name="VK_DESCRIPTOR_TYPE_STORAGE_IMAGE"/> + <enum value="4" name="VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER"/> + <enum value="5" name="VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER"/> + <enum value="6" name="VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER"/> + <enum value="7" name="VK_DESCRIPTOR_TYPE_STORAGE_BUFFER"/> + <enum value="8" name="VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC"/> + <enum value="9" name="VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC"/> + <enum value="10" name="VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT"/> + </enums> + <enums name="VkQueryType" type="enum"> + <enum value="0" name="VK_QUERY_TYPE_OCCLUSION"/> + <enum value="1" name="VK_QUERY_TYPE_PIPELINE_STATISTICS" comment="Optional"/> + <enum value="2" name="VK_QUERY_TYPE_TIMESTAMP"/> + </enums> + <enums name="VkBorderColor" type="enum"> + <enum value="0" name="VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK"/> + <enum value="1" name="VK_BORDER_COLOR_INT_TRANSPARENT_BLACK"/> + <enum value="2" name="VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK"/> + <enum value="3" name="VK_BORDER_COLOR_INT_OPAQUE_BLACK"/> + <enum value="4" name="VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE"/> + <enum value="5" name="VK_BORDER_COLOR_INT_OPAQUE_WHITE"/> + </enums> + <enums name="VkPipelineBindPoint" type="enum"> + <enum value="0" name="VK_PIPELINE_BIND_POINT_GRAPHICS"/> + <enum value="1" name="VK_PIPELINE_BIND_POINT_COMPUTE"/> + </enums> + <enums name="VkPipelineCacheHeaderVersion" type="enum"> + <enum value="1" name="VK_PIPELINE_CACHE_HEADER_VERSION_ONE"/> + </enums> + <enums name="VkPrimitiveTopology" type="enum"> + <enum value="0" name="VK_PRIMITIVE_TOPOLOGY_POINT_LIST"/> + <enum value="1" name="VK_PRIMITIVE_TOPOLOGY_LINE_LIST"/> + <enum value="2" name="VK_PRIMITIVE_TOPOLOGY_LINE_STRIP"/> + <enum value="3" name="VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST"/> + <enum value="4" name="VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP"/> + <enum value="5" name="VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN"/> + <enum value="6" name="VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY"/> + <enum value="7" name="VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY"/> + <enum value="8" name="VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY"/> + <enum value="9" name="VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY"/> + <enum value="10" name="VK_PRIMITIVE_TOPOLOGY_PATCH_LIST"/> + </enums> + <enums name="VkSharingMode" type="enum"> + <enum value="0" name="VK_SHARING_MODE_EXCLUSIVE"/> + <enum value="1" name="VK_SHARING_MODE_CONCURRENT"/> + </enums> + <enums name="VkIndexType" type="enum"> + <enum value="0" name="VK_INDEX_TYPE_UINT16"/> + <enum value="1" name="VK_INDEX_TYPE_UINT32"/> + </enums> + <enums name="VkFilter" type="enum"> + <enum value="0" name="VK_FILTER_NEAREST"/> + <enum value="1" name="VK_FILTER_LINEAR"/> + </enums> + <enums name="VkSamplerMipmapMode" type="enum"> + <enum value="0" name="VK_SAMPLER_MIPMAP_MODE_NEAREST" comment="Choose nearest mip level"/> + <enum value="1" name="VK_SAMPLER_MIPMAP_MODE_LINEAR" comment="Linear filter between mip levels"/> + </enums> + <enums name="VkSamplerAddressMode" type="enum"> + <enum value="0" name="VK_SAMPLER_ADDRESS_MODE_REPEAT"/> + <enum value="1" name="VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT"/> + <enum value="2" name="VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE"/> + <enum value="3" name="VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER"/> + <!-- <enum value="4" name="VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE" comment="Reserved for VK_KHR_sampler_mirror_clamp_to_edge, do not alias!"/> --> + </enums> + <enums name="VkCompareOp" type="enum"> + <enum value="0" name="VK_COMPARE_OP_NEVER"/> + <enum value="1" name="VK_COMPARE_OP_LESS"/> + <enum value="2" name="VK_COMPARE_OP_EQUAL"/> + <enum value="3" name="VK_COMPARE_OP_LESS_OR_EQUAL"/> + <enum value="4" name="VK_COMPARE_OP_GREATER"/> + <enum value="5" name="VK_COMPARE_OP_NOT_EQUAL"/> + <enum value="6" name="VK_COMPARE_OP_GREATER_OR_EQUAL"/> + <enum value="7" name="VK_COMPARE_OP_ALWAYS"/> + </enums> + <enums name="VkPolygonMode" type="enum"> + <enum value="0" name="VK_POLYGON_MODE_FILL"/> + <enum value="1" name="VK_POLYGON_MODE_LINE"/> + <enum value="2" name="VK_POLYGON_MODE_POINT"/> + </enums> + <enums name="VkCullModeFlagBits" type="bitmask"> + <enum value="0" name="VK_CULL_MODE_NONE"/> + <enum bitpos="0" name="VK_CULL_MODE_FRONT_BIT"/> + <enum bitpos="1" name="VK_CULL_MODE_BACK_BIT"/> + <enum value="0x00000003" name="VK_CULL_MODE_FRONT_AND_BACK"/> + </enums> + <enums name="VkFrontFace" type="enum"> + <enum value="0" name="VK_FRONT_FACE_COUNTER_CLOCKWISE"/> + <enum value="1" name="VK_FRONT_FACE_CLOCKWISE"/> + </enums> + <enums name="VkBlendFactor" type="enum"> + <enum value="0" name="VK_BLEND_FACTOR_ZERO"/> + <enum value="1" name="VK_BLEND_FACTOR_ONE"/> + <enum value="2" name="VK_BLEND_FACTOR_SRC_COLOR"/> + <enum value="3" name="VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR"/> + <enum value="4" name="VK_BLEND_FACTOR_DST_COLOR"/> + <enum value="5" name="VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR"/> + <enum value="6" name="VK_BLEND_FACTOR_SRC_ALPHA"/> + <enum value="7" name="VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA"/> + <enum value="8" name="VK_BLEND_FACTOR_DST_ALPHA"/> + <enum value="9" name="VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA"/> + <enum value="10" name="VK_BLEND_FACTOR_CONSTANT_COLOR"/> + <enum value="11" name="VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR"/> + <enum value="12" name="VK_BLEND_FACTOR_CONSTANT_ALPHA"/> + <enum value="13" name="VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA"/> + <enum value="14" name="VK_BLEND_FACTOR_SRC_ALPHA_SATURATE"/> + <enum value="15" name="VK_BLEND_FACTOR_SRC1_COLOR"/> + <enum value="16" name="VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR"/> + <enum value="17" name="VK_BLEND_FACTOR_SRC1_ALPHA"/> + <enum value="18" name="VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA"/> + </enums> + <enums name="VkBlendOp" type="enum"> + <enum value="0" name="VK_BLEND_OP_ADD"/> + <enum value="1" name="VK_BLEND_OP_SUBTRACT"/> + <enum value="2" name="VK_BLEND_OP_REVERSE_SUBTRACT"/> + <enum value="3" name="VK_BLEND_OP_MIN"/> + <enum value="4" name="VK_BLEND_OP_MAX"/> + </enums> + <enums name="VkStencilOp" type="enum"> + <enum value="0" name="VK_STENCIL_OP_KEEP"/> + <enum value="1" name="VK_STENCIL_OP_ZERO"/> + <enum value="2" name="VK_STENCIL_OP_REPLACE"/> + <enum value="3" name="VK_STENCIL_OP_INCREMENT_AND_CLAMP"/> + <enum value="4" name="VK_STENCIL_OP_DECREMENT_AND_CLAMP"/> + <enum value="5" name="VK_STENCIL_OP_INVERT"/> + <enum value="6" name="VK_STENCIL_OP_INCREMENT_AND_WRAP"/> + <enum value="7" name="VK_STENCIL_OP_DECREMENT_AND_WRAP"/> + </enums> + <enums name="VkLogicOp" type="enum"> + <enum value="0" name="VK_LOGIC_OP_CLEAR"/> + <enum value="1" name="VK_LOGIC_OP_AND"/> + <enum value="2" name="VK_LOGIC_OP_AND_REVERSE"/> + <enum value="3" name="VK_LOGIC_OP_COPY"/> + <enum value="4" name="VK_LOGIC_OP_AND_INVERTED"/> + <enum value="5" name="VK_LOGIC_OP_NO_OP"/> + <enum value="6" name="VK_LOGIC_OP_XOR"/> + <enum value="7" name="VK_LOGIC_OP_OR"/> + <enum value="8" name="VK_LOGIC_OP_NOR"/> + <enum value="9" name="VK_LOGIC_OP_EQUIVALENT"/> + <enum value="10" name="VK_LOGIC_OP_INVERT"/> + <enum value="11" name="VK_LOGIC_OP_OR_REVERSE"/> + <enum value="12" name="VK_LOGIC_OP_COPY_INVERTED"/> + <enum value="13" name="VK_LOGIC_OP_OR_INVERTED"/> + <enum value="14" name="VK_LOGIC_OP_NAND"/> + <enum value="15" name="VK_LOGIC_OP_SET"/> + </enums> + <enums name="VkInternalAllocationType" type="enum"> + <enum value="0" name="VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE"/> + </enums> + <enums name="VkSystemAllocationScope" type="enum"> + <enum value="0" name="VK_SYSTEM_ALLOCATION_SCOPE_COMMAND"/> + <enum value="1" name="VK_SYSTEM_ALLOCATION_SCOPE_OBJECT"/> + <enum value="2" name="VK_SYSTEM_ALLOCATION_SCOPE_CACHE"/> + <enum value="3" name="VK_SYSTEM_ALLOCATION_SCOPE_DEVICE"/> + <enum value="4" name="VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE"/> + </enums> + <enums name="VkPhysicalDeviceType" type="enum"> + <enum value="0" name="VK_PHYSICAL_DEVICE_TYPE_OTHER"/> + <enum value="1" name="VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU"/> + <enum value="2" name="VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU"/> + <enum value="3" name="VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU"/> + <enum value="4" name="VK_PHYSICAL_DEVICE_TYPE_CPU"/> + </enums> + <enums name="VkVertexInputRate" type="enum"> + <enum value="0" name="VK_VERTEX_INPUT_RATE_VERTEX"/> + <enum value="1" name="VK_VERTEX_INPUT_RATE_INSTANCE"/> + </enums> + <enums name="VkFormat" type="enum" comment="Vulkan format definitions"> + <enum value="0" name="VK_FORMAT_UNDEFINED"/> + <enum value="1" name="VK_FORMAT_R4G4_UNORM_PACK8"/> + <enum value="2" name="VK_FORMAT_R4G4B4A4_UNORM_PACK16"/> + <enum value="3" name="VK_FORMAT_B4G4R4A4_UNORM_PACK16"/> + <enum value="4" name="VK_FORMAT_R5G6B5_UNORM_PACK16"/> + <enum value="5" name="VK_FORMAT_B5G6R5_UNORM_PACK16"/> + <enum value="6" name="VK_FORMAT_R5G5B5A1_UNORM_PACK16"/> + <enum value="7" name="VK_FORMAT_B5G5R5A1_UNORM_PACK16"/> + <enum value="8" name="VK_FORMAT_A1R5G5B5_UNORM_PACK16"/> + <enum value="9" name="VK_FORMAT_R8_UNORM"/> + <enum value="10" name="VK_FORMAT_R8_SNORM"/> + <enum value="11" name="VK_FORMAT_R8_USCALED"/> + <enum value="12" name="VK_FORMAT_R8_SSCALED"/> + <enum value="13" name="VK_FORMAT_R8_UINT"/> + <enum value="14" name="VK_FORMAT_R8_SINT"/> + <enum value="15" name="VK_FORMAT_R8_SRGB"/> + <enum value="16" name="VK_FORMAT_R8G8_UNORM"/> + <enum value="17" name="VK_FORMAT_R8G8_SNORM"/> + <enum value="18" name="VK_FORMAT_R8G8_USCALED"/> + <enum value="19" name="VK_FORMAT_R8G8_SSCALED"/> + <enum value="20" name="VK_FORMAT_R8G8_UINT"/> + <enum value="21" name="VK_FORMAT_R8G8_SINT"/> + <enum value="22" name="VK_FORMAT_R8G8_SRGB"/> + <enum value="23" name="VK_FORMAT_R8G8B8_UNORM"/> + <enum value="24" name="VK_FORMAT_R8G8B8_SNORM"/> + <enum value="25" name="VK_FORMAT_R8G8B8_USCALED"/> + <enum value="26" name="VK_FORMAT_R8G8B8_SSCALED"/> + <enum value="27" name="VK_FORMAT_R8G8B8_UINT"/> + <enum value="28" name="VK_FORMAT_R8G8B8_SINT"/> + <enum value="29" name="VK_FORMAT_R8G8B8_SRGB"/> + <enum value="30" name="VK_FORMAT_B8G8R8_UNORM"/> + <enum value="31" name="VK_FORMAT_B8G8R8_SNORM"/> + <enum value="32" name="VK_FORMAT_B8G8R8_USCALED"/> + <enum value="33" name="VK_FORMAT_B8G8R8_SSCALED"/> + <enum value="34" name="VK_FORMAT_B8G8R8_UINT"/> + <enum value="35" name="VK_FORMAT_B8G8R8_SINT"/> + <enum value="36" name="VK_FORMAT_B8G8R8_SRGB"/> + <enum value="37" name="VK_FORMAT_R8G8B8A8_UNORM"/> + <enum value="38" name="VK_FORMAT_R8G8B8A8_SNORM"/> + <enum value="39" name="VK_FORMAT_R8G8B8A8_USCALED"/> + <enum value="40" name="VK_FORMAT_R8G8B8A8_SSCALED"/> + <enum value="41" name="VK_FORMAT_R8G8B8A8_UINT"/> + <enum value="42" name="VK_FORMAT_R8G8B8A8_SINT"/> + <enum value="43" name="VK_FORMAT_R8G8B8A8_SRGB"/> + <enum value="44" name="VK_FORMAT_B8G8R8A8_UNORM"/> + <enum value="45" name="VK_FORMAT_B8G8R8A8_SNORM"/> + <enum value="46" name="VK_FORMAT_B8G8R8A8_USCALED"/> + <enum value="47" name="VK_FORMAT_B8G8R8A8_SSCALED"/> + <enum value="48" name="VK_FORMAT_B8G8R8A8_UINT"/> + <enum value="49" name="VK_FORMAT_B8G8R8A8_SINT"/> + <enum value="50" name="VK_FORMAT_B8G8R8A8_SRGB"/> + <enum value="51" name="VK_FORMAT_A8B8G8R8_UNORM_PACK32"/> + <enum value="52" name="VK_FORMAT_A8B8G8R8_SNORM_PACK32"/> + <enum value="53" name="VK_FORMAT_A8B8G8R8_USCALED_PACK32"/> + <enum value="54" name="VK_FORMAT_A8B8G8R8_SSCALED_PACK32"/> + <enum value="55" name="VK_FORMAT_A8B8G8R8_UINT_PACK32"/> + <enum value="56" name="VK_FORMAT_A8B8G8R8_SINT_PACK32"/> + <enum value="57" name="VK_FORMAT_A8B8G8R8_SRGB_PACK32"/> + <enum value="58" name="VK_FORMAT_A2R10G10B10_UNORM_PACK32"/> + <enum value="59" name="VK_FORMAT_A2R10G10B10_SNORM_PACK32"/> + <enum value="60" name="VK_FORMAT_A2R10G10B10_USCALED_PACK32"/> + <enum value="61" name="VK_FORMAT_A2R10G10B10_SSCALED_PACK32"/> + <enum value="62" name="VK_FORMAT_A2R10G10B10_UINT_PACK32"/> + <enum value="63" name="VK_FORMAT_A2R10G10B10_SINT_PACK32"/> + <enum value="64" name="VK_FORMAT_A2B10G10R10_UNORM_PACK32"/> + <enum value="65" name="VK_FORMAT_A2B10G10R10_SNORM_PACK32"/> + <enum value="66" name="VK_FORMAT_A2B10G10R10_USCALED_PACK32"/> + <enum value="67" name="VK_FORMAT_A2B10G10R10_SSCALED_PACK32"/> + <enum value="68" name="VK_FORMAT_A2B10G10R10_UINT_PACK32"/> + <enum value="69" name="VK_FORMAT_A2B10G10R10_SINT_PACK32"/> + <enum value="70" name="VK_FORMAT_R16_UNORM"/> + <enum value="71" name="VK_FORMAT_R16_SNORM"/> + <enum value="72" name="VK_FORMAT_R16_USCALED"/> + <enum value="73" name="VK_FORMAT_R16_SSCALED"/> + <enum value="74" name="VK_FORMAT_R16_UINT"/> + <enum value="75" name="VK_FORMAT_R16_SINT"/> + <enum value="76" name="VK_FORMAT_R16_SFLOAT"/> + <enum value="77" name="VK_FORMAT_R16G16_UNORM"/> + <enum value="78" name="VK_FORMAT_R16G16_SNORM"/> + <enum value="79" name="VK_FORMAT_R16G16_USCALED"/> + <enum value="80" name="VK_FORMAT_R16G16_SSCALED"/> + <enum value="81" name="VK_FORMAT_R16G16_UINT"/> + <enum value="82" name="VK_FORMAT_R16G16_SINT"/> + <enum value="83" name="VK_FORMAT_R16G16_SFLOAT"/> + <enum value="84" name="VK_FORMAT_R16G16B16_UNORM"/> + <enum value="85" name="VK_FORMAT_R16G16B16_SNORM"/> + <enum value="86" name="VK_FORMAT_R16G16B16_USCALED"/> + <enum value="87" name="VK_FORMAT_R16G16B16_SSCALED"/> + <enum value="88" name="VK_FORMAT_R16G16B16_UINT"/> + <enum value="89" name="VK_FORMAT_R16G16B16_SINT"/> + <enum value="90" name="VK_FORMAT_R16G16B16_SFLOAT"/> + <enum value="91" name="VK_FORMAT_R16G16B16A16_UNORM"/> + <enum value="92" name="VK_FORMAT_R16G16B16A16_SNORM"/> + <enum value="93" name="VK_FORMAT_R16G16B16A16_USCALED"/> + <enum value="94" name="VK_FORMAT_R16G16B16A16_SSCALED"/> + <enum value="95" name="VK_FORMAT_R16G16B16A16_UINT"/> + <enum value="96" name="VK_FORMAT_R16G16B16A16_SINT"/> + <enum value="97" name="VK_FORMAT_R16G16B16A16_SFLOAT"/> + <enum value="98" name="VK_FORMAT_R32_UINT"/> + <enum value="99" name="VK_FORMAT_R32_SINT"/> + <enum value="100" name="VK_FORMAT_R32_SFLOAT"/> + <enum value="101" name="VK_FORMAT_R32G32_UINT"/> + <enum value="102" name="VK_FORMAT_R32G32_SINT"/> + <enum value="103" name="VK_FORMAT_R32G32_SFLOAT"/> + <enum value="104" name="VK_FORMAT_R32G32B32_UINT"/> + <enum value="105" name="VK_FORMAT_R32G32B32_SINT"/> + <enum value="106" name="VK_FORMAT_R32G32B32_SFLOAT"/> + <enum value="107" name="VK_FORMAT_R32G32B32A32_UINT"/> + <enum value="108" name="VK_FORMAT_R32G32B32A32_SINT"/> + <enum value="109" name="VK_FORMAT_R32G32B32A32_SFLOAT"/> + <enum value="110" name="VK_FORMAT_R64_UINT"/> + <enum value="111" name="VK_FORMAT_R64_SINT"/> + <enum value="112" name="VK_FORMAT_R64_SFLOAT"/> + <enum value="113" name="VK_FORMAT_R64G64_UINT"/> + <enum value="114" name="VK_FORMAT_R64G64_SINT"/> + <enum value="115" name="VK_FORMAT_R64G64_SFLOAT"/> + <enum value="116" name="VK_FORMAT_R64G64B64_UINT"/> + <enum value="117" name="VK_FORMAT_R64G64B64_SINT"/> + <enum value="118" name="VK_FORMAT_R64G64B64_SFLOAT"/> + <enum value="119" name="VK_FORMAT_R64G64B64A64_UINT"/> + <enum value="120" name="VK_FORMAT_R64G64B64A64_SINT"/> + <enum value="121" name="VK_FORMAT_R64G64B64A64_SFLOAT"/> + <enum value="122" name="VK_FORMAT_B10G11R11_UFLOAT_PACK32"/> + <enum value="123" name="VK_FORMAT_E5B9G9R9_UFLOAT_PACK32"/> + <enum value="124" name="VK_FORMAT_D16_UNORM"/> + <enum value="125" name="VK_FORMAT_X8_D24_UNORM_PACK32"/> + <enum value="126" name="VK_FORMAT_D32_SFLOAT"/> + <enum value="127" name="VK_FORMAT_S8_UINT"/> + <enum value="128" name="VK_FORMAT_D16_UNORM_S8_UINT"/> + <enum value="129" name="VK_FORMAT_D24_UNORM_S8_UINT"/> + <enum value="130" name="VK_FORMAT_D32_SFLOAT_S8_UINT"/> + <enum value="131" name="VK_FORMAT_BC1_RGB_UNORM_BLOCK"/> + <enum value="132" name="VK_FORMAT_BC1_RGB_SRGB_BLOCK"/> + <enum value="133" name="VK_FORMAT_BC1_RGBA_UNORM_BLOCK"/> + <enum value="134" name="VK_FORMAT_BC1_RGBA_SRGB_BLOCK"/> + <enum value="135" name="VK_FORMAT_BC2_UNORM_BLOCK"/> + <enum value="136" name="VK_FORMAT_BC2_SRGB_BLOCK"/> + <enum value="137" name="VK_FORMAT_BC3_UNORM_BLOCK"/> + <enum value="138" name="VK_FORMAT_BC3_SRGB_BLOCK"/> + <enum value="139" name="VK_FORMAT_BC4_UNORM_BLOCK"/> + <enum value="140" name="VK_FORMAT_BC4_SNORM_BLOCK"/> + <enum value="141" name="VK_FORMAT_BC5_UNORM_BLOCK"/> + <enum value="142" name="VK_FORMAT_BC5_SNORM_BLOCK"/> + <enum value="143" name="VK_FORMAT_BC6H_UFLOAT_BLOCK"/> + <enum value="144" name="VK_FORMAT_BC6H_SFLOAT_BLOCK"/> + <enum value="145" name="VK_FORMAT_BC7_UNORM_BLOCK"/> + <enum value="146" name="VK_FORMAT_BC7_SRGB_BLOCK"/> + <enum value="147" name="VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK"/> + <enum value="148" name="VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK"/> + <enum value="149" name="VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK"/> + <enum value="150" name="VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK"/> + <enum value="151" name="VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK"/> + <enum value="152" name="VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK"/> + <enum value="153" name="VK_FORMAT_EAC_R11_UNORM_BLOCK"/> + <enum value="154" name="VK_FORMAT_EAC_R11_SNORM_BLOCK"/> + <enum value="155" name="VK_FORMAT_EAC_R11G11_UNORM_BLOCK"/> + <enum value="156" name="VK_FORMAT_EAC_R11G11_SNORM_BLOCK"/> + <enum value="157" name="VK_FORMAT_ASTC_4x4_UNORM_BLOCK"/> + <enum value="158" name="VK_FORMAT_ASTC_4x4_SRGB_BLOCK"/> + <enum value="159" name="VK_FORMAT_ASTC_5x4_UNORM_BLOCK"/> + <enum value="160" name="VK_FORMAT_ASTC_5x4_SRGB_BLOCK"/> + <enum value="161" name="VK_FORMAT_ASTC_5x5_UNORM_BLOCK"/> + <enum value="162" name="VK_FORMAT_ASTC_5x5_SRGB_BLOCK"/> + <enum value="163" name="VK_FORMAT_ASTC_6x5_UNORM_BLOCK"/> + <enum value="164" name="VK_FORMAT_ASTC_6x5_SRGB_BLOCK"/> + <enum value="165" name="VK_FORMAT_ASTC_6x6_UNORM_BLOCK"/> + <enum value="166" name="VK_FORMAT_ASTC_6x6_SRGB_BLOCK"/> + <enum value="167" name="VK_FORMAT_ASTC_8x5_UNORM_BLOCK"/> + <enum value="168" name="VK_FORMAT_ASTC_8x5_SRGB_BLOCK"/> + <enum value="169" name="VK_FORMAT_ASTC_8x6_UNORM_BLOCK"/> + <enum value="170" name="VK_FORMAT_ASTC_8x6_SRGB_BLOCK"/> + <enum value="171" name="VK_FORMAT_ASTC_8x8_UNORM_BLOCK"/> + <enum value="172" name="VK_FORMAT_ASTC_8x8_SRGB_BLOCK"/> + <enum value="173" name="VK_FORMAT_ASTC_10x5_UNORM_BLOCK"/> + <enum value="174" name="VK_FORMAT_ASTC_10x5_SRGB_BLOCK"/> + <enum value="175" name="VK_FORMAT_ASTC_10x6_UNORM_BLOCK"/> + <enum value="176" name="VK_FORMAT_ASTC_10x6_SRGB_BLOCK"/> + <enum value="177" name="VK_FORMAT_ASTC_10x8_UNORM_BLOCK"/> + <enum value="178" name="VK_FORMAT_ASTC_10x8_SRGB_BLOCK"/> + <enum value="179" name="VK_FORMAT_ASTC_10x10_UNORM_BLOCK"/> + <enum value="180" name="VK_FORMAT_ASTC_10x10_SRGB_BLOCK"/> + <enum value="181" name="VK_FORMAT_ASTC_12x10_UNORM_BLOCK"/> + <enum value="182" name="VK_FORMAT_ASTC_12x10_SRGB_BLOCK"/> + <enum value="183" name="VK_FORMAT_ASTC_12x12_UNORM_BLOCK"/> + <enum value="184" name="VK_FORMAT_ASTC_12x12_SRGB_BLOCK"/> + </enums> + <enums name="VkStructureType" type="enum" comment="Structure type enumerant"> + <enum value="0" name="VK_STRUCTURE_TYPE_APPLICATION_INFO"/> + <enum value="1" name="VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO"/> + <enum value="2" name="VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO"/> + <enum value="3" name="VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO"/> + <enum value="4" name="VK_STRUCTURE_TYPE_SUBMIT_INFO"/> + <enum value="5" name="VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO"/> + <enum value="6" name="VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE"/> + <enum value="7" name="VK_STRUCTURE_TYPE_BIND_SPARSE_INFO"/> + <enum value="8" name="VK_STRUCTURE_TYPE_FENCE_CREATE_INFO"/> + <enum value="9" name="VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO"/> + <enum value="10" name="VK_STRUCTURE_TYPE_EVENT_CREATE_INFO"/> + <enum value="11" name="VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO"/> + <enum value="12" name="VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO"/> + <enum value="13" name="VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO"/> + <enum value="14" name="VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO"/> + <enum value="15" name="VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO"/> + <enum value="16" name="VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO"/> + <enum value="17" name="VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO"/> + <enum value="18" name="VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO"/> + <enum value="19" name="VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO"/> + <enum value="20" name="VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO"/> + <enum value="21" name="VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO"/> + <enum value="22" name="VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO"/> + <enum value="23" name="VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO"/> + <enum value="24" name="VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO"/> + <enum value="25" name="VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO"/> + <enum value="26" name="VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO"/> + <enum value="27" name="VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO"/> + <enum value="28" name="VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO"/> + <enum value="29" name="VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO"/> + <enum value="30" name="VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO"/> + <enum value="31" name="VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO"/> + <enum value="32" name="VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO"/> + <enum value="33" name="VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO"/> + <enum value="34" name="VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO"/> + <enum value="35" name="VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET"/> + <enum value="36" name="VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET"/> + <enum value="37" name="VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO"/> + <enum value="38" name="VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO"/> + <enum value="39" name="VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO"/> + <enum value="40" name="VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO"/> + <enum value="41" name="VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO"/> + <enum value="42" name="VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO"/> + <enum value="43" name="VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO"/> + <enum value="44" name="VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER"/> + <enum value="45" name="VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER"/> + <enum value="46" name="VK_STRUCTURE_TYPE_MEMORY_BARRIER"/> + <enum value="47" name="VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO"/> <!-- Reserved for internal use by the loader, layers, and ICDs --> + <enum value="48" name="VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO"/> <!-- Reserved for internal use by the loader, layers, and ICDs --> + </enums> + <enums name="VkSubpassContents" type="enum"> + <enum value="0" name="VK_SUBPASS_CONTENTS_INLINE"/> + <enum value="1" name="VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS"/> + </enums> + <enums name="VkResult" type="enum" comment="Error and return codes"> + <!-- Return codes for successful operation execution (positive values) --> + <enum value="0" name="VK_SUCCESS" comment="Command completed successfully"/> + <enum value="1" name="VK_NOT_READY" comment="A fence or query has not yet completed"/> + <enum value="2" name="VK_TIMEOUT" comment="A wait operation has not completed in the specified time"/> + <enum value="3" name="VK_EVENT_SET" comment="An event is signaled"/> + <enum value="4" name="VK_EVENT_RESET" comment="An event is unsignaled"/> + <enum value="5" name="VK_INCOMPLETE" comment="A return array was too small for the result"/> + <!-- Error codes (negative values) --> + <enum value="-1" name="VK_ERROR_OUT_OF_HOST_MEMORY" comment="A host memory allocation has failed"/> + <enum value="-2" name="VK_ERROR_OUT_OF_DEVICE_MEMORY" comment="A device memory allocation has failed"/> + <enum value="-3" name="VK_ERROR_INITIALIZATION_FAILED" comment="Initialization of a object has failed"/> + <enum value="-4" name="VK_ERROR_DEVICE_LOST" comment="The logical device has been lost. See <<devsandqueues-lost-device>>"/> + <enum value="-5" name="VK_ERROR_MEMORY_MAP_FAILED" comment="Mapping of a memory object has failed"/> + <enum value="-6" name="VK_ERROR_LAYER_NOT_PRESENT" comment="Layer specified does not exist"/> + <enum value="-7" name="VK_ERROR_EXTENSION_NOT_PRESENT" comment="Extension specified does not exist"/> + <enum value="-8" name="VK_ERROR_FEATURE_NOT_PRESENT" comment="Requested feature is not available on this device"/> + <enum value="-9" name="VK_ERROR_INCOMPATIBLE_DRIVER" comment="Unable to find a Vulkan driver"/> + <enum value="-10" name="VK_ERROR_TOO_MANY_OBJECTS" comment="Too many objects of the type have already been created"/> + <enum value="-11" name="VK_ERROR_FORMAT_NOT_SUPPORTED" comment="Requested format is not supported on this device"/> + <enum value="-12" name="VK_ERROR_FRAGMENTED_POOL" comment="A requested pool allocation has failed due to fragmentation of the pool's memory"/> + <unused start="-12"/> + </enums> + <enums name="VkDynamicState" type="enum"> + <enum value="0" name="VK_DYNAMIC_STATE_VIEWPORT"/> + <enum value="1" name="VK_DYNAMIC_STATE_SCISSOR"/> + <enum value="2" name="VK_DYNAMIC_STATE_LINE_WIDTH"/> + <enum value="3" name="VK_DYNAMIC_STATE_DEPTH_BIAS"/> + <enum value="4" name="VK_DYNAMIC_STATE_BLEND_CONSTANTS"/> + <enum value="5" name="VK_DYNAMIC_STATE_DEPTH_BOUNDS"/> + <enum value="6" name="VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK"/> + <enum value="7" name="VK_DYNAMIC_STATE_STENCIL_WRITE_MASK"/> + <enum value="8" name="VK_DYNAMIC_STATE_STENCIL_REFERENCE"/> + </enums> + + <!-- Flags --> + <enums name="VkQueueFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_QUEUE_GRAPHICS_BIT" comment="Queue supports graphics operations"/> + <enum bitpos="1" name="VK_QUEUE_COMPUTE_BIT" comment="Queue supports compute operations"/> + <enum bitpos="2" name="VK_QUEUE_TRANSFER_BIT" comment="Queue supports transfer operations"/> + <enum bitpos="3" name="VK_QUEUE_SPARSE_BINDING_BIT" comment="Queue supports sparse resource memory management operations"/> + </enums> + <enums name="VkMemoryPropertyFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT" comment="If otherwise stated, then allocate memory on device"/> + <enum bitpos="1" name="VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT" comment="Memory is mappable by host"/> + <enum bitpos="2" name="VK_MEMORY_PROPERTY_HOST_COHERENT_BIT" comment="Memory will have i/o coherency. If not set, application may need to use vkFlushMappedMemoryRanges and vkInvalidateMappedMemoryRanges to flush/invalidate host cache"/> + <enum bitpos="3" name="VK_MEMORY_PROPERTY_HOST_CACHED_BIT" comment="Memory will be cached by the host"/> + <enum bitpos="4" name="VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT" comment="Memory may be allocated by the driver when it is required"/> + </enums> + <enums name="VkMemoryHeapFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_MEMORY_HEAP_DEVICE_LOCAL_BIT" comment="If set, heap represents device memory"/> + </enums> + <enums name="VkAccessFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_ACCESS_INDIRECT_COMMAND_READ_BIT" comment="Controls coherency of indirect command reads"/> + <enum bitpos="1" name="VK_ACCESS_INDEX_READ_BIT" comment="Controls coherency of index reads"/> + <enum bitpos="2" name="VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT" comment="Controls coherency of vertex attribute reads"/> + <enum bitpos="3" name="VK_ACCESS_UNIFORM_READ_BIT" comment="Controls coherency of uniform buffer reads"/> + <enum bitpos="4" name="VK_ACCESS_INPUT_ATTACHMENT_READ_BIT" comment="Controls coherency of input attachment reads"/> + <enum bitpos="5" name="VK_ACCESS_SHADER_READ_BIT" comment="Controls coherency of shader reads"/> + <enum bitpos="6" name="VK_ACCESS_SHADER_WRITE_BIT" comment="Controls coherency of shader writes"/> + <enum bitpos="7" name="VK_ACCESS_COLOR_ATTACHMENT_READ_BIT" comment="Controls coherency of color attachment reads"/> + <enum bitpos="8" name="VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT" comment="Controls coherency of color attachment writes"/> + <enum bitpos="9" name="VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT" comment="Controls coherency of depth/stencil attachment reads"/> + <enum bitpos="10" name="VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT" comment="Controls coherency of depth/stencil attachment writes"/> + <enum bitpos="11" name="VK_ACCESS_TRANSFER_READ_BIT" comment="Controls coherency of transfer reads"/> + <enum bitpos="12" name="VK_ACCESS_TRANSFER_WRITE_BIT" comment="Controls coherency of transfer writes"/> + <enum bitpos="13" name="VK_ACCESS_HOST_READ_BIT" comment="Controls coherency of host reads"/> + <enum bitpos="14" name="VK_ACCESS_HOST_WRITE_BIT" comment="Controls coherency of host writes"/> + <enum bitpos="15" name="VK_ACCESS_MEMORY_READ_BIT" comment="Controls coherency of memory reads"/> + <enum bitpos="16" name="VK_ACCESS_MEMORY_WRITE_BIT" comment="Controls coherency of memory writes"/> + </enums> + <enums name="VkBufferUsageFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_BUFFER_USAGE_TRANSFER_SRC_BIT" comment="Can be used as a source of transfer operations"/> + <enum bitpos="1" name="VK_BUFFER_USAGE_TRANSFER_DST_BIT" comment="Can be used as a destination of transfer operations"/> + <enum bitpos="2" name="VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT" comment="Can be used as TBO"/> + <enum bitpos="3" name="VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT" comment="Can be used as IBO"/> + <enum bitpos="4" name="VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT" comment="Can be used as UBO"/> + <enum bitpos="5" name="VK_BUFFER_USAGE_STORAGE_BUFFER_BIT" comment="Can be used as SSBO"/> + <enum bitpos="6" name="VK_BUFFER_USAGE_INDEX_BUFFER_BIT" comment="Can be used as source of fixed-function index fetch (index buffer)"/> + <enum bitpos="7" name="VK_BUFFER_USAGE_VERTEX_BUFFER_BIT" comment="Can be used as source of fixed-function vertex fetch (VBO)"/> + <enum bitpos="8" name="VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT" comment="Can be the source of indirect parameters (e.g. indirect buffer, parameter buffer)"/> + </enums> + <enums name="VkBufferCreateFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_BUFFER_CREATE_SPARSE_BINDING_BIT" comment="Buffer should support sparse backing"/> + <enum bitpos="1" name="VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT" comment="Buffer should support sparse backing with partial residency"/> + <enum bitpos="2" name="VK_BUFFER_CREATE_SPARSE_ALIASED_BIT" comment="Buffer should support constent data access to physical memory ranges mapped into multiple locations of sparse buffers"/> + </enums> + <enums name="VkShaderStageFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_SHADER_STAGE_VERTEX_BIT"/> + <enum bitpos="1" name="VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT"/> + <enum bitpos="2" name="VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT"/> + <enum bitpos="3" name="VK_SHADER_STAGE_GEOMETRY_BIT"/> + <enum bitpos="4" name="VK_SHADER_STAGE_FRAGMENT_BIT"/> + <enum bitpos="5" name="VK_SHADER_STAGE_COMPUTE_BIT"/> + <enum value="0x0000001F" name="VK_SHADER_STAGE_ALL_GRAPHICS"/> + <enum value="0x7FFFFFFF" name="VK_SHADER_STAGE_ALL"/> + </enums> + <enums name="VkImageUsageFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_IMAGE_USAGE_TRANSFER_SRC_BIT" comment="Can be used as a source of transfer operations"/> + <enum bitpos="1" name="VK_IMAGE_USAGE_TRANSFER_DST_BIT" comment="Can be used as a destination of transfer operations"/> + <enum bitpos="2" name="VK_IMAGE_USAGE_SAMPLED_BIT" comment="Can be sampled from (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)"/> + <enum bitpos="3" name="VK_IMAGE_USAGE_STORAGE_BIT" comment="Can be used as storage image (STORAGE_IMAGE descriptor type)"/> + <enum bitpos="4" name="VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT" comment="Can be used as framebuffer color attachment"/> + <enum bitpos="5" name="VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT" comment="Can be used as framebuffer depth/stencil attachment"/> + <enum bitpos="6" name="VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT" comment="Image data not needed outside of rendering"/> + <enum bitpos="7" name="VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT" comment="Can be used as framebuffer input attachment"/> + </enums> + <enums name="VkImageCreateFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_IMAGE_CREATE_SPARSE_BINDING_BIT" comment="Image should support sparse backing"/> + <enum bitpos="1" name="VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT" comment="Image should support sparse backing with partial residency"/> + <enum bitpos="2" name="VK_IMAGE_CREATE_SPARSE_ALIASED_BIT" comment="Image should support constent data access to physical memory ranges mapped into multiple locations of sparse images"/> + <enum bitpos="3" name="VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT" comment="Allows image views to have different format than the base image"/> + <enum bitpos="4" name="VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT" comment="Allows creating image views with cube type from the created image"/> + </enums> + <enums name="VkPipelineCreateFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT"/> + <enum bitpos="1" name="VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT"/> + <enum bitpos="2" name="VK_PIPELINE_CREATE_DERIVATIVE_BIT"/> + </enums> + <enums name="VkColorComponentFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_COLOR_COMPONENT_R_BIT"/> + <enum bitpos="1" name="VK_COLOR_COMPONENT_G_BIT"/> + <enum bitpos="2" name="VK_COLOR_COMPONENT_B_BIT"/> + <enum bitpos="3" name="VK_COLOR_COMPONENT_A_BIT"/> + </enums> + <enums name="VkFenceCreateFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_FENCE_CREATE_SIGNALED_BIT"/> + </enums> + <enums name="VkFormatFeatureFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT" comment="Format can be used for sampled images (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)"/> + <enum bitpos="1" name="VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT" comment="Format can be used for storage images (STORAGE_IMAGE descriptor type)"/> + <enum bitpos="2" name="VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT" comment="Format supports atomic operations in case it is used for storage images"/> + <enum bitpos="3" name="VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT" comment="Format can be used for uniform texel buffers (TBOs)"/> + <enum bitpos="4" name="VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT" comment="Format can be used for storage texel buffers (IBOs)"/> + <enum bitpos="5" name="VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT" comment="Format supports atomic operations in case it is used for storage texel buffers"/> + <enum bitpos="6" name="VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT" comment="Format can be used for vertex buffers (VBOs)"/> + <enum bitpos="7" name="VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT" comment="Format can be used for color attachment images"/> + <enum bitpos="8" name="VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT" comment="Format supports blending in case it is used for color attachment images"/> + <enum bitpos="9" name="VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT" comment="Format can be used for depth/stencil attachment images"/> + <enum bitpos="10" name="VK_FORMAT_FEATURE_BLIT_SRC_BIT" comment="Format can be used as the source image of blits with vkCmdBlitImage"/> + <enum bitpos="11" name="VK_FORMAT_FEATURE_BLIT_DST_BIT" comment="Format can be used as the destination image of blits with vkCmdBlitImage"/> + <enum bitpos="12" name="VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT" comment="Format can be filtered with VK_FILTER_LINEAR when being sampled"/> + </enums> + <enums name="VkQueryControlFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_QUERY_CONTROL_PRECISE_BIT" comment="Require precise results to be collected by the query"/> + </enums> + <enums name="VkQueryResultFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_QUERY_RESULT_64_BIT" comment="Results of the queries are written to the destination buffer as 64-bit values"/> + <enum bitpos="1" name="VK_QUERY_RESULT_WAIT_BIT" comment="Results of the queries are waited on before proceeding with the result copy"/> + <enum bitpos="2" name="VK_QUERY_RESULT_WITH_AVAILABILITY_BIT" comment="Besides the results of the query, the availability of the results is also written"/> + <enum bitpos="3" name="VK_QUERY_RESULT_PARTIAL_BIT" comment="Copy the partial results of the query even if the final results are not available"/> + </enums> + <enums name="VkCommandBufferUsageFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT"/> + <enum bitpos="1" name="VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT"/> + <enum bitpos="2" name="VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT" comment="Command buffer may be submitted/executed more than once simultaneously"/> + </enums> + <enums name="VkQueryPipelineStatisticFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT" comment="Optional"/> + <enum bitpos="1" name="VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT" comment="Optional"/> + <enum bitpos="2" name="VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT" comment="Optional"/> + <enum bitpos="3" name="VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT" comment="Optional"/> + <enum bitpos="4" name="VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT" comment="Optional"/> + <enum bitpos="5" name="VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT" comment="Optional"/> + <enum bitpos="6" name="VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT" comment="Optional"/> + <enum bitpos="7" name="VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT" comment="Optional"/> + <enum bitpos="8" name="VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT" comment="Optional"/> + <enum bitpos="9" name="VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT" comment="Optional"/> + <enum bitpos="10" name="VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT" comment="Optional"/> + </enums> + <enums name="VkImageAspectFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_IMAGE_ASPECT_COLOR_BIT"/> + <enum bitpos="1" name="VK_IMAGE_ASPECT_DEPTH_BIT"/> + <enum bitpos="2" name="VK_IMAGE_ASPECT_STENCIL_BIT"/> + <enum bitpos="3" name="VK_IMAGE_ASPECT_METADATA_BIT"/> + </enums> + <enums name="VkSparseImageFormatFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT" comment="Image uses a single mip tail region for all array layers"/> + <enum bitpos="1" name="VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT" comment="Image requires mip level dimensions to be an integer multiple of the sparse image block dimensions for non-tail mip levels."/> + <enum bitpos="2" name="VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT" comment="Image uses a non-standard sparse image block dimensions"/> + </enums> + <enums name="VkSparseMemoryBindFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_SPARSE_MEMORY_BIND_METADATA_BIT" comment="Operation binds resource metadata to memory"/> + </enums> + <enums name="VkPipelineStageFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT" comment="Before subsequent commands are processed"/> + <enum bitpos="1" name="VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT" comment="Draw/DispatchIndirect command fetch"/> + <enum bitpos="2" name="VK_PIPELINE_STAGE_VERTEX_INPUT_BIT" comment="Vertex/index fetch"/> + <enum bitpos="3" name="VK_PIPELINE_STAGE_VERTEX_SHADER_BIT" comment="Vertex shading"/> + <enum bitpos="4" name="VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT" comment="Tessellation control shading"/> + <enum bitpos="5" name="VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT" comment="Tessellation evaluation shading"/> + <enum bitpos="6" name="VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT" comment="Geometry shading"/> + <enum bitpos="7" name="VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT" comment="Fragment shading"/> + <enum bitpos="8" name="VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT" comment="Early fragment (depth and stencil) tests"/> + <enum bitpos="9" name="VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT" comment="Late fragment (depth and stencil) tests"/> + <enum bitpos="10" name="VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT" comment="Color attachment writes"/> + <enum bitpos="11" name="VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT" comment="Compute shading"/> + <enum bitpos="12" name="VK_PIPELINE_STAGE_TRANSFER_BIT" comment="Transfer/copy operations"/> + <enum bitpos="13" name="VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT" comment="After previous commands have completed"/> + <enum bitpos="14" name="VK_PIPELINE_STAGE_HOST_BIT" comment="Indicates host (CPU) is a source/sink of the dependency"/> + <enum bitpos="15" name="VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT" comment="All stages of the graphics pipeline"/> + <enum bitpos="16" name="VK_PIPELINE_STAGE_ALL_COMMANDS_BIT" comment="All stages supported on the queue"/> + </enums> + <enums name="VkCommandPoolCreateFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_COMMAND_POOL_CREATE_TRANSIENT_BIT" comment="Command buffers have a short lifetime"/> + <enum bitpos="1" name="VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT" comment="Command buffers may release their memory individually"/> + </enums> + <enums name="VkCommandPoolResetFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT" comment="Release resources owned by the pool"/> + </enums> + <enums name="VkCommandBufferResetFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT" comment="Release resources owned by the buffer"/> + </enums> + <enums name="VkSampleCountFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_SAMPLE_COUNT_1_BIT" comment="Sample count 1 supported"/> + <enum bitpos="1" name="VK_SAMPLE_COUNT_2_BIT" comment="Sample count 2 supported"/> + <enum bitpos="2" name="VK_SAMPLE_COUNT_4_BIT" comment="Sample count 4 supported"/> + <enum bitpos="3" name="VK_SAMPLE_COUNT_8_BIT" comment="Sample count 8 supported"/> + <enum bitpos="4" name="VK_SAMPLE_COUNT_16_BIT" comment="Sample count 16 supported"/> + <enum bitpos="5" name="VK_SAMPLE_COUNT_32_BIT" comment="Sample count 32 supported"/> + <enum bitpos="6" name="VK_SAMPLE_COUNT_64_BIT" comment="Sample count 64 supported"/> + </enums> + <enums name="VkAttachmentDescriptionFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT" comment="The attachment may alias physical memory of another attachment in the same render pass"/> + </enums> + <enums name="VkStencilFaceFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_STENCIL_FACE_FRONT_BIT" comment="Front face"/> + <enum bitpos="1" name="VK_STENCIL_FACE_BACK_BIT" comment="Back face"/> + <enum value="0x00000003" name="VK_STENCIL_FRONT_AND_BACK" comment="Front and back faces"/> + </enums> + <enums name="VkDescriptorPoolCreateFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT" comment="Descriptor sets may be freed individually"/> + </enums> + <enums name="VkDependencyFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_DEPENDENCY_BY_REGION_BIT" comment="Dependency is per pixel region "/> + </enums> + <!-- WSI extensions --> + <enums name="VkPresentModeKHR" type="enum"> + <enum value="0" name="VK_PRESENT_MODE_IMMEDIATE_KHR"/> + <enum value="1" name="VK_PRESENT_MODE_MAILBOX_KHR"/> + <enum value="2" name="VK_PRESENT_MODE_FIFO_KHR"/> + <enum value="3" name="VK_PRESENT_MODE_FIFO_RELAXED_KHR"/> + </enums> + <enums name="VkColorSpaceKHR" type="enum"> + <enum value="0" name="VK_COLOR_SPACE_SRGB_NONLINEAR_KHR"/> + </enums> + <enums name="VkDisplayPlaneAlphaFlagBitsKHR" type="bitmask"> + <enum bitpos="0" name="VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR"/> + <enum bitpos="1" name="VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR"/> + <enum bitpos="2" name="VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR"/> + <enum bitpos="3" name="VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR"/> + </enums> + <enums name="VkCompositeAlphaFlagBitsKHR" type="bitmask"> + <enum bitpos="0" name="VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR"/> + <enum bitpos="1" name="VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR"/> + <enum bitpos="2" name="VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR"/> + <enum bitpos="3" name="VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR"/> + </enums> + <enums name="VkSurfaceTransformFlagBitsKHR" type="bitmask"> + <enum bitpos="0" name="VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR"/> + <enum bitpos="1" name="VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR"/> + <enum bitpos="2" name="VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR"/> + <enum bitpos="3" name="VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR"/> + <enum bitpos="4" name="VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR"/> + <enum bitpos="5" name="VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR"/> + <enum bitpos="6" name="VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR"/> + <enum bitpos="7" name="VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR"/> + <enum bitpos="8" name="VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR"/> + </enums> + <enums name="VkDebugReportFlagBitsEXT" type="bitmask"> + <enum bitpos="0" name="VK_DEBUG_REPORT_INFORMATION_BIT_EXT"/> + <enum bitpos="1" name="VK_DEBUG_REPORT_WARNING_BIT_EXT"/> + <enum bitpos="2" name="VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT"/> + <enum bitpos="3" name="VK_DEBUG_REPORT_ERROR_BIT_EXT"/> + <enum bitpos="4" name="VK_DEBUG_REPORT_DEBUG_BIT_EXT"/> + </enums> + <enums name="VkDebugReportObjectTypeEXT" type="enum"> + <enum value="0" name="VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT"/> + <enum value="1" name="VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT"/> + <enum value="2" name="VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT"/> + <enum value="3" name="VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT"/> + <enum value="4" name="VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT"/> + <enum value="5" name="VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT"/> + <enum value="6" name="VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT"/> + <enum value="7" name="VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT"/> + <enum value="8" name="VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT"/> + <enum value="9" name="VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT"/> + <enum value="10" name="VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT"/> + <enum value="11" name="VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT"/> + <enum value="12" name="VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT"/> + <enum value="13" name="VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT"/> + <enum value="14" name="VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT"/> + <enum value="15" name="VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT"/> + <enum value="16" name="VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT"/> + <enum value="17" name="VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT"/> + <enum value="18" name="VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT"/> + <enum value="19" name="VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT"/> + <enum value="20" name="VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT"/> + <enum value="21" name="VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT"/> + <enum value="22" name="VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT"/> + <enum value="23" name="VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT"/> + <enum value="24" name="VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT"/> + <enum value="25" name="VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT"/> + <enum value="26" name="VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT"/> + <enum value="27" name="VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT"/> + <enum value="28" name="VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT"/> + <enum value="29" name="VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT"/> + <enum value="30" name="VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT"/> + <enum value="31" name="VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT"/> + <enum value="32" name="VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT"/> + </enums> + <enums name="VkDebugReportErrorEXT" type="enum"> + <enum value="0" name="VK_DEBUG_REPORT_ERROR_NONE_EXT"/> <!-- Used for INFO & other non-error messages --> + <enum value="1" name="VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT"/> <!-- Callbacks were not destroyed prior to calling DestroyInstance --> + </enums> + <enums name="VkRasterizationOrderAMD" type="enum"> + <enum value="0" name="VK_RASTERIZATION_ORDER_STRICT_AMD"/> <!-- Rasterization order strictly follows API order --> + <enum value="1" name="VK_RASTERIZATION_ORDER_RELAXED_AMD"/> <!-- Rasterization order may not follow API order --> + </enums> + <enums name="VkExternalMemoryHandleTypeFlagBitsNV" type="bitmask"> + <enum bitpos="0" name="VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV"/> + <enum bitpos="1" name="VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV"/> + <enum bitpos="2" name="VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV"/> + <enum bitpos="3" name="VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV"/> + </enums> + <enums name="VkExternalMemoryFeatureFlagBitsNV" type="bitmask"> + <enum bitpos="0" name="VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV"/> + <enum bitpos="1" name="VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV"/> + <enum bitpos="2" name="VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV"/> + </enums> + <enums name="VkValidationCheckEXT" type="enum"> + <enum value="0" name="VK_VALIDATION_CHECK_ALL_EXT"/> + <!-- Placeholder for validation enums to be defined for VK_EXT_Validation_flags extension --> + </enums> + <enums name="VkIndirectCommandsLayoutUsageFlagBitsNVX" type="bitmask"> + <enum bitpos="0" name="VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX"/> <!-- sequences can be processed in implementation-dependent order --> + <enum bitpos="1" name="VK_INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX"/> <!-- likely generated with a high difference in actual sequencesCount and maxSequencesCount --> + <enum bitpos="2" name="VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX"/> <!-- likely to contain draw/dispatch calls that are zero-sized --> + <enum bitpos="3" name="VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX"/> <!-- custom sequence index permutation (32-bit) is provided --> + </enums> + <enums name="VkObjectEntryUsageFlagBitsNVX" type="bitmask"> + <enum bitpos="0" name="VK_OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX"/> + <enum bitpos="1" name="VK_OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX"/> + </enums> + <enums name="VkIndirectCommandsTokenTypeNVX" type="enum"> + <enum value="0" name="VK_INDIRECT_COMMANDS_TOKEN_PIPELINE_NVX"/> <!-- array of 32bit tableEntry in the object table --> + <enum value="1" name="VK_INDIRECT_COMMANDS_TOKEN_DESCRIPTOR_SET_NVX"/> <!-- array of (32 bit tableEntry + variable count 32bit offsets) --> + <enum value="2" name="VK_INDIRECT_COMMANDS_TOKEN_INDEX_BUFFER_NVX"/> <!-- array of (32 bit tableEntry + optional 32bit offset) --> + <enum value="3" name="VK_INDIRECT_COMMANDS_TOKEN_VERTEX_BUFFER_NVX"/> <!-- array of (32 bit tableEntry + optional 32bit offset) --> + <enum value="4" name="VK_INDIRECT_COMMANDS_TOKEN_PUSH_CONSTANT_NVX"/> <!-- array of (32 bit tableEntry + variable count 32bit values ) --> + <enum value="5" name="VK_INDIRECT_COMMANDS_TOKEN_DRAW_INDEXED_NVX"/> <!-- array of VkDrawIndexedIndirectCommand --> + <enum value="6" name="VK_INDIRECT_COMMANDS_TOKEN_DRAW_NVX"/> <!-- array of VkDrawIndirectCommand --> + <enum value="7" name="VK_INDIRECT_COMMANDS_TOKEN_DISPATCH_NVX"/> <!-- array of VkDispatchIndirectCommand --> + </enums> + <enums name="VkObjectEntryTypeNVX" type="enum"> + <enum value="0" name="VK_OBJECT_ENTRY_DESCRIPTOR_SET_NVX"/> + <enum value="1" name="VK_OBJECT_ENTRY_PIPELINE_NVX"/> + <enum value="2" name="VK_OBJECT_ENTRY_INDEX_BUFFER_NVX"/> + <enum value="3" name="VK_OBJECT_ENTRY_VERTEX_BUFFER_NVX"/> + <enum value="4" name="VK_OBJECT_ENTRY_PUSH_CONSTANT_NVX"/> + </enums> + <enums name="VkSurfaceCounterFlagBitsEXT" type="bitmask"> + <enum bitpos="0" name="VK_SURFACE_COUNTER_VBLANK_EXT"/> + </enums> + <enums name="VkDisplayPowerStateEXT" type="enum"> + <enum value="0" name="VK_DISPLAY_POWER_STATE_OFF_EXT"/> + <enum value="1" name="VK_DISPLAY_POWER_STATE_SUSPEND_EXT"/> + <enum value="2" name="VK_DISPLAY_POWER_STATE_ON_EXT"/> + </enums> + <enums name="VkDeviceEventTypeEXT" type="enum"> + <enum value="0" name="VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT"/> + </enums> + <enums name="VkDisplayEventTypeEXT" type="enum"> + <enum value="0" name="VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT"/> + </enums> + + <!-- SECTION: Vulkan command definitions --> + <commands> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INITIALIZATION_FAILED,VK_ERROR_LAYER_NOT_PRESENT,VK_ERROR_EXTENSION_NOT_PRESENT,VK_ERROR_INCOMPATIBLE_DRIVER"> + <proto><type>VkResult</type> <name>vkCreateInstance</name></proto> + <param>const <type>VkInstanceCreateInfo</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkInstance</type>* <name>pInstance</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDestroyInstance</name></proto> + <param optional="true" externsync="true"><type>VkInstance</type> <name>instance</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + </command> + <command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INITIALIZATION_FAILED"> + <proto><type>VkResult</type> <name>vkEnumeratePhysicalDevices</name></proto> + <param><type>VkInstance</type> <name>instance</name></param> + <param optional="false,true"><type>uint32_t</type>* <name>pPhysicalDeviceCount</name></param> + <param optional="true" len="pPhysicalDeviceCount"><type>VkPhysicalDevice</type>* <name>pPhysicalDevices</name></param> + </command> + <command> + <proto><type>PFN_vkVoidFunction</type> <name>vkGetDeviceProcAddr</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param len="null-terminated">const <type>char</type>* <name>pName</name></param> + </command> + <command> + <proto><type>PFN_vkVoidFunction</type> <name>vkGetInstanceProcAddr</name></proto> + <param optional="true"><type>VkInstance</type> <name>instance</name></param> + <param len="null-terminated">const <type>char</type>* <name>pName</name></param> + </command> + <command> + <proto><type>void</type> <name>vkGetPhysicalDeviceProperties</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>VkPhysicalDeviceProperties</type>* <name>pProperties</name></param> + </command> + <command> + <proto><type>void</type> <name>vkGetPhysicalDeviceQueueFamilyProperties</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param optional="false,true"><type>uint32_t</type>* <name>pQueueFamilyPropertyCount</name></param> + <param optional="true" len="pQueueFamilyPropertyCount"><type>VkQueueFamilyProperties</type>* <name>pQueueFamilyProperties</name></param> + </command> + <command> + <proto><type>void</type> <name>vkGetPhysicalDeviceMemoryProperties</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>VkPhysicalDeviceMemoryProperties</type>* <name>pMemoryProperties</name></param> + </command> + <command> + <proto><type>void</type> <name>vkGetPhysicalDeviceFeatures</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>VkPhysicalDeviceFeatures</type>* <name>pFeatures</name></param> + </command> + <command> + <proto><type>void</type> <name>vkGetPhysicalDeviceFormatProperties</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>VkFormat</type> <name>format</name></param> + <param><type>VkFormatProperties</type>* <name>pFormatProperties</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_FORMAT_NOT_SUPPORTED"> + <proto><type>VkResult</type> <name>vkGetPhysicalDeviceImageFormatProperties</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>VkFormat</type> <name>format</name></param> + <param><type>VkImageType</type> <name>type</name></param> + <param><type>VkImageTiling</type> <name>tiling</name></param> + <param><type>VkImageUsageFlags</type> <name>usage</name></param> + <param optional="true"><type>VkImageCreateFlags</type> <name>flags</name></param> + <param><type>VkImageFormatProperties</type>* <name>pImageFormatProperties</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INITIALIZATION_FAILED,VK_ERROR_EXTENSION_NOT_PRESENT,VK_ERROR_FEATURE_NOT_PRESENT,VK_ERROR_TOO_MANY_OBJECTS,VK_ERROR_DEVICE_LOST"> + <proto><type>VkResult</type> <name>vkCreateDevice</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param>const <type>VkDeviceCreateInfo</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkDevice</type>* <name>pDevice</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDestroyDevice</name></proto> + <param optional="true" externsync="true"><type>VkDevice</type> <name>device</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + </command> + <command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkEnumerateInstanceLayerProperties</name></proto> + <param optional="false,true"><type>uint32_t</type>* <name>pPropertyCount</name></param> + <param optional="true" len="pPropertyCount"><type>VkLayerProperties</type>* <name>pProperties</name></param> + </command> + <command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_LAYER_NOT_PRESENT"> + <proto><type>VkResult</type> <name>vkEnumerateInstanceExtensionProperties</name></proto> + <param optional="true" len="null-terminated">const <type>char</type>* <name>pLayerName</name></param> + <param optional="false,true"><type>uint32_t</type>* <name>pPropertyCount</name></param> + <param optional="true" len="pPropertyCount"><type>VkExtensionProperties</type>* <name>pProperties</name></param> + </command> + <command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkEnumerateDeviceLayerProperties</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param optional="false,true"><type>uint32_t</type>* <name>pPropertyCount</name></param> + <param optional="true" len="pPropertyCount"><type>VkLayerProperties</type>* <name>pProperties</name></param> + </command> + <command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_LAYER_NOT_PRESENT"> + <proto><type>VkResult</type> <name>vkEnumerateDeviceExtensionProperties</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param optional="true" len="null-terminated">const <type>char</type>* <name>pLayerName</name></param> + <param optional="false,true"><type>uint32_t</type>* <name>pPropertyCount</name></param> + <param optional="true" len="pPropertyCount"><type>VkExtensionProperties</type>* <name>pProperties</name></param> + </command> + <command> + <proto><type>void</type> <name>vkGetDeviceQueue</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param><type>uint32_t</type> <name>queueFamilyIndex</name></param> + <param><type>uint32_t</type> <name>queueIndex</name></param> + <param><type>VkQueue</type>* <name>pQueue</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST"> + <proto><type>VkResult</type> <name>vkQueueSubmit</name></proto> + <param externsync="true"><type>VkQueue</type> <name>queue</name></param> + <param optional="true"><type>uint32_t</type> <name>submitCount</name></param> + <param len="submitCount" externsync="pSubmits[].pWaitSemaphores[],pSubmits[].pSignalSemaphores[]">const <type>VkSubmitInfo</type>* <name>pSubmits</name></param> + <param optional="true" externsync="true"><type>VkFence</type> <name>fence</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST"> + <proto><type>VkResult</type> <name>vkQueueWaitIdle</name></proto> + <param><type>VkQueue</type> <name>queue</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST"> + <proto><type>VkResult</type> <name>vkDeviceWaitIdle</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <implicitexternsyncparams> + <param>all sname:VkQueue objects created from pname:device</param> + </implicitexternsyncparams> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_TOO_MANY_OBJECTS"> + <proto><type>VkResult</type> <name>vkAllocateMemory</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param>const <type>VkMemoryAllocateInfo</type>* <name>pAllocateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkDeviceMemory</type>* <name>pMemory</name></param> + </command> + <command> + <proto><type>void</type> <name>vkFreeMemory</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true" externsync="true"><type>VkDeviceMemory</type> <name>memory</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_MEMORY_MAP_FAILED"> + <proto><type>VkResult</type> <name>vkMapMemory</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param externsync="true"><type>VkDeviceMemory</type> <name>memory</name></param> + <param><type>VkDeviceSize</type> <name>offset</name></param> + <param><type>VkDeviceSize</type> <name>size</name></param> + <param optional="true"><type>VkMemoryMapFlags</type> <name>flags</name></param> + <param><type>void</type>** <name>ppData</name></param> + </command> + <command> + <proto><type>void</type> <name>vkUnmapMemory</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param externsync="true"><type>VkDeviceMemory</type> <name>memory</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkFlushMappedMemoryRanges</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param><type>uint32_t</type> <name>memoryRangeCount</name></param> + <param len="memoryRangeCount">const <type>VkMappedMemoryRange</type>* <name>pMemoryRanges</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkInvalidateMappedMemoryRanges</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param><type>uint32_t</type> <name>memoryRangeCount</name></param> + <param len="memoryRangeCount">const <type>VkMappedMemoryRange</type>* <name>pMemoryRanges</name></param> + </command> + <command> + <proto><type>void</type> <name>vkGetDeviceMemoryCommitment</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param><type>VkDeviceMemory</type> <name>memory</name></param> + <param><type>VkDeviceSize</type>* <name>pCommittedMemoryInBytes</name></param> + </command> + <command> + <proto><type>void</type> <name>vkGetBufferMemoryRequirements</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param><type>VkBuffer</type> <name>buffer</name></param> + <param><type>VkMemoryRequirements</type>* <name>pMemoryRequirements</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkBindBufferMemory</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param externsync="true"><type>VkBuffer</type> <name>buffer</name></param> + <param><type>VkDeviceMemory</type> <name>memory</name></param> + <param><type>VkDeviceSize</type> <name>memoryOffset</name></param> + </command> + <command> + <proto><type>void</type> <name>vkGetImageMemoryRequirements</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param><type>VkImage</type> <name>image</name></param> + <param><type>VkMemoryRequirements</type>* <name>pMemoryRequirements</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkBindImageMemory</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param externsync="true"><type>VkImage</type> <name>image</name></param> + <param><type>VkDeviceMemory</type> <name>memory</name></param> + <param><type>VkDeviceSize</type> <name>memoryOffset</name></param> + </command> + <command> + <proto><type>void</type> <name>vkGetImageSparseMemoryRequirements</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param><type>VkImage</type> <name>image</name></param> + <param optional="false,true"><type>uint32_t</type>* <name>pSparseMemoryRequirementCount</name></param> + <param optional="true" len="pSparseMemoryRequirementCount"><type>VkSparseImageMemoryRequirements</type>* <name>pSparseMemoryRequirements</name></param> + </command> + <command> + <proto><type>void</type> <name>vkGetPhysicalDeviceSparseImageFormatProperties</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>VkFormat</type> <name>format</name></param> + <param><type>VkImageType</type> <name>type</name></param> + <param><type>VkSampleCountFlagBits</type> <name>samples</name></param> + <param><type>VkImageUsageFlags</type> <name>usage</name></param> + <param><type>VkImageTiling</type> <name>tiling</name></param> + <param optional="false,true"><type>uint32_t</type>* <name>pPropertyCount</name></param> + <param optional="true" len="pPropertyCount"><type>VkSparseImageFormatProperties</type>* <name>pProperties</name></param> + </command> + <command queues="sparse_binding" successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST"> + <proto><type>VkResult</type> <name>vkQueueBindSparse</name></proto> + <param externsync="true"><type>VkQueue</type> <name>queue</name></param> + <param optional="true"><type>uint32_t</type> <name>bindInfoCount</name></param> + <param len="bindInfoCount" externsync="pBindInfo[].pWaitSemaphores[],pBindInfo[].pSignalSemaphores[],pBindInfo[].pBufferBinds[].buffer,pBindInfo[].pImageOpaqueBinds[].image,pBindInfo[].pImageBinds[].image">const <type>VkBindSparseInfo</type>* <name>pBindInfo</name></param> + <param optional="true" externsync="true"><type>VkFence</type> <name>fence</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateFence</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param>const <type>VkFenceCreateInfo</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkFence</type>* <name>pFence</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDestroyFence</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true" externsync="true"><type>VkFence</type> <name>fence</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkResetFences</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param><type>uint32_t</type> <name>fenceCount</name></param> + <param len="fenceCount" externsync="true">const <type>VkFence</type>* <name>pFences</name></param> + </command> + <command successcodes="VK_SUCCESS,VK_NOT_READY" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST"> + <proto><type>VkResult</type> <name>vkGetFenceStatus</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param><type>VkFence</type> <name>fence</name></param> + </command> + <command successcodes="VK_SUCCESS,VK_TIMEOUT" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST"> + <proto><type>VkResult</type> <name>vkWaitForFences</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param><type>uint32_t</type> <name>fenceCount</name></param> + <param len="fenceCount">const <type>VkFence</type>* <name>pFences</name></param> + <param><type>VkBool32</type> <name>waitAll</name></param> + <param><type>uint64_t</type> <name>timeout</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateSemaphore</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param>const <type>VkSemaphoreCreateInfo</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkSemaphore</type>* <name>pSemaphore</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDestroySemaphore</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true" externsync="true"><type>VkSemaphore</type> <name>semaphore</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateEvent</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param>const <type>VkEventCreateInfo</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkEvent</type>* <name>pEvent</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDestroyEvent</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true" externsync="true"><type>VkEvent</type> <name>event</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + </command> + <command successcodes="VK_EVENT_SET,VK_EVENT_RESET" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST"> + <proto><type>VkResult</type> <name>vkGetEventStatus</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param><type>VkEvent</type> <name>event</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkSetEvent</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param externsync="true"><type>VkEvent</type> <name>event</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkResetEvent</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param externsync="true"><type>VkEvent</type> <name>event</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateQueryPool</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param>const <type>VkQueryPoolCreateInfo</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkQueryPool</type>* <name>pQueryPool</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDestroyQueryPool</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true" externsync="true"><type>VkQueryPool</type> <name>queryPool</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + </command> + <command successcodes="VK_SUCCESS,VK_NOT_READY" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST"> + <proto><type>VkResult</type> <name>vkGetQueryPoolResults</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param><type>VkQueryPool</type> <name>queryPool</name></param> + <param><type>uint32_t</type> <name>firstQuery</name></param> + <param><type>uint32_t</type> <name>queryCount</name></param> + <param><type>size_t</type> <name>dataSize</name></param> + <param len="dataSize"><type>void</type>* <name>pData</name></param> + <param><type>VkDeviceSize</type> <name>stride</name></param> + <param optional="true"><type>VkQueryResultFlags</type> <name>flags</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateBuffer</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param>const <type>VkBufferCreateInfo</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkBuffer</type>* <name>pBuffer</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDestroyBuffer</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true" externsync="true"><type>VkBuffer</type> <name>buffer</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateBufferView</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param>const <type>VkBufferViewCreateInfo</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkBufferView</type>* <name>pView</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDestroyBufferView</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true" externsync="true"><type>VkBufferView</type> <name>bufferView</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateImage</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param>const <type>VkImageCreateInfo</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkImage</type>* <name>pImage</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDestroyImage</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true" externsync="true"><type>VkImage</type> <name>image</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + </command> + <command> + <proto><type>void</type> <name>vkGetImageSubresourceLayout</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param><type>VkImage</type> <name>image</name></param> + <param>const <type>VkImageSubresource</type>* <name>pSubresource</name></param> + <param><type>VkSubresourceLayout</type>* <name>pLayout</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateImageView</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param>const <type>VkImageViewCreateInfo</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkImageView</type>* <name>pView</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDestroyImageView</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true" externsync="true"><type>VkImageView</type> <name>imageView</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INVALID_SHADER_NV"> + <proto><type>VkResult</type> <name>vkCreateShaderModule</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param>const <type>VkShaderModuleCreateInfo</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkShaderModule</type>* <name>pShaderModule</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDestroyShaderModule</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true" externsync="true"><type>VkShaderModule</type> <name>shaderModule</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreatePipelineCache</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param>const <type>VkPipelineCacheCreateInfo</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkPipelineCache</type>* <name>pPipelineCache</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDestroyPipelineCache</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true" externsync="true"><type>VkPipelineCache</type> <name>pipelineCache</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + </command> + <command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkGetPipelineCacheData</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param><type>VkPipelineCache</type> <name>pipelineCache</name></param> + <param optional="false,true"><type>size_t</type>* <name>pDataSize</name></param> + <param optional="true" len="pDataSize"><type>void</type>* <name>pData</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkMergePipelineCaches</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param externsync="true"><type>VkPipelineCache</type> <name>dstCache</name></param> + <param><type>uint32_t</type> <name>srcCacheCount</name></param> + <param len="srcCacheCount">const <type>VkPipelineCache</type>* <name>pSrcCaches</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INVALID_SHADER_NV"> + <proto><type>VkResult</type> <name>vkCreateGraphicsPipelines</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true"><type>VkPipelineCache</type> <name>pipelineCache</name></param> + <param><type>uint32_t</type> <name>createInfoCount</name></param> + <param len="createInfoCount">const <type>VkGraphicsPipelineCreateInfo</type>* <name>pCreateInfos</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param len="createInfoCount"><type>VkPipeline</type>* <name>pPipelines</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INVALID_SHADER_NV"> + <proto><type>VkResult</type> <name>vkCreateComputePipelines</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true"><type>VkPipelineCache</type> <name>pipelineCache</name></param> + <param><type>uint32_t</type> <name>createInfoCount</name></param> + <param len="createInfoCount">const <type>VkComputePipelineCreateInfo</type>* <name>pCreateInfos</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param len="createInfoCount"><type>VkPipeline</type>* <name>pPipelines</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDestroyPipeline</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true" externsync="true"><type>VkPipeline</type> <name>pipeline</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreatePipelineLayout</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param>const <type>VkPipelineLayoutCreateInfo</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkPipelineLayout</type>* <name>pPipelineLayout</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDestroyPipelineLayout</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true" externsync="true"><type>VkPipelineLayout</type> <name>pipelineLayout</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_TOO_MANY_OBJECTS"> + <proto><type>VkResult</type> <name>vkCreateSampler</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param>const <type>VkSamplerCreateInfo</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkSampler</type>* <name>pSampler</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDestroySampler</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true" externsync="true"><type>VkSampler</type> <name>sampler</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateDescriptorSetLayout</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param>const <type>VkDescriptorSetLayoutCreateInfo</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkDescriptorSetLayout</type>* <name>pSetLayout</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDestroyDescriptorSetLayout</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true" externsync="true"><type>VkDescriptorSetLayout</type> <name>descriptorSetLayout</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateDescriptorPool</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param>const <type>VkDescriptorPoolCreateInfo</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkDescriptorPool</type>* <name>pDescriptorPool</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDestroyDescriptorPool</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true" externsync="true"><type>VkDescriptorPool</type> <name>descriptorPool</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkResetDescriptorPool</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param externsync="true"><type>VkDescriptorPool</type> <name>descriptorPool</name></param> + <param optional="true"><type>VkDescriptorPoolResetFlags</type> <name>flags</name></param> + <implicitexternsyncparams> + <param>any sname:VkDescriptorSet objects allocated from pname:descriptorPool</param> + </implicitexternsyncparams> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_FRAGMENTED_POOL"> + <proto><type>VkResult</type> <name>vkAllocateDescriptorSets</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param externsync="pAllocateInfo::descriptorPool">const <type>VkDescriptorSetAllocateInfo</type>* <name>pAllocateInfo</name></param> + <param len="pAllocateInfo::descriptorSetCount"><type>VkDescriptorSet</type>* <name>pDescriptorSets</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkFreeDescriptorSets</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param externsync="true"><type>VkDescriptorPool</type> <name>descriptorPool</name></param> + <param><type>uint32_t</type> <name>descriptorSetCount</name></param> + <param noautovalidity="true" externsync="true" len="descriptorSetCount">const <type>VkDescriptorSet</type>* <name>pDescriptorSets</name></param> + </command> + <command> + <proto><type>void</type> <name>vkUpdateDescriptorSets</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true"><type>uint32_t</type> <name>descriptorWriteCount</name></param> + <param len="descriptorWriteCount" externsync="pDescriptorWrites[].dstSet">const <type>VkWriteDescriptorSet</type>* <name>pDescriptorWrites</name></param> + <param optional="true"><type>uint32_t</type> <name>descriptorCopyCount</name></param> + <param len="descriptorCopyCount" externsync="pDescriptorCopies[].dstSet">const <type>VkCopyDescriptorSet</type>* <name>pDescriptorCopies</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateFramebuffer</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param>const <type>VkFramebufferCreateInfo</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkFramebuffer</type>* <name>pFramebuffer</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDestroyFramebuffer</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true" externsync="true"><type>VkFramebuffer</type> <name>framebuffer</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateRenderPass</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param>const <type>VkRenderPassCreateInfo</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkRenderPass</type>* <name>pRenderPass</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDestroyRenderPass</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true" externsync="true"><type>VkRenderPass</type> <name>renderPass</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + </command> + <command> + <proto><type>void</type> <name>vkGetRenderAreaGranularity</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param><type>VkRenderPass</type> <name>renderPass</name></param> + <param><type>VkExtent2D</type>* <name>pGranularity</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateCommandPool</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param>const <type>VkCommandPoolCreateInfo</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkCommandPool</type>* <name>pCommandPool</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDestroyCommandPool</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true" externsync="true"><type>VkCommandPool</type> <name>commandPool</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkResetCommandPool</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param externsync="true"><type>VkCommandPool</type> <name>commandPool</name></param> + <param optional="true"><type>VkCommandPoolResetFlags</type> <name>flags</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkAllocateCommandBuffers</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param externsync="pAllocateInfo::commandPool">const <type>VkCommandBufferAllocateInfo</type>* <name>pAllocateInfo</name></param> + <param len="pAllocateInfo::commandBufferCount"><type>VkCommandBuffer</type>* <name>pCommandBuffers</name></param> + </command> + <command> + <proto><type>void</type> <name>vkFreeCommandBuffers</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param externsync="true"><type>VkCommandPool</type> <name>commandPool</name></param> + <param><type>uint32_t</type> <name>commandBufferCount</name></param> + <param noautovalidity="true" externsync="true" len="commandBufferCount">const <type>VkCommandBuffer</type>* <name>pCommandBuffers</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkBeginCommandBuffer</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param>const <type>VkCommandBufferBeginInfo</type>* <name>pBeginInfo</name></param> + <implicitexternsyncparams> + <param>the sname:VkCommandPool that pname:commandBuffer was allocated from</param> + </implicitexternsyncparams> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkEndCommandBuffer</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <implicitexternsyncparams> + <param>the sname:VkCommandPool that pname:commandBuffer was allocated from</param> + </implicitexternsyncparams> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkResetCommandBuffer</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param optional="true"><type>VkCommandBufferResetFlags</type> <name>flags</name></param> + </command> + <command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdBindPipeline</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkPipelineBindPoint</type> <name>pipelineBindPoint</name></param> + <param><type>VkPipeline</type> <name>pipeline</name></param> + </command> + <command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdSetViewport</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>uint32_t</type> <name>firstViewport</name></param> + <param><type>uint32_t</type> <name>viewportCount</name></param> + <param len="viewportCount" noautovalidity="true">const <type>VkViewport</type>* <name>pViewports</name></param> + </command> + <command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdSetScissor</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>uint32_t</type> <name>firstScissor</name></param> + <param><type>uint32_t</type> <name>scissorCount</name></param> + <param len="scissorCount">const <type>VkRect2D</type>* <name>pScissors</name></param> + </command> + <command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdSetLineWidth</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>float</type> <name>lineWidth</name></param> + </command> + <command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdSetDepthBias</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>float</type> <name>depthBiasConstantFactor</name></param> + <param><type>float</type> <name>depthBiasClamp</name></param> + <param><type>float</type> <name>depthBiasSlopeFactor</name></param> + </command> + <command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdSetBlendConstants</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param>const <type>float</type> <name>blendConstants</name>[4]</param> + </command> + <command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdSetDepthBounds</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>float</type> <name>minDepthBounds</name></param> + <param><type>float</type> <name>maxDepthBounds</name></param> + </command> + <command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdSetStencilCompareMask</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkStencilFaceFlags</type> <name>faceMask</name></param> + <param><type>uint32_t</type> <name>compareMask</name></param> + </command> + <command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdSetStencilWriteMask</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkStencilFaceFlags</type> <name>faceMask</name></param> + <param><type>uint32_t</type> <name>writeMask</name></param> + </command> + <command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdSetStencilReference</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkStencilFaceFlags</type> <name>faceMask</name></param> + <param><type>uint32_t</type> <name>reference</name></param> + </command> + <command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdBindDescriptorSets</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkPipelineBindPoint</type> <name>pipelineBindPoint</name></param> + <param><type>VkPipelineLayout</type> <name>layout</name></param> + <param><type>uint32_t</type> <name>firstSet</name></param> + <param><type>uint32_t</type> <name>descriptorSetCount</name></param> + <param len="descriptorSetCount">const <type>VkDescriptorSet</type>* <name>pDescriptorSets</name></param> + <param optional="true"><type>uint32_t</type> <name>dynamicOffsetCount</name></param> + <param len="dynamicOffsetCount">const <type>uint32_t</type>* <name>pDynamicOffsets</name></param> + </command> + <command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdBindIndexBuffer</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkBuffer</type> <name>buffer</name></param> + <param><type>VkDeviceSize</type> <name>offset</name></param> + <param><type>VkIndexType</type> <name>indexType</name></param> + </command> + <command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdBindVertexBuffers</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>uint32_t</type> <name>firstBinding</name></param> + <param><type>uint32_t</type> <name>bindingCount</name></param> + <param len="bindingCount">const <type>VkBuffer</type>* <name>pBuffers</name></param> + <param len="bindingCount">const <type>VkDeviceSize</type>* <name>pOffsets</name></param> + </command> + <command queues="graphics" renderpass="inside" cmdbufferlevel="primary,secondary" pipeline="graphics"> + <proto><type>void</type> <name>vkCmdDraw</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>uint32_t</type> <name>vertexCount</name></param> + <param><type>uint32_t</type> <name>instanceCount</name></param> + <param><type>uint32_t</type> <name>firstVertex</name></param> + <param><type>uint32_t</type> <name>firstInstance</name></param> + </command> + <command queues="graphics" renderpass="inside" cmdbufferlevel="primary,secondary" pipeline="graphics"> + <proto><type>void</type> <name>vkCmdDrawIndexed</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>uint32_t</type> <name>indexCount</name></param> + <param><type>uint32_t</type> <name>instanceCount</name></param> + <param><type>uint32_t</type> <name>firstIndex</name></param> + <param><type>int32_t</type> <name>vertexOffset</name></param> + <param><type>uint32_t</type> <name>firstInstance</name></param> + </command> + <command queues="graphics" renderpass="inside" cmdbufferlevel="primary,secondary" pipeline="graphics"> + <proto><type>void</type> <name>vkCmdDrawIndirect</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkBuffer</type> <name>buffer</name></param> + <param><type>VkDeviceSize</type> <name>offset</name></param> + <param><type>uint32_t</type> <name>drawCount</name></param> + <param><type>uint32_t</type> <name>stride</name></param> + </command> + <command queues="graphics" renderpass="inside" cmdbufferlevel="primary,secondary" pipeline="graphics"> + <proto><type>void</type> <name>vkCmdDrawIndexedIndirect</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkBuffer</type> <name>buffer</name></param> + <param><type>VkDeviceSize</type> <name>offset</name></param> + <param><type>uint32_t</type> <name>drawCount</name></param> + <param><type>uint32_t</type> <name>stride</name></param> + </command> + <command queues="compute" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="compute"> + <proto><type>void</type> <name>vkCmdDispatch</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>uint32_t</type> <name>x</name></param> + <param><type>uint32_t</type> <name>y</name></param> + <param><type>uint32_t</type> <name>z</name></param> + </command> + <command queues="compute" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="compute"> + <proto><type>void</type> <name>vkCmdDispatchIndirect</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkBuffer</type> <name>buffer</name></param> + <param><type>VkDeviceSize</type> <name>offset</name></param> + </command> + <command queues="transfer,graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="transfer"> + <proto><type>void</type> <name>vkCmdCopyBuffer</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkBuffer</type> <name>srcBuffer</name></param> + <param><type>VkBuffer</type> <name>dstBuffer</name></param> + <param><type>uint32_t</type> <name>regionCount</name></param> + <param len="regionCount">const <type>VkBufferCopy</type>* <name>pRegions</name></param> + </command> + <command queues="transfer,graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="transfer"> + <proto><type>void</type> <name>vkCmdCopyImage</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkImage</type> <name>srcImage</name></param> + <param><type>VkImageLayout</type> <name>srcImageLayout</name></param> + <param><type>VkImage</type> <name>dstImage</name></param> + <param><type>VkImageLayout</type> <name>dstImageLayout</name></param> + <param><type>uint32_t</type> <name>regionCount</name></param> + <param len="regionCount">const <type>VkImageCopy</type>* <name>pRegions</name></param> + </command> + <command queues="graphics" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="transfer"> + <proto><type>void</type> <name>vkCmdBlitImage</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkImage</type> <name>srcImage</name></param> + <param><type>VkImageLayout</type> <name>srcImageLayout</name></param> + <param><type>VkImage</type> <name>dstImage</name></param> + <param><type>VkImageLayout</type> <name>dstImageLayout</name></param> + <param><type>uint32_t</type> <name>regionCount</name></param> + <param len="regionCount">const <type>VkImageBlit</type>* <name>pRegions</name></param> + <param><type>VkFilter</type> <name>filter</name></param> + </command> + <command queues="transfer,graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="transfer"> + <proto><type>void</type> <name>vkCmdCopyBufferToImage</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkBuffer</type> <name>srcBuffer</name></param> + <param><type>VkImage</type> <name>dstImage</name></param> + <param><type>VkImageLayout</type> <name>dstImageLayout</name></param> + <param><type>uint32_t</type> <name>regionCount</name></param> + <param len="regionCount">const <type>VkBufferImageCopy</type>* <name>pRegions</name></param> + </command> + <command queues="transfer,graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="transfer"> + <proto><type>void</type> <name>vkCmdCopyImageToBuffer</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkImage</type> <name>srcImage</name></param> + <param><type>VkImageLayout</type> <name>srcImageLayout</name></param> + <param><type>VkBuffer</type> <name>dstBuffer</name></param> + <param><type>uint32_t</type> <name>regionCount</name></param> + <param len="regionCount">const <type>VkBufferImageCopy</type>* <name>pRegions</name></param> + </command> + <command queues="transfer,graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="transfer"> + <proto><type>void</type> <name>vkCmdUpdateBuffer</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkBuffer</type> <name>dstBuffer</name></param> + <param><type>VkDeviceSize</type> <name>dstOffset</name></param> + <param><type>VkDeviceSize</type> <name>dataSize</name></param> + <param len="dataSize">const <type>void</type>* <name>pData</name></param> + </command> + <command queues="transfer,graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="transfer" comment="transfer support is only available when VK_KHR_maintenance1 is enabled, as documented in valid usage language in the specification"> + <proto><type>void</type> <name>vkCmdFillBuffer</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkBuffer</type> <name>dstBuffer</name></param> + <param><type>VkDeviceSize</type> <name>dstOffset</name></param> + <param><type>VkDeviceSize</type> <name>size</name></param> + <param><type>uint32_t</type> <name>data</name></param> + </command> + <command queues="graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="transfer"> + <proto><type>void</type> <name>vkCmdClearColorImage</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkImage</type> <name>image</name></param> + <param><type>VkImageLayout</type> <name>imageLayout</name></param> + <param>const <type>VkClearColorValue</type>* <name>pColor</name></param> + <param><type>uint32_t</type> <name>rangeCount</name></param> + <param len="rangeCount">const <type>VkImageSubresourceRange</type>* <name>pRanges</name></param> + </command> + <command queues="graphics" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="transfer"> + <proto><type>void</type> <name>vkCmdClearDepthStencilImage</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkImage</type> <name>image</name></param> + <param><type>VkImageLayout</type> <name>imageLayout</name></param> + <param>const <type>VkClearDepthStencilValue</type>* <name>pDepthStencil</name></param> + <param><type>uint32_t</type> <name>rangeCount</name></param> + <param len="rangeCount">const <type>VkImageSubresourceRange</type>* <name>pRanges</name></param> + </command> + <command queues="graphics" renderpass="inside" cmdbufferlevel="primary,secondary" pipeline="graphics"> + <proto><type>void</type> <name>vkCmdClearAttachments</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>uint32_t</type> <name>attachmentCount</name></param> + <param len="attachmentCount">const <type>VkClearAttachment</type>* <name>pAttachments</name></param> + <param><type>uint32_t</type> <name>rectCount</name></param> + <param len="rectCount">const <type>VkClearRect</type>* <name>pRects</name></param> + </command> + <command queues="graphics" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="transfer"> + <proto><type>void</type> <name>vkCmdResolveImage</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkImage</type> <name>srcImage</name></param> + <param><type>VkImageLayout</type> <name>srcImageLayout</name></param> + <param><type>VkImage</type> <name>dstImage</name></param> + <param><type>VkImageLayout</type> <name>dstImageLayout</name></param> + <param><type>uint32_t</type> <name>regionCount</name></param> + <param len="regionCount">const <type>VkImageResolve</type>* <name>pRegions</name></param> + </command> + <command queues="graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdSetEvent</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkEvent</type> <name>event</name></param> + <param><type>VkPipelineStageFlags</type> <name>stageMask</name></param> + </command> + <command queues="graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdResetEvent</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkEvent</type> <name>event</name></param> + <param><type>VkPipelineStageFlags</type> <name>stageMask</name></param> + </command> + <command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdWaitEvents</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>uint32_t</type> <name>eventCount</name></param> + <param len="eventCount">const <type>VkEvent</type>* <name>pEvents</name></param> + <param><type>VkPipelineStageFlags</type> <name>srcStageMask</name></param> + <param><type>VkPipelineStageFlags</type> <name>dstStageMask</name></param> + <param optional="true"><type>uint32_t</type> <name>memoryBarrierCount</name></param> + <param len="memoryBarrierCount">const <type>VkMemoryBarrier</type>* <name>pMemoryBarriers</name></param> + <param optional="true"><type>uint32_t</type> <name>bufferMemoryBarrierCount</name></param> + <param len="bufferMemoryBarrierCount">const <type>VkBufferMemoryBarrier</type>* <name>pBufferMemoryBarriers</name></param> + <param optional="true"><type>uint32_t</type> <name>imageMemoryBarrierCount</name></param> + <param len="imageMemoryBarrierCount">const <type>VkImageMemoryBarrier</type>* <name>pImageMemoryBarriers</name></param> + </command> + <command queues="transfer,graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdPipelineBarrier</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkPipelineStageFlags</type> <name>srcStageMask</name></param> + <param><type>VkPipelineStageFlags</type> <name>dstStageMask</name></param> + <param optional="true"><type>VkDependencyFlags</type> <name>dependencyFlags</name></param> + <param optional="true"><type>uint32_t</type> <name>memoryBarrierCount</name></param> + <param len="memoryBarrierCount">const <type>VkMemoryBarrier</type>* <name>pMemoryBarriers</name></param> + <param optional="true"><type>uint32_t</type> <name>bufferMemoryBarrierCount</name></param> + <param len="bufferMemoryBarrierCount">const <type>VkBufferMemoryBarrier</type>* <name>pBufferMemoryBarriers</name></param> + <param optional="true"><type>uint32_t</type> <name>imageMemoryBarrierCount</name></param> + <param len="imageMemoryBarrierCount">const <type>VkImageMemoryBarrier</type>* <name>pImageMemoryBarriers</name></param> + </command> + <command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdBeginQuery</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkQueryPool</type> <name>queryPool</name></param> + <param><type>uint32_t</type> <name>query</name></param> + <param optional="true"><type>VkQueryControlFlags</type> <name>flags</name></param> + </command> + <command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdEndQuery</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkQueryPool</type> <name>queryPool</name></param> + <param><type>uint32_t</type> <name>query</name></param> + </command> + <command queues="graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdResetQueryPool</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkQueryPool</type> <name>queryPool</name></param> + <param><type>uint32_t</type> <name>firstQuery</name></param> + <param><type>uint32_t</type> <name>queryCount</name></param> + </command> + <command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary" pipeline="transfer"> + <proto><type>void</type> <name>vkCmdWriteTimestamp</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkPipelineStageFlagBits</type> <name>pipelineStage</name></param> + <param><type>VkQueryPool</type> <name>queryPool</name></param> + <param><type>uint32_t</type> <name>query</name></param> + </command> + <command queues="graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="transfer"> + <proto><type>void</type> <name>vkCmdCopyQueryPoolResults</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkQueryPool</type> <name>queryPool</name></param> + <param><type>uint32_t</type> <name>firstQuery</name></param> + <param><type>uint32_t</type> <name>queryCount</name></param> + <param><type>VkBuffer</type> <name>dstBuffer</name></param> + <param><type>VkDeviceSize</type> <name>dstOffset</name></param> + <param><type>VkDeviceSize</type> <name>stride</name></param> + <param optional="true"><type>VkQueryResultFlags</type> <name>flags</name></param> + </command> + <command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdPushConstants</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkPipelineLayout</type> <name>layout</name></param> + <param><type>VkShaderStageFlags</type> <name>stageFlags</name></param> + <param><type>uint32_t</type> <name>offset</name></param> + <param><type>uint32_t</type> <name>size</name></param> + <param len="size">const <type>void</type>* <name>pValues</name></param> + </command> + <command queues="graphics" renderpass="outside" cmdbufferlevel="primary" pipeline="graphics"> + <proto><type>void</type> <name>vkCmdBeginRenderPass</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param>const <type>VkRenderPassBeginInfo</type>* <name>pRenderPassBegin</name></param> + <param><type>VkSubpassContents</type> <name>contents</name></param> + </command> + <command queues="graphics" renderpass="inside" cmdbufferlevel="primary" pipeline="graphics"> + <proto><type>void</type> <name>vkCmdNextSubpass</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkSubpassContents</type> <name>contents</name></param> + </command> + <command queues="graphics" renderpass="inside" cmdbufferlevel="primary" pipeline="graphics"> + <proto><type>void</type> <name>vkCmdEndRenderPass</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + </command> + <command queues="transfer,graphics,compute" renderpass="both" cmdbufferlevel="primary"> + <proto><type>void</type> <name>vkCmdExecuteCommands</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>uint32_t</type> <name>commandBufferCount</name></param> + <param len="commandBufferCount">const <type>VkCommandBuffer</type>* <name>pCommandBuffers</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_NATIVE_WINDOW_IN_USE_KHR"> + <proto><type>VkResult</type> <name>vkCreateAndroidSurfaceKHR</name></proto> + <param><type>VkInstance</type> <name>instance</name></param> + <param>const <type>VkAndroidSurfaceCreateInfoKHR</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkSurfaceKHR</type>* <name>pSurface</name></param> + </command> + <command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkGetPhysicalDeviceDisplayPropertiesKHR</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param optional="false,true"><type>uint32_t</type>* <name>pPropertyCount</name></param> + <param optional="true" len="pPropertyCount"><type>VkDisplayPropertiesKHR</type>* <name>pProperties</name></param> + </command> + <command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkGetPhysicalDeviceDisplayPlanePropertiesKHR</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param optional="false,true"><type>uint32_t</type>* <name>pPropertyCount</name></param> + <param optional="true" len="pPropertyCount"><type>VkDisplayPlanePropertiesKHR</type>* <name>pProperties</name></param> + </command> + <command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkGetDisplayPlaneSupportedDisplaysKHR</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>uint32_t</type> <name>planeIndex</name></param> + <param optional="false,true"><type>uint32_t</type>* <name>pDisplayCount</name></param> + <param optional="true" len="pDisplayCount"><type>VkDisplayKHR</type>* <name>pDisplays</name></param> + </command> + <command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkGetDisplayModePropertiesKHR</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>VkDisplayKHR</type> <name>display</name></param> + <param optional="false,true"><type>uint32_t</type>* <name>pPropertyCount</name></param> + <param optional="true" len="pPropertyCount"><type>VkDisplayModePropertiesKHR</type>* <name>pProperties</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INITIALIZATION_FAILED"> + <proto><type>VkResult</type> <name>vkCreateDisplayModeKHR</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param externsync="true"><type>VkDisplayKHR</type> <name>display</name></param> + <param>const <type>VkDisplayModeCreateInfoKHR</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkDisplayModeKHR</type>* <name>pMode</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkGetDisplayPlaneCapabilitiesKHR</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param externsync="true"><type>VkDisplayModeKHR</type> <name>mode</name></param> + <param><type>uint32_t</type> <name>planeIndex</name></param> + <param><type>VkDisplayPlaneCapabilitiesKHR</type>* <name>pCapabilities</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateDisplayPlaneSurfaceKHR</name></proto> + <param><type>VkInstance</type> <name>instance</name></param> + <param>const <type>VkDisplaySurfaceCreateInfoKHR</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkSurfaceKHR</type>* <name>pSurface</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INCOMPATIBLE_DISPLAY_KHR,VK_ERROR_DEVICE_LOST,VK_ERROR_SURFACE_LOST_KHR"> + <proto><type>VkResult</type> <name>vkCreateSharedSwapchainsKHR</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param><type>uint32_t</type> <name>swapchainCount</name></param> + <param len="swapchainCount" externsync="pCreateInfos[].surface,pCreateInfos[].oldSwapchain">const <type>VkSwapchainCreateInfoKHR</type>* <name>pCreateInfos</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param len="swapchainCount"><type>VkSwapchainKHR</type>* <name>pSwapchains</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateMirSurfaceKHR</name></proto> + <param><type>VkInstance</type> <name>instance</name></param> + <param>const <type>VkMirSurfaceCreateInfoKHR</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkSurfaceKHR</type>* <name>pSurface</name></param> + </command> + <command> + <proto><type>VkBool32</type> <name>vkGetPhysicalDeviceMirPresentationSupportKHR</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>uint32_t</type> <name>queueFamilyIndex</name></param> + <param><type>MirConnection</type>* <name>connection</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDestroySurfaceKHR</name></proto> + <param><type>VkInstance</type> <name>instance</name></param> + <param optional="true" externsync="true"><type>VkSurfaceKHR</type> <name>surface</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_SURFACE_LOST_KHR"> + <proto><type>VkResult</type> <name>vkGetPhysicalDeviceSurfaceSupportKHR</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>uint32_t</type> <name>queueFamilyIndex</name></param> + <param><type>VkSurfaceKHR</type> <name>surface</name></param> + <param><type>VkBool32</type>* <name>pSupported</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_SURFACE_LOST_KHR"> + <proto><type>VkResult</type> <name>vkGetPhysicalDeviceSurfaceCapabilitiesKHR</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>VkSurfaceKHR</type> <name>surface</name></param> + <param><type>VkSurfaceCapabilitiesKHR</type>* <name>pSurfaceCapabilities</name></param> + </command> + <command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_SURFACE_LOST_KHR"> + <proto><type>VkResult</type> <name>vkGetPhysicalDeviceSurfaceFormatsKHR</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>VkSurfaceKHR</type> <name>surface</name></param> + <param optional="false,true"><type>uint32_t</type>* <name>pSurfaceFormatCount</name></param> + <param optional="true" len="pSurfaceFormatCount"><type>VkSurfaceFormatKHR</type>* <name>pSurfaceFormats</name></param> + </command> + <command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_SURFACE_LOST_KHR"> + <proto><type>VkResult</type> <name>vkGetPhysicalDeviceSurfacePresentModesKHR</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>VkSurfaceKHR</type> <name>surface</name></param> + <param optional="false,true"><type>uint32_t</type>* <name>pPresentModeCount</name></param> + <param optional="true" len="pPresentModeCount"><type>VkPresentModeKHR</type>* <name>pPresentModes</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST,VK_ERROR_SURFACE_LOST_KHR,VK_ERROR_NATIVE_WINDOW_IN_USE_KHR"> + <proto><type>VkResult</type> <name>vkCreateSwapchainKHR</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param externsync="pCreateInfo.surface,pCreateInfo.oldSwapchain">const <type>VkSwapchainCreateInfoKHR</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkSwapchainKHR</type>* <name>pSwapchain</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDestroySwapchainKHR</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true" externsync="true"><type>VkSwapchainKHR</type> <name>swapchain</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + </command> + <command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkGetSwapchainImagesKHR</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param><type>VkSwapchainKHR</type> <name>swapchain</name></param> + <param optional="false,true"><type>uint32_t</type>* <name>pSwapchainImageCount</name></param> + <param optional="true" len="pSwapchainImageCount"><type>VkImage</type>* <name>pSwapchainImages</name></param> + </command> + <command successcodes="VK_SUCCESS,VK_TIMEOUT,VK_NOT_READY,VK_SUBOPTIMAL_KHR" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST,VK_ERROR_OUT_OF_DATE_KHR,VK_ERROR_SURFACE_LOST_KHR"> + <proto><type>VkResult</type> <name>vkAcquireNextImageKHR</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param externsync="true"><type>VkSwapchainKHR</type> <name>swapchain</name></param> + <param><type>uint64_t</type> <name>timeout</name></param> + <param optional="true" externsync="true"><type>VkSemaphore</type> <name>semaphore</name></param> + <param optional="true" externsync="true"><type>VkFence</type> <name>fence</name></param> + <param><type>uint32_t</type>* <name>pImageIndex</name></param> + </command> + <command successcodes="VK_SUCCESS,VK_SUBOPTIMAL_KHR" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST,VK_ERROR_OUT_OF_DATE_KHR,VK_ERROR_SURFACE_LOST_KHR"> + <proto><type>VkResult</type> <name>vkQueuePresentKHR</name></proto> + <param externsync="true"><type>VkQueue</type> <name>queue</name></param> + <param externsync="pPresentInfo.pWaitSemaphores[],pPresentInfo.pSwapchains[]">const <type>VkPresentInfoKHR</type>* <name>pPresentInfo</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_NATIVE_WINDOW_IN_USE_KHR"> + <proto><type>VkResult</type> <name>vkCreateViSurfaceNN</name></proto> + <param><type>VkInstance</type> <name>instance</name></param> + <param>const <type>VkViSurfaceCreateInfoNN</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkSurfaceKHR</type>* <name>pSurface</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateWaylandSurfaceKHR</name></proto> + <param><type>VkInstance</type> <name>instance</name></param> + <param>const <type>VkWaylandSurfaceCreateInfoKHR</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkSurfaceKHR</type>* <name>pSurface</name></param> + </command> + <command> + <proto><type>VkBool32</type> <name>vkGetPhysicalDeviceWaylandPresentationSupportKHR</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>uint32_t</type> <name>queueFamilyIndex</name></param> + <param>struct <type>wl_display</type>* <name>display</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateWin32SurfaceKHR</name></proto> + <param><type>VkInstance</type> <name>instance</name></param> + <param>const <type>VkWin32SurfaceCreateInfoKHR</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkSurfaceKHR</type>* <name>pSurface</name></param> + </command> + <command> + <proto><type>VkBool32</type> <name>vkGetPhysicalDeviceWin32PresentationSupportKHR</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>uint32_t</type> <name>queueFamilyIndex</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateXlibSurfaceKHR</name></proto> + <param><type>VkInstance</type> <name>instance</name></param> + <param>const <type>VkXlibSurfaceCreateInfoKHR</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkSurfaceKHR</type>* <name>pSurface</name></param> + </command> + <command> + <proto><type>VkBool32</type> <name>vkGetPhysicalDeviceXlibPresentationSupportKHR</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>uint32_t</type> <name>queueFamilyIndex</name></param> + <param><type>Display</type>* <name>dpy</name></param> + <param><type>VisualID</type> <name>visualID</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateXcbSurfaceKHR</name></proto> + <param><type>VkInstance</type> <name>instance</name></param> + <param>const <type>VkXcbSurfaceCreateInfoKHR</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkSurfaceKHR</type>* <name>pSurface</name></param> + </command> + <command> + <proto><type>VkBool32</type> <name>vkGetPhysicalDeviceXcbPresentationSupportKHR</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>uint32_t</type> <name>queueFamilyIndex</name></param> + <param><type>xcb_connection_t</type>* <name>connection</name></param> + <param><type>xcb_visualid_t</type> <name>visual_id</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateDebugReportCallbackEXT</name></proto> + <param><type>VkInstance</type> <name>instance</name></param> + <param>const <type>VkDebugReportCallbackCreateInfoEXT</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkDebugReportCallbackEXT</type>* <name>pCallback</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDestroyDebugReportCallbackEXT</name></proto> + <param><type>VkInstance</type> <name>instance</name></param> + <param externsync="true"><type>VkDebugReportCallbackEXT</type> <name>callback</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDebugReportMessageEXT</name></proto> + <param><type>VkInstance</type> <name>instance</name></param> + <param><type>VkDebugReportFlagsEXT</type> <name>flags</name></param> + <param><type>VkDebugReportObjectTypeEXT</type> <name>objectType</name></param> + <param><type>uint64_t</type> <name>object</name></param> + <param><type>size_t</type> <name>location</name></param> + <param><type>int32_t</type> <name>messageCode</name></param> + <param len="null-terminated">const <type>char</type>* <name>pLayerPrefix</name></param> + <param len="null-terminated">const <type>char</type>* <name>pMessage</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkDebugMarkerSetObjectNameEXT</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param externsync="pNameInfo.object"><type>VkDebugMarkerObjectNameInfoEXT</type>* <name>pNameInfo</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkDebugMarkerSetObjectTagEXT</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param externsync="pTagInfo.object"><type>VkDebugMarkerObjectTagInfoEXT</type>* <name>pTagInfo</name></param> + </command> + <command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdDebugMarkerBeginEXT</name></proto> + <param><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkDebugMarkerMarkerInfoEXT</type>* <name>pMarkerInfo</name></param> + </command> + <command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdDebugMarkerEndEXT</name></proto> + <param><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + </command> + <command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdDebugMarkerInsertEXT</name></proto> + <param><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkDebugMarkerMarkerInfoEXT</type>* <name>pMarkerInfo</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_FORMAT_NOT_SUPPORTED"> + <proto><type>VkResult</type> <name>vkGetPhysicalDeviceExternalImageFormatPropertiesNV</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>VkFormat</type> <name>format</name></param> + <param><type>VkImageType</type> <name>type</name></param> + <param><type>VkImageTiling</type> <name>tiling</name></param> + <param><type>VkImageUsageFlags</type> <name>usage</name></param> + <param optional="true"><type>VkImageCreateFlags</type> <name>flags</name></param> + <param optional="true"><type>VkExternalMemoryHandleTypeFlagsNV</type> <name>externalHandleType</name></param> + <param><type>VkExternalImageFormatPropertiesNV</type>* <name>pExternalImageFormatProperties</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_TOO_MANY_OBJECTS,VK_ERROR_OUT_OF_HOST_MEMORY"> + <proto><type>VkResult</type> <name>vkGetMemoryWin32HandleNV</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param><type>VkDeviceMemory</type> <name>memory</name></param> + <param><type>VkExternalMemoryHandleTypeFlagsNV</type> <name>handleType</name></param> + <param><type>HANDLE</type>* <name>pHandle</name></param> + </command> + <command queues="graphics" renderpass="inside" cmdbufferlevel="primary,secondary" pipeline="graphics"> + <proto><type>void</type> <name>vkCmdDrawIndirectCountAMD</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkBuffer</type> <name>buffer</name></param> + <param><type>VkDeviceSize</type> <name>offset</name></param> + <param><type>VkBuffer</type> <name>countBuffer</name></param> + <param><type>VkDeviceSize</type> <name>countBufferOffset</name></param> + <param><type>uint32_t</type> <name>maxDrawCount</name></param> + <param><type>uint32_t</type> <name>stride</name></param> + </command> + <command queues="graphics" renderpass="inside" cmdbufferlevel="primary,secondary" pipeline="graphics"> + <proto><type>void</type> <name>vkCmdDrawIndexedIndirectCountAMD</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkBuffer</type> <name>buffer</name></param> + <param><type>VkDeviceSize</type> <name>offset</name></param> + <param><type>VkBuffer</type> <name>countBuffer</name></param> + <param><type>VkDeviceSize</type> <name>countBufferOffset</name></param> + <param><type>uint32_t</type> <name>maxDrawCount</name></param> + <param><type>uint32_t</type> <name>stride</name></param> + </command> + <command queues="graphics,compute" renderpass="inside" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdProcessCommandsNVX</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param>const <type>VkCmdProcessCommandsInfoNVX</type>* <name>pProcessCommandsInfo</name></param> + </command> + <command queues="graphics,compute" renderpass="inside" cmdbufferlevel="secondary"> + <proto><type>void</type> <name>vkCmdReserveSpaceForCommandsNVX</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param>const <type>VkCmdReserveSpaceForCommandsInfoNVX</type>* <name>pReserveSpaceInfo</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateIndirectCommandsLayoutNVX</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param>const <type>VkIndirectCommandsLayoutCreateInfoNVX</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkIndirectCommandsLayoutNVX</type>* <name>pIndirectCommandsLayout</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDestroyIndirectCommandsLayoutNVX</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param><type>VkIndirectCommandsLayoutNVX</type> <name>indirectCommandsLayout</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateObjectTableNVX</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param>const <type>VkObjectTableCreateInfoNVX</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkObjectTableNVX</type>* <name>pObjectTable</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDestroyObjectTableNVX</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param externsync="true"><type>VkObjectTableNVX</type> <name>objectTable</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkRegisterObjectsNVX</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param externsync="true"><type>VkObjectTableNVX</type> <name>objectTable</name></param> + <param><type>uint32_t</type> <name>objectCount</name></param> + <param len="objectCount">const <type>VkObjectTableEntryNVX</type>* const* <name>ppObjectTableEntries</name></param> + <param len="objectCount">const <type>uint32_t</type>* <name>pObjectIndices</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkUnregisterObjectsNVX</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param externsync="true"><type>VkObjectTableNVX</type> <name>objectTable</name></param> + <param><type>uint32_t</type> <name>objectCount</name></param> + <param len="objectCount">const <type>VkObjectEntryTypeNVX</type>* <name>pObjectEntryTypes</name></param> + <param len="objectCount">const <type>uint32_t</type>* <name>pObjectIndices</name></param> + </command> + <command> + <proto><type>void</type> <name>vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>VkDeviceGeneratedCommandsFeaturesNVX</type>* <name>pFeatures</name></param> + <param><type>VkDeviceGeneratedCommandsLimitsNVX</type>* <name>pLimits</name></param> + </command> + <command> + <proto><type>void</type> <name>vkGetPhysicalDeviceFeatures2KHR</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>VkPhysicalDeviceFeatures2KHR</type>* <name>pFeatures</name></param> + </command> + <command> + <proto><type>void</type> <name>vkGetPhysicalDeviceProperties2KHR</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>VkPhysicalDeviceProperties2KHR</type>* <name>pProperties</name></param> + </command> + <command> + <proto><type>void</type> <name>vkGetPhysicalDeviceFormatProperties2KHR</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>VkFormat</type> <name>format</name></param> + <param><type>VkFormatProperties2KHR</type>* <name>pFormatProperties</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_FORMAT_NOT_SUPPORTED"> + <proto><type>VkResult</type> <name>vkGetPhysicalDeviceImageFormatProperties2KHR</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param>const <type>VkPhysicalDeviceImageFormatInfo2KHR</type>* <name>pImageFormatInfo</name></param> + <param><type>VkImageFormatProperties2KHR</type>* <name>pImageFormatProperties</name></param> + </command> + <command> + <proto><type>void</type> <name>vkGetPhysicalDeviceQueueFamilyProperties2KHR</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param optional="false,true"><type>uint32_t</type>* <name>pQueueFamilyPropertyCount</name></param> + <param optional="true" len="pQueueFamilyPropertyCount"><type>VkQueueFamilyProperties2KHR</type>* <name>pQueueFamilyProperties</name></param> + </command> + <command> + <proto><type>void</type> <name>vkGetPhysicalDeviceMemoryProperties2KHR</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>VkPhysicalDeviceMemoryProperties2KHR</type>* <name>pMemoryProperties</name></param> + </command> + <command> + <proto><type>void</type> <name>vkGetPhysicalDeviceSparseImageFormatProperties2KHR</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param>const <type>VkPhysicalDeviceSparseImageFormatInfo2KHR</type>* <name>pFormatInfo</name></param> + <param optional="false,true"><type>uint32_t</type>* <name>pPropertyCount</name></param> + <param optional="true" len="pPropertyCount"><type>VkSparseImageFormatProperties2KHR</type>* <name>pProperties</name></param> + </command> + <command> + <proto><type>void</type> <name>vkTrimCommandPoolKHR</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param externsync="true"><type>VkCommandPool</type> <name>commandPool</name></param> + <param optional="true"><type>VkCommandPoolTrimFlagsKHR</type> <name>flags</name></param> + </command> + <command successcodes="VK_SUCCESS"> + <proto><type>VkResult</type> <name>vkReleaseDisplayEXT</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>VkDisplayKHR</type> <name>display</name></param> + </command> + <command successcodes="VK_SUCCESS"> + <proto><type>VkResult</type> <name>vkAcquireXlibDisplayEXT</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>Display</type>* <name>dpy</name></param> + <param><type>VkDisplayKHR</type> <name>display</name></param> + </command> + <command successcodes="VK_SUCCESS"> + <proto><type>VkResult</type> <name>vkGetRandROutputDisplayEXT</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>Display</type>* <name>dpy</name></param> + <param><type>RROutput</type> <name>rrOutput</name></param> + <param><type>VkDisplayKHR</type>* <name>pDisplay</name></param> + </command> + <command successcodes="VK_SUCCESS"> + <proto><type>VkResult</type> <name>vkDisplayPowerControlEXT</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param><type>VkDisplayKHR</type> <name>display</name></param> + <param>const <type>VkDisplayPowerInfoEXT</type>* <name>pDisplayPowerInfo</name></param> + </command> + <command successcodes="VK_SUCCESS"> + <proto><type>VkResult</type> <name>vkRegisterDeviceEventEXT</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param>const <type>VkDeviceEventInfoEXT</type>* <name>pDeviceEventInfo</name></param> + <param>const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkFence</type>* <name>pFence</name></param> + </command> + <command successcodes="VK_SUCCESS"> + <proto><type>VkResult</type> <name>vkRegisterDisplayEventEXT</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param><type>VkDisplayKHR</type> <name>display</name></param> + <param>const <type>VkDisplayEventInfoEXT</type>* <name>pDisplayEventInfo</name></param> + <param>const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkFence</type>* <name>pFence</name></param> + </command> + <command successcodes="VK_SUCCESS,VK_ERROR_DEVICE_LOST,VK_ERROR_OUT_OF_DATE_KHR"> + <proto><type>VkResult</type> <name>vkGetSwapchainCounterEXT</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param><type>VkSwapchainKHR</type> <name>swapchain</name></param> + <param><type>VkSurfaceCounterFlagBitsEXT</type> <name>counter</name></param> + <param><type>uint64_t</type>* <name>pCounterValue</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_SURFACE_LOST_KHR"> + <proto><type>VkResult</type> <name>vkGetPhysicalDeviceSurfaceCapabilities2EXT</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>VkSurfaceKHR</type> <name>surface</name></param> + <param><type>VkSurfaceCapabilities2EXT</type>* <name>pSurfaceCapabilities</name></param> + </command> + </commands> + + <!-- SECTION: Vulkan API interface definitions --> + <feature api="vulkan" name="VK_VERSION_1_0" number="1.0"> + <require comment="Header boilerplate"> + <type name="vk_platform"/> + </require> + <require comment="API version"> + <type name="VK_API_VERSION"/> + <type name="VK_API_VERSION_1_0"/> + <type name="VK_VERSION_MAJOR"/> + <type name="VK_VERSION_MINOR"/> + <type name="VK_VERSION_PATCH"/> + <type name="VK_HEADER_VERSION"/> + </require> + <require comment="API constants"> + <enum name="VK_LOD_CLAMP_NONE"/> + <enum name="VK_REMAINING_MIP_LEVELS"/> + <enum name="VK_REMAINING_ARRAY_LAYERS"/> + <enum name="VK_WHOLE_SIZE"/> + <enum name="VK_ATTACHMENT_UNUSED"/> + <enum name="VK_TRUE"/> + <enum name="VK_FALSE"/> + <type name="VK_NULL_HANDLE"/> + <enum name="VK_QUEUE_FAMILY_IGNORED"/> + <enum name="VK_SUBPASS_EXTERNAL"/> + <type name="VkPipelineCacheHeaderVersion"/> + </require> + <require comment="Device initialization"> + <command name="vkCreateInstance"/> + <command name="vkDestroyInstance"/> + <command name="vkEnumeratePhysicalDevices"/> + <command name="vkGetPhysicalDeviceFeatures"/> + <command name="vkGetPhysicalDeviceFormatProperties"/> + <command name="vkGetPhysicalDeviceImageFormatProperties"/> + <command name="vkGetPhysicalDeviceProperties"/> + <command name="vkGetPhysicalDeviceQueueFamilyProperties"/> + <command name="vkGetPhysicalDeviceMemoryProperties"/> + <command name="vkGetInstanceProcAddr"/> + <command name="vkGetDeviceProcAddr"/> + </require> + <require comment="Device commands"> + <command name="vkCreateDevice"/> + <command name="vkDestroyDevice"/> + </require> + <require comment="Extension discovery commands"> + <command name="vkEnumerateInstanceExtensionProperties"/> + <command name="vkEnumerateDeviceExtensionProperties"/> + </require> + <require comment="Layer discovery commands"> + <command name="vkEnumerateInstanceLayerProperties"/> + <command name="vkEnumerateDeviceLayerProperties"/> + </require> + <require comment="queue commands"> + <command name="vkGetDeviceQueue"/> + <command name="vkQueueSubmit"/> + <command name="vkQueueWaitIdle"/> + <command name="vkDeviceWaitIdle"/> + </require> + <require comment="Memory commands"> + <command name="vkAllocateMemory"/> + <command name="vkFreeMemory"/> + <command name="vkMapMemory"/> + <command name="vkUnmapMemory"/> + <command name="vkFlushMappedMemoryRanges"/> + <command name="vkInvalidateMappedMemoryRanges"/> + <command name="vkGetDeviceMemoryCommitment"/> + </require> + <require comment="Memory management API commands"> + <command name="vkBindBufferMemory"/> + <command name="vkBindImageMemory"/> + <command name="vkGetBufferMemoryRequirements"/> + <command name="vkGetImageMemoryRequirements"/> + </require> + <require comment="Sparse resource memory management API commands"> + <command name="vkGetImageSparseMemoryRequirements"/> + <command name="vkGetPhysicalDeviceSparseImageFormatProperties"/> + <command name="vkQueueBindSparse"/> + </require> + <require comment="Fence commands"> + <command name="vkCreateFence"/> + <command name="vkDestroyFence"/> + <command name="vkResetFences"/> + <command name="vkGetFenceStatus"/> + <command name="vkWaitForFences"/> + </require> + <require comment="Queue semaphore commands"> + <command name="vkCreateSemaphore"/> + <command name="vkDestroySemaphore"/> + </require> + <require comment="Event commands"> + <command name="vkCreateEvent"/> + <command name="vkDestroyEvent"/> + <command name="vkGetEventStatus"/> + <command name="vkSetEvent"/> + <command name="vkResetEvent"/> + </require> + <require comment="Query commands"> + <command name="vkCreateQueryPool"/> + <command name="vkDestroyQueryPool"/> + <command name="vkGetQueryPoolResults"/> + </require> + <require comment="Buffer commands"> + <command name="vkCreateBuffer"/> + <command name="vkDestroyBuffer"/> + </require> + <require comment="Buffer view commands"> + <command name="vkCreateBufferView"/> + <command name="vkDestroyBufferView"/> + </require> + <require comment="Image commands"> + <command name="vkCreateImage"/> + <command name="vkDestroyImage"/> + <command name="vkGetImageSubresourceLayout"/> + </require> + <require comment="Image view commands"> + <command name="vkCreateImageView"/> + <command name="vkDestroyImageView"/> + </require> + <require comment="Shader commands"> + <command name="vkCreateShaderModule"/> + <command name="vkDestroyShaderModule"/> + </require> + <require comment="Pipeline Cache commands"> + <command name="vkCreatePipelineCache"/> + <command name="vkDestroyPipelineCache"/> + <command name="vkGetPipelineCacheData"/> + <command name="vkMergePipelineCaches"/> + </require> + <require comment="Pipeline commands"> + <command name="vkCreateGraphicsPipelines"/> + <command name="vkCreateComputePipelines"/> + <command name="vkDestroyPipeline"/> + </require> + <require comment="Pipeline layout commands"> + <command name="vkCreatePipelineLayout"/> + <command name="vkDestroyPipelineLayout"/> + </require> + <require comment="Sampler commands"> + <command name="vkCreateSampler"/> + <command name="vkDestroySampler"/> + </require> + <require comment="Descriptor set commands"> + <command name="vkCreateDescriptorSetLayout"/> + <command name="vkDestroyDescriptorSetLayout"/> + <command name="vkCreateDescriptorPool"/> + <command name="vkDestroyDescriptorPool"/> + <command name="vkResetDescriptorPool"/> + <command name="vkAllocateDescriptorSets"/> + <command name="vkFreeDescriptorSets"/> + <command name="vkUpdateDescriptorSets"/> + </require> + <require comment="Pass commands"> + <command name="vkCreateFramebuffer"/> + <command name="vkDestroyFramebuffer"/> + <command name="vkCreateRenderPass"/> + <command name="vkDestroyRenderPass"/> + <command name="vkGetRenderAreaGranularity"/> + </require> + <require comment="Command pool commands"> + <command name="vkCreateCommandPool"/> + <command name="vkDestroyCommandPool"/> + <command name="vkResetCommandPool"/> + </require> + <require comment="Command buffer commands"> + <command name="vkAllocateCommandBuffers"/> + <command name="vkFreeCommandBuffers"/> + <command name="vkBeginCommandBuffer"/> + <command name="vkEndCommandBuffer"/> + <command name="vkResetCommandBuffer"/> + </require> + <require comment="Command buffer building commands"> + <command name="vkCmdBindPipeline"/> + <command name="vkCmdSetViewport"/> + <command name="vkCmdSetScissor"/> + <command name="vkCmdSetLineWidth"/> + <command name="vkCmdSetDepthBias"/> + <command name="vkCmdSetBlendConstants"/> + <command name="vkCmdSetDepthBounds"/> + <command name="vkCmdSetStencilCompareMask"/> + <command name="vkCmdSetStencilWriteMask"/> + <command name="vkCmdSetStencilReference"/> + <command name="vkCmdBindDescriptorSets"/> + <command name="vkCmdBindIndexBuffer"/> + <command name="vkCmdBindVertexBuffers"/> + <command name="vkCmdDraw"/> + <command name="vkCmdDrawIndexed"/> + <command name="vkCmdDrawIndirect"/> + <command name="vkCmdDrawIndexedIndirect"/> + <command name="vkCmdDispatch"/> + <command name="vkCmdDispatchIndirect"/> + <command name="vkCmdCopyBuffer"/> + <command name="vkCmdCopyImage"/> + <command name="vkCmdBlitImage"/> + <command name="vkCmdCopyBufferToImage"/> + <command name="vkCmdCopyImageToBuffer"/> + <command name="vkCmdUpdateBuffer"/> + <command name="vkCmdFillBuffer"/> + <command name="vkCmdClearColorImage"/> + <command name="vkCmdClearDepthStencilImage"/> + <command name="vkCmdClearAttachments"/> + <command name="vkCmdResolveImage"/> + <command name="vkCmdSetEvent"/> + <command name="vkCmdResetEvent"/> + <command name="vkCmdWaitEvents"/> + <command name="vkCmdPipelineBarrier"/> + <command name="vkCmdBeginQuery"/> + <command name="vkCmdEndQuery"/> + <command name="vkCmdResetQueryPool"/> + <command name="vkCmdWriteTimestamp"/> + <command name="vkCmdCopyQueryPoolResults"/> + <command name="vkCmdPushConstants"/> + <command name="vkCmdBeginRenderPass"/> + <command name="vkCmdNextSubpass"/> + <command name="vkCmdEndRenderPass"/> + <command name="vkCmdExecuteCommands"/> + </require> + <require comment="Types not directly used by the API"> + <!-- Include <type name="typename"/> here for e.g. structs that + are not parameter types of commands, but still need to be + defined in the API. + --> + <type name="VkBufferMemoryBarrier"/> + <type name="VkDispatchIndirectCommand"/> + <type name="VkDrawIndexedIndirectCommand"/> + <type name="VkDrawIndirectCommand"/> + <type name="VkImageMemoryBarrier"/> + <type name="VkMemoryBarrier"/> + </require> + </feature> + + <!-- SECTION: Vulkan extension interface definitions --> + <extensions> + <!-- WSI extensions --> + <extension name="VK_KHR_surface" number="1" type="instance" supported="vulkan"> + <require> + <enum value="25" name="VK_KHR_SURFACE_SPEC_VERSION"/> + <enum value=""VK_KHR_surface"" name="VK_KHR_SURFACE_EXTENSION_NAME"/> + <enum offset="0" dir="-" extends="VkResult" name="VK_ERROR_SURFACE_LOST_KHR"/> + <enum offset="1" dir="-" extends="VkResult" name="VK_ERROR_NATIVE_WINDOW_IN_USE_KHR"/> + <enum value="VK_COLOR_SPACE_SRGB_NONLINEAR_KHR" name="VK_COLORSPACE_SRGB_NONLINEAR_KHR"/> + <command name="vkDestroySurfaceKHR"/> + <command name="vkGetPhysicalDeviceSurfaceSupportKHR"/> + <command name="vkGetPhysicalDeviceSurfaceCapabilitiesKHR"/> + <command name="vkGetPhysicalDeviceSurfaceFormatsKHR"/> + <command name="vkGetPhysicalDeviceSurfacePresentModesKHR"/> + </require> + </extension> + <extension name="VK_KHR_swapchain" number="2" type="device" requires="VK_KHR_surface" supported="vulkan"> + <require> + <enum value="68" name="VK_KHR_SWAPCHAIN_SPEC_VERSION"/> + <enum value=""VK_KHR_swapchain"" name="VK_KHR_SWAPCHAIN_EXTENSION_NAME"/> + <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR"/> + <enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PRESENT_INFO_KHR"/> + <enum offset="2" extends="VkImageLayout" name="VK_IMAGE_LAYOUT_PRESENT_SRC_KHR"/> + <enum offset="3" extends="VkResult" name="VK_SUBOPTIMAL_KHR"/> + <enum offset="4" dir="-" extends="VkResult" name="VK_ERROR_OUT_OF_DATE_KHR"/> + <command name="vkCreateSwapchainKHR"/> + <command name="vkDestroySwapchainKHR"/> + <command name="vkGetSwapchainImagesKHR"/> + <command name="vkAcquireNextImageKHR"/> + <command name="vkQueuePresentKHR"/> + </require> + </extension> + <extension name="VK_KHR_display" number="3" type="instance" requires="VK_KHR_surface" supported="vulkan"> + <require> + <enum value="21" name="VK_KHR_DISPLAY_SPEC_VERSION"/> + <enum value=""VK_KHR_display"" name="VK_KHR_DISPLAY_EXTENSION_NAME"/> + <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR"/> + <enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR"/> + <type name="VkDisplayPlaneAlphaFlagsKHR"/> + <type name="VkDisplayPlaneAlphaFlagBitsKHR"/> + <type name="VkDisplayPropertiesKHR"/> + <type name="VkDisplayModeParametersKHR"/> + <type name="VkDisplayModePropertiesKHR"/> + <type name="VkDisplayModeCreateInfoKHR"/> + <type name="VkDisplayPlaneCapabilitiesKHR"/> + <type name="VkDisplayPlanePropertiesKHR"/> + <type name="VkDisplaySurfaceCreateInfoKHR"/> + <command name="vkGetPhysicalDeviceDisplayPropertiesKHR"/> + <command name="vkGetPhysicalDeviceDisplayPlanePropertiesKHR"/> + <command name="vkGetDisplayPlaneSupportedDisplaysKHR"/> + <command name="vkGetDisplayModePropertiesKHR"/> + <command name="vkCreateDisplayModeKHR"/> + <command name="vkGetDisplayPlaneCapabilitiesKHR"/> + <command name="vkCreateDisplayPlaneSurfaceKHR"/> + </require> + </extension> + <extension name="VK_KHR_display_swapchain" number="4" type="device" requires="VK_KHR_swapchain,VK_KHR_display" supported="vulkan"> + <require> + <enum value="9" name="VK_KHR_DISPLAY_SWAPCHAIN_SPEC_VERSION"/> + <enum value=""VK_KHR_display_swapchain"" name="VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME"/> + <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR"/> + <enum offset="1" dir="-" extends="VkResult" name="VK_ERROR_INCOMPATIBLE_DISPLAY_KHR"/> + <type name="VkDisplayPresentInfoKHR"/> + <command name="vkCreateSharedSwapchainsKHR"/> + </require> + </extension> + <extension name="VK_KHR_xlib_surface" number="5" type="instance" requires="VK_KHR_surface" protect="VK_USE_PLATFORM_XLIB_KHR" supported="vulkan"> + <require> + <enum value="6" name="VK_KHR_XLIB_SURFACE_SPEC_VERSION"/> + <enum value=""VK_KHR_xlib_surface"" name="VK_KHR_XLIB_SURFACE_EXTENSION_NAME"/> + <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR"/> + <type name="VkXlibSurfaceCreateFlagsKHR"/> + <type name="VkXlibSurfaceCreateInfoKHR"/> + <command name="vkCreateXlibSurfaceKHR"/> + <command name="vkGetPhysicalDeviceXlibPresentationSupportKHR"/> + </require> + </extension> + <extension name="VK_KHR_xcb_surface" number="6" type="instance" requires="VK_KHR_surface" protect="VK_USE_PLATFORM_XCB_KHR" supported="vulkan"> + <require> + <enum value="6" name="VK_KHR_XCB_SURFACE_SPEC_VERSION"/> + <enum value=""VK_KHR_xcb_surface"" name="VK_KHR_XCB_SURFACE_EXTENSION_NAME"/> + <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR"/> + <type name="VkXcbSurfaceCreateFlagsKHR"/> + <type name="VkXcbSurfaceCreateInfoKHR"/> + <command name="vkCreateXcbSurfaceKHR"/> + <command name="vkGetPhysicalDeviceXcbPresentationSupportKHR"/> + </require> + </extension> + <extension name="VK_KHR_wayland_surface" number="7" type="instance" requires="VK_KHR_surface" protect="VK_USE_PLATFORM_WAYLAND_KHR" supported="vulkan"> + <require> + <enum value="5" name="VK_KHR_WAYLAND_SURFACE_SPEC_VERSION"/> + <enum value=""VK_KHR_wayland_surface"" name="VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME"/> + <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR"/> + <type name="VkWaylandSurfaceCreateFlagsKHR"/> + <type name="VkWaylandSurfaceCreateInfoKHR"/> + <command name="vkCreateWaylandSurfaceKHR"/> + <command name="vkGetPhysicalDeviceWaylandPresentationSupportKHR"/> + </require> + </extension> + <extension name="VK_KHR_mir_surface" number="8" type="instance" requires="VK_KHR_surface" protect="VK_USE_PLATFORM_MIR_KHR" supported="vulkan"> + <require> + <enum value="4" name="VK_KHR_MIR_SURFACE_SPEC_VERSION"/> + <enum value=""VK_KHR_mir_surface"" name="VK_KHR_MIR_SURFACE_EXTENSION_NAME"/> + <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR"/> + <type name="VkMirSurfaceCreateFlagsKHR"/> + <type name="VkMirSurfaceCreateInfoKHR"/> + <command name="vkCreateMirSurfaceKHR"/> + <command name="vkGetPhysicalDeviceMirPresentationSupportKHR"/> + </require> + </extension> + <extension name="VK_KHR_android_surface" number="9" type="instance" requires="VK_KHR_surface" protect="VK_USE_PLATFORM_ANDROID_KHR" supported="vulkan"> + <require> + <enum value="6" name="VK_KHR_ANDROID_SURFACE_SPEC_VERSION"/> + <enum value=""VK_KHR_android_surface"" name="VK_KHR_ANDROID_SURFACE_EXTENSION_NAME"/> + <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR"/> + <type name="VkAndroidSurfaceCreateFlagsKHR"/> + <type name="VkAndroidSurfaceCreateInfoKHR"/> + <command name="vkCreateAndroidSurfaceKHR"/> + </require> + </extension> + <extension name="VK_KHR_win32_surface" number="10" type="instance" requires="VK_KHR_surface" protect="VK_USE_PLATFORM_WIN32_KHR" supported="vulkan"> + <require> + <enum value="5" name="VK_KHR_WIN32_SURFACE_SPEC_VERSION"/> + <enum value=""VK_KHR_win32_surface"" name="VK_KHR_WIN32_SURFACE_EXTENSION_NAME"/> + <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR"/> + <type name="VkWin32SurfaceCreateFlagsKHR"/> + <type name="VkWin32SurfaceCreateInfoKHR"/> + <command name="vkCreateWin32SurfaceKHR"/> + <command name="vkGetPhysicalDeviceWin32PresentationSupportKHR"/> + </require> + </extension> + <extension name="VK_ANDROID_native_buffer" number="11" supported="disabled"> + <require> + <enum value="4" name="VK_ANDROID_NATIVE_BUFFER_SPEC_VERSION"/> + <enum value="11" name="VK_ANDROID_NATIVE_BUFFER_NUMBER"/> + <enum value=""VK_ANDROID_native_buffer"" name="VK_ANDROID_NATIVE_BUFFER_NAME"/> + </require> + </extension> + <extension name="VK_EXT_debug_report" number="12" type="instance" author="Google, Inc." contact="Courtney Goeltzenleuchter @courtney" supported="vulkan"> + <require> + <enum value="4" name="VK_EXT_DEBUG_REPORT_SPEC_VERSION"/> + <enum value=""VK_EXT_debug_report"" name="VK_EXT_DEBUG_REPORT_EXTENSION_NAME"/> + <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT"/> + <enum offset="1" dir="-" extends="VkResult" name="VK_ERROR_VALIDATION_FAILED_EXT"/> + <enum value="VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT" name="VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT"/> + <type name="VkDebugReportObjectTypeEXT"/> + <type name="VkDebugReportErrorEXT"/> + <command name="vkCreateDebugReportCallbackEXT"/> + <command name="vkDestroyDebugReportCallbackEXT"/> + <command name="vkDebugReportMessageEXT"/> + </require> + </extension> + <extension name="VK_NV_glsl_shader" number="13" type="device" author="NVIDIA" contact="Piers Daniell @pdaniell" supported="vulkan"> + <require> + <enum value="1" name="VK_NV_GLSL_SHADER_SPEC_VERSION"/> + <enum value=""VK_NV_glsl_shader"" name="VK_NV_GLSL_SHADER_EXTENSION_NAME"/> + <enum offset="0" dir="-" extends="VkResult" name="VK_ERROR_INVALID_SHADER_NV"/> + </require> + </extension> + <extension name="VK_NV_extension_1" number="14" author="NVIDIA" contact="Piers Daniell @pdaniell" supported="disabled"> + <require> + <enum value="0" name="VK_NV_EXTENSION_1_SPEC_VERSION"/> + <enum value=""VK_NV_extension_1"" name="VK_NV_EXTENSION_1_EXTENSION_NAME"/> + <enum offset="0" dir="-" extends="VkResult" name="VK_NV_EXTENSION_1_ERROR"/> + </require> + </extension> + <extension name="VK_KHR_sampler_mirror_clamp_to_edge" type="device" number="15" author="KHR" contact="Tobias Hector @tobias" supported="vulkan"> + <require> + <enum value="1" name="VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_SPEC_VERSION"/> + <enum value=""VK_KHR_sampler_mirror_clamp_to_edge"" name="VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME"/> + <enum value="4" extends="VkSamplerAddressMode" name="VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE" comment="Note that this defines what was previously a core enum, and so uses the 'value' attribute rather than 'offset', and does not have a suffix. This is a special case, and should not be repeated"/> + </require> + </extension> + <extension name="VK_IMG_filter_cubic" number="16" type="device" author="IMG" contact="Tobias Hector @tobias" supported="vulkan"> + <require> + <enum value="1" name="VK_IMG_FILTER_CUBIC_SPEC_VERSION"/> + <enum value=""VK_IMG_filter_cubic"" name="VK_IMG_FILTER_CUBIC_EXTENSION_NAME"/> + <enum offset="0" extends="VkFilter" name="VK_FILTER_CUBIC_IMG"/> + <enum bitpos="13" extends="VkFormatFeatureFlagBits" name="VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG" comment="Format can be filtered with VK_FILTER_CUBIC_IMG when being sampled"/> + </require> + </extension> + <extension name="VK_AMD_extension_17" number="17" author="AMD" contact="Daniel Rakos @aqnuep" supported="disabled"> + <require> + <enum value="0" name="VK_AMD_EXTENSION_17_SPEC_VERSION"/> + <enum value=""VK_AMD_extension_17"" name="VK_AMD_EXTENSION_17_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_AMD_extension_18" number="18" author="AMD" contact="Daniel Rakos @aqnuep" supported="disabled"> + <require> + <enum value="0" name="VK_AMD_EXTENSION_18_SPEC_VERSION"/> + <enum value=""VK_AMD_extension_18"" name="VK_AMD_EXTENSION_18_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_AMD_rasterization_order" number="19" type="device" author="AMD" contact="Daniel Rakos @aqnuep" supported="vulkan"> + <require> + <enum value="1" name="VK_AMD_RASTERIZATION_ORDER_SPEC_VERSION"/> + <enum value=""VK_AMD_rasterization_order"" name="VK_AMD_RASTERIZATION_ORDER_EXTENSION_NAME"/> + <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD"/> + <type name="VkRasterizationOrderAMD"/> + <type name="VkPipelineRasterizationStateRasterizationOrderAMD"/> + </require> + </extension> + <extension name="VK_AMD_extension_20" number="20" author="AMD" contact="Daniel Rakos @aqnuep" supported="disabled"> + <require> + <enum value="0" name="VK_AMD_EXTENSION_20_SPEC_VERSION"/> + <enum value=""VK_AMD_extension_20"" name="VK_AMD_EXTENSION_20_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_AMD_shader_trinary_minmax" number="21" type="device" author="AMD" contact="quentin.lin@amd.com" supported="vulkan"> + <require> + <enum value="1" name="VK_AMD_SHADER_TRINARY_MINMAX_SPEC_VERSION"/> + <enum value=""VK_AMD_shader_trinary_minmax"" name="VK_AMD_SHADER_TRINARY_MINMAX_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_AMD_shader_explicit_vertex_parameter" number="22" type="device" author="AMD" contact="quentin.lin@amd.com" supported="vulkan"> + <require> + <enum value="1" name="VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_SPEC_VERSION"/> + <enum value=""VK_AMD_shader_explicit_vertex_parameter"" name="VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_EXT_debug_marker" number="23" type="device" author="Baldur Karlsson" contact="baldurk@baldurk.org" supported="vulkan"> + <require> + <enum value="3" name="VK_EXT_DEBUG_MARKER_SPEC_VERSION"/> + <enum value=""VK_EXT_debug_marker"" name="VK_EXT_DEBUG_MARKER_EXTENSION_NAME"/> + <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT"/> + <enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT"/> + <enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT"/> + <type name="VkDebugMarkerObjectNameInfoEXT"/> + <type name="VkDebugMarkerObjectTagInfoEXT"/> + <type name="VkDebugMarkerMarkerInfoEXT"/> + <command name="vkDebugMarkerSetObjectTagEXT"/> + <command name="vkDebugMarkerSetObjectNameEXT"/> + <command name="vkCmdDebugMarkerBeginEXT"/> + <command name="vkCmdDebugMarkerEndEXT"/> + <command name="vkCmdDebugMarkerInsertEXT"/> + </require> + </extension> + <extension name="VK_AMD_extension_24" number="24" author="AMD" contact="Daniel Rakos @aqnuep" supported="disabled"> + <require> + <enum value="0" name="VK_AMD_EXTENSION_24_SPEC_VERSION"/> + <enum value=""VK_AMD_extension_24"" name="VK_AMD_EXTENSION_24_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_AMD_extension_25" number="25" author="AMD" contact="Daniel Rakos @aqnuep" supported="disabled"> + <require> + <enum value="0" name="VK_AMD_EXTENSION_25_SPEC_VERSION"/> + <enum value=""VK_AMD_extension_25"" name="VK_AMD_EXTENSION_25_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_AMD_gcn_shader" number="26" type="device" author="AMD" contact="dominik.witczak@amd.com" supported="vulkan"> + <require> + <enum value="1" name="VK_AMD_GCN_SHADER_SPEC_VERSION"/> + <enum value=""VK_AMD_gcn_shader"" name="VK_AMD_GCN_SHADER_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_NV_dedicated_allocation" number="27" type="device" author="NVIDIA" contact="Jeff Bolz @jbolz" supported="vulkan"> + <require> + <enum value="1" name="VK_NV_DEDICATED_ALLOCATION_SPEC_VERSION"/> + <enum value=""VK_NV_dedicated_allocation"" name="VK_NV_DEDICATED_ALLOCATION_EXTENSION_NAME"/> + <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV"/> + <enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV"/> + <enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV"/> + <type name="VkDedicatedAllocationImageCreateInfoNV"/> + <type name="VkDedicatedAllocationBufferCreateInfoNV"/> + <type name="VkDedicatedAllocationMemoryAllocateInfoNV"/> + </require> + </extension> + <extension name="VK_EXT_extension_28" number="28" author="NVIDIA" contact="Piers Daniell @pdaniell" supported="disabled"> + <require> + <enum value="0" name="VK_EXT_EXTENSION_28_SPEC_VERSION"/> + <enum value=""VK_NV_extension_28"" name="VK_EXT_EXTENSION_28_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_NVX_extension_29" number="29" author="NVIDIA" contact="Jeff Juliano @jjuliano" supported="disabled"> + <require> + <enum value="0" name="VK_NVX_EXTENSION_29_SPEC_VERSION"/> + <enum value=""VK_NVX_extension_29"" name="VK_NVX_EXTENSION_29_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_NVX_extension_30" number="30" author="NVIDIA" contact="Jeff Juliano @jjuliano" supported="disabled"> + <require> + <enum value="0" name="VK_NVX_EXTENSION_30_SPEC_VERSION"/> + <enum value=""VK_NVX_extension_30"" name="VK_NVX_EXTENSION_30_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_NVX_extension_31" number="31" author="NVIDIA" contact="Jeff Juliano @jjuliano" supported="disabled"> + <require> + <enum value="0" name="VK_NVX_EXTENSION_31_SPEC_VERSION"/> + <enum value=""VK_NVX_extension_31"" name="VK_NVX_EXTENSION_31_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_AMD_extension_32" number="32" author="AMD" contact="Daniel Rakos @aqnuep" supported="disabled"> + <require> + <enum value="0" name="VK_AMD_EXTENSION_32_SPEC_VERSION"/> + <enum value=""VK_AMD_extension_32"" name="VK_AMD_EXTENSION_32_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_AMD_extension_33" number="33" author="AMD" contact="Daniel Rakos @aqnuep" supported="disabled"> + <require> + <enum value="0" name="VK_AMD_EXTENSION_33_SPEC_VERSION"/> + <enum value=""VK_AMD_extension_33"" name="VK_AMD_EXTENSION_33_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_AMD_draw_indirect_count" number="34" type="device" author="AMD" contact="Daniel Rakos @aqnuep" supported="vulkan"> + <require> + <enum value="1" name="VK_AMD_DRAW_INDIRECT_COUNT_SPEC_VERSION"/> + <enum value=""VK_AMD_draw_indirect_count"" name="VK_AMD_DRAW_INDIRECT_COUNT_EXTENSION_NAME"/> + <command name="vkCmdDrawIndirectCountAMD"/> + <command name="vkCmdDrawIndexedIndirectCountAMD"/> + </require> + </extension> + <extension name="VK_AMD_extension_35" number="35" author="AMD" contact="Daniel Rakos @aqnuep" supported="disabled"> + <require> + <enum value="0" name="VK_AMD_EXTENSION_35_SPEC_VERSION"/> + <enum value=""VK_AMD_extension_35"" name="VK_AMD_EXTENSION_35_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_AMD_negative_viewport_height" number="36" type="device" author="AMD" contact="Matthaeus G. Chajdas @anteru" supported="vulkan"> + <require> + <enum value="1" name="VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_SPEC_VERSION"/> + <enum value=""VK_AMD_negative_viewport_height"" name="VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_AMD_gpu_shader_half_float" number="37" type="device" author="AMD" contact="Dominik Witczak @dominikwitczak_amd" supported="vulkan"> + <require> + <enum value="1" name="VK_AMD_GPU_SHADER_HALF_FLOAT_SPEC_VERSION"/> + <enum value=""VK_AMD_gpu_shader_half_float"" name="VK_AMD_GPU_SHADER_HALF_FLOAT_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_AMD_shader_ballot" number="38" type="device" author="AMD" contact="Dominik Witczak @dominikwitczak_amd" supported="vulkan"> + <require> + <enum value="1" name="VK_AMD_SHADER_BALLOT_SPEC_VERSION"/> + <enum value=""VK_AMD_shader_ballot"" name="VK_AMD_SHADER_BALLOT_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_AMD_extension_39" number="39" author="AMD" contact="Daniel Rakos @aqnuep" supported="disabled"> + <require> + <enum value="0" name="VK_AMD_EXTENSION_39_SPEC_VERSION"/> + <enum value=""VK_AMD_extension_39"" name="VK_AMD_EXTENSION_39_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_AMD_extension_40" number="40" author="AMD" contact="Daniel Rakos @aqnuep" supported="disabled"> + <require> + <enum value="0" name="VK_AMD_EXTENSION_40_SPEC_VERSION"/> + <enum value=""VK_AMD_extension_40"" name="VK_AMD_EXTENSION_40_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_AMD_extension_41" number="41" author="AMD" contact="Daniel Rakos @aqnuep" supported="disabled"> + <require> + <enum value="0" name="VK_AMD_EXTENSION_41_SPEC_VERSION"/> + <enum value=""VK_AMD_extension_41"" name="VK_AMD_EXTENSION_41_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_AMD_extension_42" number="42" author="AMD" contact="Daniel Rakos @aqnuep" supported="disabled"> + <require> + <enum value="0" name="VK_AMD_EXTENSION_42_SPEC_VERSION"/> + <enum value=""VK_AMD_extension_42"" name="VK_AMD_EXTENSION_42_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_AMD_extension_43" number="43" author="AMD" contact="Daniel Rakos @aqnuep" supported="disabled"> + <require> + <enum value="0" name="VK_AMD_EXTENSION_43_SPEC_VERSION"/> + <enum value=""VK_AMD_extension_43"" name="VK_AMD_EXTENSION_43_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_AMD_extension_44" number="44" author="AMD" contact="Daniel Rakos @aqnuep" supported="disabled"> + <require> + <enum value="0" name="VK_AMD_EXTENSION_44_SPEC_VERSION"/> + <enum value=""VK_AMD_extension_44"" name="VK_AMD_EXTENSION_44_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_AMD_extension_45" number="45" author="AMD" contact="Daniel Rakos @aqnuep" supported="disabled"> + <require> + <enum value="0" name="VK_AMD_EXTENSION_45_SPEC_VERSION"/> + <enum value=""VK_AMD_extension_45"" name="VK_AMD_EXTENSION_45_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_AMD_extension_46" number="46" author="AMD" contact="Daniel Rakos @aqnuep" supported="disabled"> + <require> + <enum value="0" name="VK_AMD_EXTENSION_46_SPEC_VERSION"/> + <enum value=""VK_AMD_extension_46"" name="VK_AMD_EXTENSION_46_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_AMD_extension_47" number="47" author="AMD" contact="Daniel Rakos @aqnuep" supported="disabled"> + <require> + <enum value="0" name="VK_AMD_EXTENSION_47_SPEC_VERSION"/> + <enum value=""VK_AMD_extension_47"" name="VK_AMD_EXTENSION_47_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_NVX_extension_48" number="48" author="NVIDIA" contact="James Jones @cubanismo" supported="disabled"> + <require> + <enum value="0" name="VK_NVX_EXTENSION_48_SPEC_VERSION"/> + <enum value=""VK_NVX_extension_48"" name="VK_NVX_EXTENSION_48_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_GOOGLE_extension_49" number="49" author="GOOGLE" contact="Jean-Francois Roy @jfroy" supported="disabled"> + <require> + <enum value="0" name="VK_GOOGLE_EXTENSION_49_SPEC_VERSION"/> + <enum value=""VK_GOOGLE_extension_49"" name="VK_GOOGLE_EXTENSION_49_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_GOOGLE_extension_50" number="50" author="GOOGLE" contact="Jean-Francois Roy @jfroy" supported="disabled"> + <require> + <enum value="0" name="VK_GOOGLE_EXTENSION_50_SPEC_VERSION"/> + <enum value=""VK_GOOGLE_extension_50"" name="VK_GOOGLE_EXTENSION_50_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_NVX_extension_51" number="51" author="NVIDIA" contact="James Jones @cubanismo" supported="disabled"> + <require> + <enum value="0" name="VK_NVX_EXTENSION_51_SPEC_VERSION"/> + <enum value=""VK_NVX_extension_51"" name="VK_NVX_EXTENSION_51_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_NVX_extension_52" number="52" author="NVIDIA" contact="James Jones @cubanismo" supported="disabled"> + <require> + <enum value="0" name="VK_NVX_EXTENSION_52_SPEC_VERSION"/> + <enum value=""VK_NVX_extension_52"" name="VK_NVX_EXTENSION_52_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_NV_extension_53" number="53" author="NVIDIA" contact="Jeff Bolz @jbolz" supported="disabled"> + <require> + <enum value="0" name="VK_NV_EXTENSION_53_SPEC_VERSION"/> + <enum value=""VK_NV_extension_53"" name="VK_NV_EXTENSION_53_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_NV_extension_54" number="54" author="NVIDIA" contact="Jeff Bolz @jbolz" supported="disabled"> + <require> + <enum value="0" name="VK_NV_EXTENSION_54_SPEC_VERSION"/> + <enum value=""VK_NV_extension_54"" name="VK_NV_EXTENSION_54_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_IMG_format_pvrtc" number="55" type="device" author="IMG" contact="Tobias Hector @tobias" supported="vulkan"> + <require> + <enum value="1" name="VK_IMG_FORMAT_PVRTC_SPEC_VERSION"/> + <enum value=""VK_IMG_format_pvrtc"" name="VK_IMG_FORMAT_PVRTC_EXTENSION_NAME"/> + <enum offset="0" extends="VkFormat" name="VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG"/> + <enum offset="1" extends="VkFormat" name="VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG"/> + <enum offset="2" extends="VkFormat" name="VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG"/> + <enum offset="3" extends="VkFormat" name="VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG"/> + <enum offset="4" extends="VkFormat" name="VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG"/> + <enum offset="5" extends="VkFormat" name="VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG"/> + <enum offset="6" extends="VkFormat" name="VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG"/> + <enum offset="7" extends="VkFormat" name="VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG"/> + </require> + </extension> + <extension name="VK_NV_external_memory_capabilities" number="56" type="instance" author="NVIDIA" contact="James jones @cubanismo" supported="vulkan"> + <require> + <enum value="1" name="VK_NV_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION"/> + <enum value=""VK_NV_external_memory_capabilities"" name="VK_NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME"/> + <type name="VkExternalMemoryHandleTypeFlagsNV"/> + <type name="VkExternalMemoryHandleTypeFlagBitsNV"/> + <type name="VkExternalMemoryFeatureFlagsNV"/> + <type name="VkExternalMemoryFeatureFlagBitsNV"/> + <type name="VkExternalImageFormatPropertiesNV"/> + <command name="vkGetPhysicalDeviceExternalImageFormatPropertiesNV"/> + </require> + </extension> + <extension name="VK_NV_external_memory" number="57" type="device" requires="VK_NV_external_memory_capabilities" author="NVIDIA" contact="James jones @cubanismo" supported="vulkan"> + <require> + <enum value="1" name="VK_NV_EXTERNAL_MEMORY_SPEC_VERSION"/> + <enum value=""VK_NV_external_memory"" name="VK_NV_EXTERNAL_MEMORY_EXTENSION_NAME"/> + <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV"/> + <enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV"/> + <type name="VkExternalMemoryImageCreateInfoNV"/> + <type name="VkExportMemoryAllocateInfoNV"/> + </require> + </extension> + <extension name="VK_NV_external_memory_win32" number="58" type="device" requires="VK_NV_external_memory_capabilities,VK_NV_external_memory" author="NVIDIA" contact="James jones @cubanismo" protect="VK_USE_PLATFORM_WIN32_KHR" supported="vulkan"> + <require> + <enum value="1" name="VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION"/> + <enum value=""VK_NV_external_memory_win32"" name="VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME"/> + <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV"/> + <enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV"/> + <type name="VkImportMemoryWin32HandleInfoNV"/> + <type name="VkExportMemoryWin32HandleInfoNV"/> + <command name="vkGetMemoryWin32HandleNV"/> + </require> + </extension> + <extension name="VK_NV_win32_keyed_mutex" number="59" type="device" requires="VK_NV_external_memory_capabilities,VK_NV_external_memory_win32" author="NVIDIA" contact="Carsten Rohde" protect="VK_USE_PLATFORM_WIN32_KHR" supported="vulkan"> + <require> + <enum value="1" name="VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION"/> + <enum value=""VK_NV_win32_keyed_mutex"" name="VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME"/> + <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV"/> + <type name="VkWin32KeyedMutexAcquireReleaseInfoNV"/> + </require> + </extension> + <extension name="VK_KHR_get_physical_device_properties2" number="60" author="KHR" contact="Jeff Bolz @jbolz" supported="vulkan"> + <require> + <enum value="1" name="VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_SPEC_VERSION"/> + <enum value=""VK_KHR_get_physical_device_properties2"" name="VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME"/> + <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR"/> + <enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR"/> + <enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR"/> + <enum offset="3" extends="VkStructureType" name="VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR"/> + <enum offset="4" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR"/> + <enum offset="5" extends="VkStructureType" name="VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR"/> + <enum offset="6" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR"/> + <enum offset="7" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR"/> + <enum offset="8" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR"/> + <type name="VkPhysicalDeviceFeatures2KHR"/> + <type name="VkPhysicalDeviceProperties2KHR"/> + <type name="VkFormatProperties2KHR"/> + <type name="VkImageFormatProperties2KHR"/> + <type name="VkPhysicalDeviceImageFormatInfo2KHR"/> + <type name="VkQueueFamilyProperties2KHR"/> + <type name="VkPhysicalDeviceMemoryProperties2KHR"/> + <type name="VkSparseImageFormatProperties2KHR"/> + <type name="VkPhysicalDeviceSparseImageFormatInfo2KHR"/> + <command name="vkGetPhysicalDeviceFeatures2KHR"/> + <command name="vkGetPhysicalDeviceProperties2KHR"/> + <command name="vkGetPhysicalDeviceFormatProperties2KHR"/> + <command name="vkGetPhysicalDeviceImageFormatProperties2KHR"/> + <command name="vkGetPhysicalDeviceQueueFamilyProperties2KHR"/> + <command name="vkGetPhysicalDeviceMemoryProperties2KHR"/> + <command name="vkGetPhysicalDeviceSparseImageFormatProperties2KHR"/> + </require> + </extension> + <extension name="VK_KHR_extension_61" number="61" author="KHR" contact="Jeff Bolz @jbolz" supported="disabled"> + <require> + <enum value="0" name="VK_KHR_EXTENSION_61_SPEC_VERSION"/> + <enum value=""VK_KHR_extension_61"" name="VK_KHR_EXTENSION_61_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_EXT_validation_flags" number="62" type="instance" author="Google, Inc." contact="Tobin Ehlis @tobine" supported="vulkan"> + <require> + <enum value="1" name="VK_EXT_VALIDATION_FLAGS_SPEC_VERSION"/> + <enum value=""VK_EXT_validation_flags"" name="VK_EXT_VALIDATION_FLAGS_EXTENSION_NAME"/> + <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT"/> + <type name="VkValidationFlagsEXT"/> + </require> + </extension> + <extension name="VK_NN_vi_surface" number="63" author="NN" contact="Mathias Heyer @mheyer" type="instance" requires="VK_KHR_surface" protect="VK_USE_PLATFORM_VI_NN" supported="vulkan"> + <require> + <enum value="1" name="VK_NN_VI_SURFACE_SPEC_VERSION"/> + <enum value=""VK_NN_vi_surface"" name="VK_NN_VI_SURFACE_EXTENSION_NAME"/> + <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN"/> + <type name="VkViSurfaceCreateFlagsNN"/> + <type name="VkViSurfaceCreateInfoNN"/> + <command name="vkCreateViSurfaceNN"/> + </require> + </extension> + <extension name="VK_KHR_shader_draw_parameters" number="64" type="device" author="KHR" contact="Daniel Koch @dgkoch" supported="vulkan"> + <require> + <enum value="1" name="VK_KHR_SHADER_DRAW_PARAMETERS_SPEC_VERSION"/> + <enum value=""VK_KHR_shader_draw_parameters"" name="VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_EXT_shader_subgroup_ballot" number="65" author="NVIDIA" contact="Daniel Koch @dgkoch" supported="vulkan"> + <require> + <enum value="1" name="VK_EXT_SHADER_SUBGROUP_BALLOT_SPEC_VERSION"/> + <enum value=""VK_EXT_shader_subgroup_ballot"" name="VK_EXT_SHADER_SUBGROUP_BALLOT_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_EXT_shader_subgroup_vote" number="66" author="NVIDIA" contact="Daniel Koch @dgkoch" supported="vulkan"> + <require> + <enum value="1" name="VK_EXT_SHADER_SUBGROUP_VOTE_SPEC_VERSION"/> + <enum value=""VK_EXT_shader_subgroup_vote"" name="VK_EXT_SHADER_SUBGROUP_VOTE_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_ARM_extension_01" number="67" type="device" author="ARM" contact="Jan-Harald Fredriksen @janharald" supported="disabled"> + <require> + <enum value="0" name="VK_ARM_EXTENSION_01_SPEC_VERSION"/> + <enum value=""VK_ARM_extension_01"" name="VK_ARM_EXTENSION_01_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_ARM_extension_02" number="68" type="device" author="ARM" contact="Jan-Harald Fredriksen @janharald" supported="disabled"> + <require> + <enum value="0" name="VK_ARM_EXTENSION_02_SPEC_VERSION"/> + <enum value=""VK_ARM_extension_02"" name="VK_ARM_EXTENSION_02_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_IMG_extension_69" number="69" type="device" author="IMG" contact="Tobias Hector @tobias" supported="disabled"> + <require> + <enum value="0" name="VK_IMG_EXTENSION_69_SPEC_VERSION"/> + <enum value=""VK_IMG_extension_69"" name="VK_IMG_EXTENSION_69_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_KHR_maintenance1" number="70" author="KHR" contact="Piers Daniell @pdaniell" supported="vulkan"> + <require> + <enum value="1" name="VK_KHR_MAINTENANCE1_SPEC_VERSION"/> + <enum value=""VK_KHR_maintenance1"" name="VK_KHR_MAINTENANCE1_EXTENSION_NAME"/> + <enum offset="0" dir="-" extends="VkResult" name="VK_ERROR_OUT_OF_POOL_MEMORY_KHR"/> + <enum bitpos="14" extends="VkFormatFeatureFlagBits" name="VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR" comment="Format can be used as the source image of image transfer commands"/> + <enum bitpos="15" extends="VkFormatFeatureFlagBits" name="VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR" comment="Format can be used as the destination image of image transfer commands"/> + <enum bitpos="5" extends="VkImageCreateFlagBits" name="VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR" comment="The 3D image can be viewed as a 2D or 2D array image"/> + <command name="vkTrimCommandPoolKHR"/> + </require> + </extension> + <extension name="VK_KHR_extension_71" number="71" author="KHR" contact="Jeff Bolz @jbolz" supported="disabled"> + <require> + <enum value="0" name="VK_KHR_EXTENSION_71_SPEC_VERSION"/> + <enum value=""VK_KHR_extension_71"" name="VK_KHR_EXTENSION_71_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_KHR_extension_72" number="72" author="KHR" contact="James Jones @cubanismo" supported="disable"> + <require> + <enum value="0" name="VK_KHR_EXTENSION_72_SPEC_VERSION"/> + <enum value=""VK_KHR_extension_72"" name="VK_KHR_EXTENSION_72_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_KHR_extension_73" number="73" author="KHR" contact="James Jones @cubanismo" supported="disable"> + <require> + <enum value="0" name="VK_KHR_EXTENSION_73_SPEC_VERSION"/> + <enum value=""VK_KHR_extension_73"" name="VK_KHR_EXTENSION_73_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_KHR_extension_74" number="74" author="KHR" contact="James Jones @cubanismo" supported="disable"> + <require> + <enum value="0" name="VK_KHR_EXTENSION_74_SPEC_VERSION"/> + <enum value=""VK_KHR_extension_74"" name="VK_KHR_EXTENSION_74_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_KHR_extension_75" number="75" author="KHR" contact="James Jones @cubanismo" supported="disable"> + <require> + <enum value="0" name="VK_KHR_EXTENSION_75_SPEC_VERSION"/> + <enum value=""VK_KHR_extension_75"" name="VK_KHR_EXTENSION_75_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_KHR_extension_76" number="76" author="KHR" contact="James Jones @cubanismo" supported="disable"> + <require> + <enum value="0" name="VK_KHR_EXTENSION_76_SPEC_VERSION"/> + <enum value=""VK_KHR_extension_76"" name="VK_KHR_EXTENSION_76_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_KHR_extension_77" number="77" author="KHR" contact="James Jones @cubanismo" supported="disable"> + <require> + <enum value="0" name="VK_KHR_EXTENSION_77_SPEC_VERSION"/> + <enum value=""VK_KHR_extension_77"" name="VK_KHR_EXTENSION_77_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_KHR_extension_78" number="78" author="KHR" contact="James Jones @cubanismo" supported="disable"> + <require> + <enum value="0" name="VK_KHR_EXTENSION_78_SPEC_VERSION"/> + <enum value=""VK_KHR_extension_78"" name="VK_KHR_EXTENSION_78_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_KHR_extension_79" number="79" author="KHR" contact="James Jones @cubanismo" supported="disable"> + <require> + <enum value="0" name="VK_KHR_EXTENSION_79_SPEC_VERSION"/> + <enum value=""VK_KHR_extension_79"" name="VK_KHR_EXTENSION_79_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_KHR_extension_80" number="80" author="KHR" contact="James Jones @cubanismo" supported="disable"> + <require> + <enum value="0" name="VK_KHR_EXTENSION_80_SPEC_VERSION"/> + <enum value=""VK_KHR_extension_80"" name="VK_KHR_EXTENSION_80_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_KHR_extension_81" number="81" author="KHR" contact="Jeff Bolz @jbolz" supported="disabled"> + <require> + <enum value="0" name="VK_KHR_EXTENSION_81_SPEC_VERSION"/> + <enum value=""VK_KHR_extension_81"" name="VK_KHR_EXTENSION_81_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_KHR_extension_82" number="82" author="KHR" contact="Jeff Bolz @jbolz" supported="disabled"> + <require> + <enum value="0" name="VK_KHR_EXTENSION_82_SPEC_VERSION"/> + <enum value=""VK_KHR_extension_82"" name="VK_KHR_EXTENSION_82_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_KHR_extension_83" number="83" author="KHR" contact="Jan-Harald Fredriksen @janharald" supported="disabled"> + <require> + <enum value="0" name="VK_KHR_EXTENSION_83_SPEC_VERSION"/> + <enum value=""VK_KHR_extension_83"" name="VK_KHR_EXTENSION_83_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_KHR_extension_84" number="84" author="KHR" contact="Jan-Harald Fredriksen @janharald" supported="disabled"> + <require> + <enum value="0" name="VK_KHR_EXTENSION_84_SPEC_VERSION"/> + <enum value=""VK_KHR_extension_84"" name="VK_KHR_EXTENSION_84_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_KHR_extension_85" number="85" author="KHR" contact="Ian Elliott @ianelliott" supported="disabled"> + <require> + <enum value="0" name="VK_KHR_EXTENSION_85_SPEC_VERSION"/> + <enum value=""VK_KHR_extension_85"" name="VK_KHR_EXTENSION_85_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_KHR_extension_86" number="86" author="KHR" contact="Markus Tavenrath @mtavenrath" supported="disabled"> + <require> + <enum value="0" name="VK_KHR_EXTENSION_86_SPEC_VERSION"/> + <enum value=""VK_KHR_extension_86"" name="VK_KHR_EXTENSION_86_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_NVX_device_generated_commands" number="87" type="device" author="NVIDIA" contact="Christoph Kubisch @pixeljetstream" supported="vulkan"> + <require> + <enum value="1" name="VK_NVX_DEVICE_GENERATED_COMMANDS_SPEC_VERSION"/> + <enum value=""VK_NVX_device_generated_commands"" name="VK_NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME"/> + <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX"/> + <enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX"/> + <enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX"/> + <enum offset="3" extends="VkStructureType" name="VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX"/> + <enum offset="4" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX"/> + <enum offset="5" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX"/> + <enum bitpos="17" extends="VkPipelineStageFlagBits" name="VK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX"/> + <enum bitpos="17" extends="VkAccessFlagBits" name="VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX"/> + <enum bitpos="18" extends="VkAccessFlagBits" name="VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX"/> + <type name="VkObjectTableNVX"/> + <type name="VkIndirectCommandsLayoutNVX"/> + <type name="VkIndirectCommandsLayoutUsageFlagsNVX"/> + <type name="VkObjectEntryUsageFlagsNVX"/> + <type name="VkIndirectCommandsLayoutUsageFlagBitsNVX"/> + <type name="VkIndirectCommandsTokenTypeNVX"/> + <type name="VkObjectEntryUsageFlagBitsNVX"/> + <type name="VkObjectEntryTypeNVX"/> + <type name="VkDeviceGeneratedCommandsFeaturesNVX"/> + <type name="VkDeviceGeneratedCommandsLimitsNVX"/> + <type name="VkIndirectCommandsTokenNVX"/> + <type name="VkIndirectCommandsLayoutTokenNVX"/> + <type name="VkIndirectCommandsLayoutCreateInfoNVX"/> + <type name="VkCmdProcessCommandsInfoNVX"/> + <type name="VkCmdReserveSpaceForCommandsInfoNVX"/> + <type name="VkObjectTableCreateInfoNVX"/> + <type name="VkObjectTableEntryNVX"/> + <type name="VkObjectTablePipelineEntryNVX"/> + <type name="VkObjectTableDescriptorSetEntryNVX"/> + <type name="VkObjectTableVertexBufferEntryNVX"/> + <type name="VkObjectTableIndexBufferEntryNVX"/> + <type name="VkObjectTablePushConstantEntryNVX"/> + <command name="vkCmdProcessCommandsNVX"/> + <command name="vkCmdReserveSpaceForCommandsNVX"/> + <command name="vkCreateIndirectCommandsLayoutNVX"/> + <command name="vkDestroyIndirectCommandsLayoutNVX"/> + <command name="vkCreateObjectTableNVX"/> + <command name="vkDestroyObjectTableNVX"/> + <command name="vkRegisterObjectsNVX"/> + <command name="vkUnregisterObjectsNVX"/> + <command name="vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX"/> + </require> + </extension> + <extension name="VK_KHR_extension_88" number="88" author="NV" contact="Eric Werness @ewerness" supported="disabled"> + <require> + <enum value="0" name="VK_KHR_EXTENSION_88_SPEC_VERSION"/> + <enum value=""VK_KHR_extension_88"" name="VK_KHR_EXTENSION_88_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_EXT_direct_mode_display" number="89" type="instance" requires="VK_KHR_display" author="NVIDIA" contact="James Jones @cubanismo" supported="vulkan"> + <require> + <enum value="1" name="VK_EXT_DIRECT_MODE_DISPLAY_SPEC_VERSION"/> + <enum value=""VK_EXT_direct_mode_display"" name="VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME"/> + <command name="vkReleaseDisplayEXT"/> + </require> + </extension> + <extension name="VK_EXT_acquire_xlib_display" number="90" type="instance" requires="VK_EXT_direct_mode_display,VK_KHR_display" author="NVIDIA" contact="James Jones @cubanismo" protect="VK_USE_PLATFORM_XLIB_XRANDR_EXT" supported="vulkan"> + <require> + <enum value="1" name="VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION"/> + <enum value=""VK_EXT_acquire_xlib_display"" name="VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME"/> + <command name="vkAcquireXlibDisplayEXT"/> + <command name="vkGetRandROutputDisplayEXT"/> + </require> + </extension> + <extension name="VK_EXT_display_surface_counter" number="91" type="instance" requires="VK_KHR_display" author="NVIDIA" contact="James Jones @cubanismo" supported="vulkan"> + <require> + <enum value="1" name="VK_EXT_DISPLAY_SURFACE_COUNTER_SPEC_VERSION"/> + <enum value=""VK_EXT_display_surface_counter"" name="VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME"/> + <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT"/> + <type name="VkSurfaceCounterFlagsEXT"/> + <type name="VkSurfaceCounterFlagBitsEXT"/> + <type name="VkSurfaceCapabilities2EXT"/> + <command name="vkGetPhysicalDeviceSurfaceCapabilities2EXT"/> + </require> + </extension> + <extension name="VK_EXT_display_control" number="92" type="device" requires="VK_KHR_display,VK_EXT_display_surface_counter,VK_KHR_swapchain" author="NVIDIA" contact="James Jones @cubanismo" supported="vulkan"> + <require> + <enum value="1" name="VK_EXT_DISPLAY_CONTROL_SPEC_VERSION"/> + <enum value=""VK_EXT_display_control"" name="VK_EXT_DISPLAY_CONTROL_EXTENSION_NAME"/> + <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT"/> + <enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT"/> + <enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT"/> + <enum offset="3" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT"/> + <type name="VkDisplayPowerStateEXT"/> + <type name="VkDeviceEventTypeEXT"/> + <type name="VkDisplayEventTypeEXT"/> + <type name="VkDisplayPowerInfoEXT"/> + <type name="VkDeviceEventInfoEXT"/> + <type name="VkDisplayEventInfoEXT"/> + <type name="VkSwapchainCounterCreateInfoEXT"/> + <command name="vkDisplayPowerControlEXT"/> + <command name="vkRegisterDeviceEventEXT"/> + <command name="vkRegisterDisplayEventEXT"/> + <command name="vkGetSwapchainCounterEXT"/> + </require> + </extension> + <extension name="VK_KHR_extension_93" number="93" author="GOOGLE" contact="Ian Elliott @ianelliott" supported="disabled"> + <require> + <enum value="0" name="VK_GOOGLE_EXTENSION_93_SPEC_VERSION"/> + <enum value=""VK_GOOGLE_extension_93"" name="VK_GOOGLE_EXTENSION_93_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_KHR_extension_94" number="94" author="Codeplay" contact="Neil Henning @neil_henning" supported="disabled"> + <require> + <enum value="0" name="VK_KHR_EXTENSION_94_SPEC_VERSION"/> + <enum value=""VK_KHR_extension_94"" name="VK_KHR_EXTENSION_94_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_NV_extension_95" number="95" author="NVIDIA" contact="Daniel Koch @dgkoch" supported="disabled"> + <require> + <enum value="0" name="VK_NV_EXTENSION_95_SPEC_VERSION"/> + <enum value=""VK_NV_extension_95"" name="VK_NV_EXTENSION_95_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_NV_extension_96" number="96" author="NVIDIA" contact="Daniel Koch @dgkoch" supported="disabled"> + <require> + <enum value="0" name="VK_NV_EXTENSION_96_SPEC_VERSION"/> + <enum value=""VK_NV_extension_96"" name="VK_NV_EXTENSION_96_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_NV_extension_97" number="97" author="NVIDIA" contact="Daniel Koch @dgkoch" supported="disabled"> + <require> + <enum value="0" name="VK_NV_EXTENSION_97_SPEC_VERSION"/> + <enum value=""VK_NV_extension_97"" name="VK_NV_EXTENSION_97_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_NV_extension_98" number="98" author="NVIDIA" contact="Daniel Koch @dgkoch" supported="disabled"> + <require> + <enum value="0" name="VK_NV_EXTENSION_98_SPEC_VERSION"/> + <enum value=""VK_NV_extension_98"" name="VK_NV_EXTENSION_98_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_NV_extension_99" number="99" author="NVIDIA" contact="Daniel Koch @dgkoch" supported="disabled"> + <require> + <enum value="0" name="VK_NV_EXTENSION_99_SPEC_VERSION"/> + <enum value=""VK_NV_extension_99"" name="VK_NV_EXTENSION_99_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_NV_extension_100" number="100" author="NVIDIA" contact="Daniel Koch @dgkoch" supported="disabled"> + <require> + <enum value="0" name="VK_NV_EXTENSION_100_SPEC_VERSION"/> + <enum value=""VK_NV_extension_100"" name="VK_NV_EXTENSION_100_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_NV_extension_101" number="101" author="NVIDIA" contact="Daniel Koch @dgkoch" supported="disabled"> + <require> + <enum value="0" name="VK_NV_EXTENSION_101_SPEC_VERSION"/> + <enum value=""VK_NV_extension_101"" name="VK_NV_EXTENSION_101_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_NV_extension_102" number="102" author="NVIDIA" contact="Daniel Koch @dgkoch" supported="disabled"> + <require> + <enum value="0" name="VK_NV_EXTENSION_102_SPEC_VERSION"/> + <enum value=""VK_NV_extension_102"" name="VK_NV_EXTENSION_102_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_NV_extension_103" number="103" author="NVIDIA" contact="Daniel Koch @dgkoch" supported="disabled"> + <require> + <enum value="0" name="VK_NV_EXTENSION_103_SPEC_VERSION"/> + <enum value=""VK_NV_extension_103"" name="VK_NV_EXTENSION_103_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_NV_extension_104" number="104" author="NVIDIA" contact="Mathias Schott @mschott" supported="disabled"> + <require> + <enum value="0" name="VK_NV_EXTENSION_104_SPEC_VERSION"/> + <enum value=""VK_NV_extension_104"" name="VK_NV_EXTENSION_104_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_EXT_swapchain_colorspace" number="105" author="GOOGLE" contact="Courtney Goeltzenleuchter @courtneygo" requires="VK_KHR_surface" supported="vulkan"> + <require> + <enum value="1" name="VK_SWAPCHAIN_COLOR_SPACE_SPEC_VERSION"/> + <enum value=""VK_EXT_swapchain_colorspace"" name="VK_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME"/> + <enum offset="1" extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_DISPLAY_P3_LINEAR_EXT"/> + <enum offset="2" extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT"/> + <enum offset="3" extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_SCRGB_LINEAR_EXT"/> + <enum offset="4" extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_SCRGB_NONLINEAR_EXT"/> + <enum offset="5" extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_DCI_P3_LINEAR_EXT"/> + <enum offset="6" extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_DCI_P3_NONLINEAR_EXT"/> + <enum offset="7" extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_BT709_LINEAR_EXT"/> + <enum offset="8" extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_BT709_NONLINEAR_EXT"/> + <enum offset="9" extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_BT2020_LINEAR_EXT"/> + <enum offset="10" extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_BT2020_NONLINEAR_EXT"/> + <enum offset="11" extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT"/> + <enum offset="12" extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT"/> + </require> + </extension> + <extension name="VK_EXT_extension_106" number="106" author="GOOGLE" contact="Courtney Goeltzenleuchter @courtneygo" supported="disabled"> + <require> + <enum value="0" name="VK_KHR_EXTENSION_106_SPEC_VERSION"/> + <enum value=""VK_EXT_extension_106"" name="VK_KHR_EXTENSION_106_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_IMG_extension_107" number="107" author="IMG" contact="Michael Worcester @michaelworcester" supported="disabled"> + <require> + <enum value="0" name="VK_IMG_EXTENSION_107_SPEC_VERSION"/> + <enum value=""VK_IMG_extension_107"" name="VK_IMG_EXTENSION_107_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_IMG_extension_108" number="108" author="IMG" contact="Michael Worcester @michaelworcester" supported="disabled"> + <require> + <enum value="0" name="VK_IMG_EXTENSION_108_SPEC_VERSION"/> + <enum value=""VK_IMG_extension_108"" name="VK_IMG_EXTENSION_108_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_IMG_extension_109" number="109" author="IMG" contact="Michael Worcester @michaelworcester" supported="disabled"> + <require> + <enum value="0" name="VK_IMG_EXTENSION_109_SPEC_VERSION"/> + <enum value=""VK_IMG_extension_109"" name="VK_IMG_EXTENSION_109_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_IMG_extension_110" number="110" author="IMG" contact="Michael Worcester @michaelworcester" supported="disabled"> + <require> + <enum value="0" name="VK_IMG_EXTENSION_110_SPEC_VERSION"/> + <enum value=""VK_IMG_extension_110"" name="VK_IMG_EXTENSION_110_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_IMG_extension_111" number="111" author="IMG" contact="Michael Worcester @michaelworcester" supported="disabled"> + <require> + <enum value="0" name="VK_IMG_EXTENSION_111_SPEC_VERSION"/> + <enum value=""VK_IMG_extension_111"" name="VK_IMG_EXTENSION_111_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_KHR_extension_112" number="112" author="KHR" contact="Alon Or-bach @alonorbach" supported="disabled"> + <require> + <enum value="0" name="VK_KHR_EXTENSION_112_SPEC_VERSION"/> + <enum value=""VK_KHR_extension_112"" name="VK_KHR_EXTENSION_112_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_KHR_extension_113" number="113" author="KHX" contact="Cass Everitt @casseveritt" supported="disabled"> + <require> + <enum value="0" name="VK_KHR_EXTENSION_113_SPEC_VERSION"/> + <enum value=""VK_KHR_extension_113"" name="VK_KHR_EXTENSION_113_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_KHR_extension_114" number="114" author="KHX" contact="Cass Everitt @casseveritt" supported="disabled"> + <require> + <enum value="0" name="VK_KHR_EXTENSION_114_SPEC_VERSION"/> + <enum value=""VK_KHR_extension_114"" name="VK_KHR_EXTENSION_114_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_KHR_extension_115" number="115" author="KHX" contact="Cass Everitt @casseveritt" supported="disabled"> + <require> + <enum value="0" name="VK_KHR_EXTENSION_115_SPEC_VERSION"/> + <enum value=""VK_KHR_extension_115"" name="VK_KHR_EXTENSION_115_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_KHR_extension_116" number="116" author="KHX" contact="Cass Everitt @casseveritt" supported="disabled"> + <require> + <enum value="0" name="VK_KHR_EXTENSION_116_SPEC_VERSION"/> + <enum value=""VK_KHR_extension_116"" name="VK_KHR_EXTENSION_116_EXTENSION_NAME"/> + </require> + </extension> + <extension name="VK_KHR_extension_117" number="117" author="KHR" contact="Kenneth Benzie @kbenzie" supported="disabled"> + <require> + <enum value="0" name="VK_KHR_EXTENSION_117_SPEC_VERSION"/> + <enum value=""VK_KHR_extension_117"" name="VK_KHR_EXTENSION_117_EXTENSION_NAME"/> + </require> + </extension> + </extensions> +</registry> diff --git a/src/gui/vulkan/vulkan.pri b/src/gui/vulkan/vulkan.pri new file mode 100644 index 0000000000..dab8725de7 --- /dev/null +++ b/src/gui/vulkan/vulkan.pri @@ -0,0 +1,52 @@ +qtConfig(vulkan) { + CONFIG += generated_privates + + HEADERS += \ + vulkan/qvulkaninstance.h \ + vulkan/qplatformvulkaninstance.h \ + vulkan/qvulkanwindow.h \ + vulkan/qvulkanwindow_p.h + + SOURCES += \ + vulkan/qvulkaninstance.cpp \ + vulkan/qplatformvulkaninstance.cpp \ + vulkan/qvulkanfunctions.cpp \ + vulkan/qvulkanwindow.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 = $$OUT_PWD/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 = $$OUT_PWD/vulkan/qvulkanfunctions_p.h +qvkgen_ph.input = QMAKE_QVKGEN_INPUT +qvkgen_ph.depends += $$OUT_PWD/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 = $$OUT_PWD/vulkan/qvulkanfunctions_p.cpp +qvkgen_pimpl.input = QMAKE_QVKGEN_INPUT +qvkgen_pimpl.depends += $$OUT_PWD/vulkan/qvulkanfunctions_p.h +qtConfig(vulkan): \ + qvkgen_pimpl.variable_out = SOURCES +else: \ + qvkgen_pimpl.CONFIG += target_predeps no_link +QMAKE_EXTRA_COMPILERS += qvkgen_pimpl |